[d-kernel] [PATCH 3/4] ASoC: Intel: sof_es8336: add ES8326 component support

nickel на altlinux.org nickel на altlinux.org
Ср Апр 5 19:59:42 MSK 2023


From: Vasiliy Kovalev <kovalev at altlinux.org>

On laptop model Aquarius NS685U R11 there is a need to add
this component to bundle the driver with the ESSX8326 codec.

Signed-off-by: Vasiliy Kovalev <kovalev at altlinux.org>
Signed-off-by: Nikolai Kostrigin <nickel at altlinux.org>
---
 sound/soc/intel/boards/sof_es8336.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c
index 894b6610b9e27..e47979f44c545 100644
--- a/sound/soc/intel/boards/sof_es8336.c
+++ b/sound/soc/intel/boards/sof_es8336.c
@@ -682,15 +682,17 @@ static int sof_es8336_probe(struct platform_device *pdev)
 		snprintf(codec_name, sizeof(codec_name),
 			 "i2c-%s", acpi_dev_name(adev));
 		dai_links[0].codecs->name = codec_name;
-
-		/* also fixup codec dai name if relevant */
-		if (!strncmp(mach->id, "ESSX8326", SND_ACPI_I2C_ID_LEN))
-			dai_links[0].codecs->dai_name = "ES8326 HiFi";
 	} else {
 		dev_err(dev, "Error cannot find '%s' dev\n", mach->id);
 		return -ENXIO;
 	}
 
+	card->components = devm_kasprintf(dev, GFP_KERNEL, "spk:es83%d6",
+					  strstr(codec_name, "ESSX8326")
+					  ? 1 : 2);
+	if (!card->components)
+		return -ENOMEM;
+
 	codec_dev = acpi_get_first_physical_node(adev);
 	acpi_dev_put(adev);
 	if (!codec_dev)
-- 
2.33.5



Подробная информация о списке рассылки devel-kernel