ALT Linux kernel packages development
 help / color / mirror / Atom feed
From: kovalev@altlinux.org
To: devel-kernel@lists.altlinux.org
Subject: [d-kernel] [PATCH 4/7] ASoC: Intel: add UCM component for es8336 headset mic + Dmic inverse topology
Date: Wed,  6 Dec 2023 19:44:10 +0300
Message-ID: <20231206164413.126554-5-kovalev@altlinux.org> (raw)
In-Reply-To: <20231206164413.126554-1-kovalev@altlinux.org>

From: Vasiliy Kovalev <kovalev@altlinux.org>

Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
---
 sound/soc/intel/boards/sof_es8336.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c
index 233a1fc878fe96..51caf5e622b079 100644
--- a/sound/soc/intel/boards/sof_es8336.c
+++ b/sound/soc/intel/boards/sof_es8336.c
@@ -50,6 +50,7 @@
 #define SOF_ES8336_JD_INVERTED			BIT(6)
 #define SOF_ES8336_HEADPHONE_GPIO		BIT(7)
 #define SOC_ES8336_HEADSET_MIC1			BIT(8)
+#define SOC_ES8336_HEADSET_MIC_INV		BIT(21)
 
 static unsigned long quirk;
 
@@ -607,7 +608,7 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev,
 	return NULL;
 }
 
-static char soc_components[30];
+static char soc_components[40];
 
  /* i2c-<HID>:00 with HID being 8 chars */
 static char codec_name[SND_ACPI_I2C_ID_LEN];
@@ -711,6 +712,13 @@ static int sof_es8336_probe(struct platform_device *pdev)
 	snprintf(soc_components, sizeof(soc_components), "spk:ES83%d6",
 					strstr(codec_name, "ESSX8326")? 2 : 1);
 
+	/* for inverse topology Dmic + HeadsetMic */
+	if (quirk & SOC_ES8336_HEADSET_MIC_INV) {
+		char hmic_component[10];
+		snprintf(hmic_component, sizeof(hmic_component), " hmic-inv");
+		strcat(soc_components,hmic_component);
+	}
+
 	codec_dev = acpi_get_first_physical_node(adev);
 	acpi_dev_put(adev);
 	if (!codec_dev)
-- 
2.33.8



  parent reply	other threads:[~2023-12-06 16:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-06 16:44 [d-kernel] [PATCH 0/7] ASoC: Intel/codecs: fix support es83x6 codecs drivers kovalev
2023-12-06 16:44 ` [d-kernel] [PATCH 1/7] ASoC: Intel: update strategy UCM components for es8336 driver kovalev
2023-12-06 16:44 ` [d-kernel] [PATCH 2/7] ASoC: Intel: add more DMI info into sof-essx8336 driver kovalev
2023-12-06 16:44 ` [d-kernel] [PATCH 3/7] ASoC: codecs: downgrade es8326 codec to stable state kovalev
2023-12-06 22:05   ` Vitaly Chikunov
2023-12-06 16:44 ` kovalev [this message]
2023-12-06 16:44 ` [d-kernel] [PATCH 5/7] ASoC: Intel: sof-essx8336 - add DMI info of the HUAWEI BOD-WXX9-PCB-B4 laptop kovalev
2023-12-06 16:44 ` [d-kernel] [PATCH 6/7] ASoC: Intel: sof-essx8336 - add DMI info of the Kraftway ACCORD S15T laptop kovalev
2023-12-06 16:44 ` [d-kernel] [PATCH 7/7] ASoC: codecs: fix warning for the es8316 codec build kovalev
2023-12-06 22:06 ` [d-kernel] [PATCH 0/7] ASoC: Intel/codecs: fix support es83x6 codecs drivers Vitaly Chikunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231206164413.126554-5-kovalev@altlinux.org \
    --to=kovalev@altlinux.org \
    --cc=devel-kernel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux kernel packages development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
		devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
	public-inbox-index devel-kernel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git