[d-kernel] [PATCH 1/2] Revert "ASoC: Intel: sof_es8336: add ES8326 component support"

kovalev на altlinux.org kovalev на altlinux.org
Чт Мар 7 11:50:41 MSK 2024


From: Vasiliy Kovalev <kovalev на altlinux.org>

This reverts commit 15942fcf7b5fa138e8e7b597f327d252f7895d2c.

Remove an outdated ALT patch that leads to null pointer dereference:
--
[    5.784881] RIP: 0010:sof_es8316_exit+0x1b/0x30 [snd_soc_sof_es8336]
[    5.785397] Code: 08 5b c3 cc cc cc cc 0f 1f 84 00 00 00 00 00 0f 1f
		     44 00 00 48 8b 47 10 31 f6 8b 50 18 48 8b 87 18 06
		     00 00 48 8b 04 d0 31 d2 <48> 8b 78 58 e9 5c ec e6
		     ff 66 66 2e 0f 1f 84 00 00 00 00 00 90 0f
--
[    5.794869]  ? asm_exc_page_fault+0x22/0x30
[    5.795424]  ? sof_es8316_exit+0x1b/0x30 [snd_soc_sof_es8336]
[    5.796205]  snd_soc_remove_pcm_runtime+0x16/0x30 [snd_soc_core]
[    5.797141]  snd_soc_add_pcm_runtime.cold+0x29/0x10a [snd_soc_core]
[    5.798096]  snd_soc_bind_card+0x34c/0xb70 [snd_soc_core]
[    5.798912]  ? __kmalloc_node_track_caller+0x4c/0x130
[    5.799592]  ? devm_snd_soc_register_card+0x90/0x90 [snd_soc_core]
[    5.800287]  devm_snd_soc_register_card+0x43/0x90 [snd_soc_core]
[    5.800984]  sof_es8336_probe.cold+0x968/0x9f1 [snd_soc_sof_es8336]
[    5.801665]  platform_probe+0x3c/0xa0
--
[    5.820537]  </TASK>

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

diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c
index 6b8b4596e62e92..e22d767b6e97a3 100644
--- a/sound/soc/intel/boards/sof_es8336.c
+++ b/sound/soc/intel/boards/sof_es8336.c
@@ -682,17 +682,15 @@ 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.8



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