From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.1 From: kovalev@altlinux.org To: devel-kernel@lists.altlinux.org Date: Wed, 6 Dec 2023 19:44:10 +0300 Message-Id: <20231206164413.126554-5-kovalev@altlinux.org> X-Mailer: git-send-email 2.33.8 In-Reply-To: <20231206164413.126554-1-kovalev@altlinux.org> References: <20231206164413.126554-1-kovalev@altlinux.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [d-kernel] [PATCH 4/7] ASoC: Intel: add UCM component for es8336 headset mic + Dmic inverse topology X-BeenThere: devel-kernel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux kernel packages development List-Id: ALT Linux kernel packages development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2023 16:44:38 -0000 Archived-At: List-Archive: List-Post: From: Vasiliy Kovalev Signed-off-by: Vasiliy Kovalev --- 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-: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