mirror of
https://abf.rosa.ru/djam/kernel-5.15.git
synced 2025-02-23 18:42:55 +00:00
125 lines
3.6 KiB
Diff
125 lines
3.6 KiB
Diff
From c1d0ad8fe95a87c8514558591b82deee04024729 Mon Sep 17 00:00:00 2001
|
|
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
|
Date: Tue, 8 Mar 2022 13:25:57 -0600
|
|
Subject: [PATCH 432/432] ALSA: intel-dsp-config: add more ACPI HIDs for ES83x6
|
|
devices
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
We only saw ESSX8336 so far, but now with reports of 'ESSX8326' we
|
|
need to expand to a full list. Let's reuse the 'snd_soc_acpi_codecs'
|
|
structure to store the information.
|
|
|
|
Reported-by: anthony tonitch <d.tonitch@gmail.com>
|
|
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
|
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
|
|
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
|
|
Acked-by: Takashi Iwai <tiwai@suse.de>
|
|
Link: https://lore.kernel.org/r/20220308192610.392950-8-pierre-louis.bossart@linux.intel.com
|
|
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
---
|
|
sound/hda/intel-dsp-config.c | 31 ++++++++++++++++++++++---------
|
|
1 file changed, 22 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
|
|
index f63114317..036ba4889 100644
|
|
--- a/sound/hda/intel-dsp-config.c
|
|
+++ b/sound/hda/intel-dsp-config.c
|
|
@@ -11,6 +11,7 @@
|
|
#include <sound/core.h>
|
|
#include <sound/intel-dsp-config.h>
|
|
#include <sound/intel-nhlt.h>
|
|
+#include <sound/soc-acpi.h>
|
|
|
|
static int dsp_driver;
|
|
|
|
@@ -31,7 +32,12 @@ struct config_entry {
|
|
u16 device;
|
|
u8 acpi_hid[ACPI_ID_LEN];
|
|
const struct dmi_system_id *dmi_table;
|
|
- u8 codec_hid[ACPI_ID_LEN];
|
|
+ const struct snd_soc_acpi_codecs *codec_hid;
|
|
+};
|
|
+
|
|
+static const struct snd_soc_acpi_codecs __maybe_unused essx_83x6 = {
|
|
+ .num_codecs = 3,
|
|
+ .codecs = { "ESSX8316", "ESSX8326", "ESSX8336"},
|
|
};
|
|
|
|
/*
|
|
@@ -77,7 +83,7 @@ static const struct config_entry config_table[] = {
|
|
{
|
|
.flags = FLAG_SOF,
|
|
.device = 0x5a98,
|
|
- .codec_hid = "ESSX8336",
|
|
+ .codec_hid = &essx_83x6,
|
|
},
|
|
#endif
|
|
#if IS_ENABLED(CONFIG_SND_SOC_INTEL_APL)
|
|
@@ -163,7 +169,7 @@ static const struct config_entry config_table[] = {
|
|
{
|
|
.flags = FLAG_SOF,
|
|
.device = 0x3198,
|
|
- .codec_hid = "ESSX8336",
|
|
+ .codec_hid = &essx_83x6,
|
|
},
|
|
#endif
|
|
|
|
@@ -251,7 +257,7 @@ static const struct config_entry config_table[] = {
|
|
{
|
|
.flags = FLAG_SOF,
|
|
.device = 0x02c8,
|
|
- .codec_hid = "ESSX8336",
|
|
+ .codec_hid = &essx_83x6,
|
|
},
|
|
{
|
|
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
|
|
@@ -280,7 +286,7 @@ static const struct config_entry config_table[] = {
|
|
{
|
|
.flags = FLAG_SOF,
|
|
.device = 0x06c8,
|
|
- .codec_hid = "ESSX8336",
|
|
+ .codec_hid = &essx_83x6,
|
|
},
|
|
{
|
|
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
|
|
@@ -314,7 +320,7 @@ static const struct config_entry config_table[] = {
|
|
{
|
|
.flags = FLAG_SOF,
|
|
.device = 0x4dc8,
|
|
- .codec_hid = "ESSX8336",
|
|
+ .codec_hid = &essx_83x6,
|
|
},
|
|
#endif
|
|
|
|
@@ -336,7 +342,7 @@ static const struct config_entry config_table[] = {
|
|
{
|
|
.flags = FLAG_SOF,
|
|
.device = 0xa0c8,
|
|
- .codec_hid = "ESSX8336",
|
|
+ .codec_hid = &essx_83x6,
|
|
},
|
|
{
|
|
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
|
|
@@ -389,8 +395,15 @@ static const struct config_entry *snd_intel_dsp_find_config
|
|
continue;
|
|
if (table->dmi_table && !dmi_check_system(table->dmi_table))
|
|
continue;
|
|
- if (table->codec_hid[0] && !acpi_dev_present(table->codec_hid, NULL, -1))
|
|
- continue;
|
|
+ if (table->codec_hid) {
|
|
+ int i;
|
|
+
|
|
+ for (i = 0; i < table->codec_hid->num_codecs; i++)
|
|
+ if (acpi_dev_present(table->codec_hid->codecs[i], NULL, -1))
|
|
+ break;
|
|
+ if (i == table->codec_hid->num_codecs)
|
|
+ continue;
|
|
+ }
|
|
return table;
|
|
}
|
|
return NULL;
|
|
--
|
|
2.35.2
|
|
|