diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-30 10:53:17 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-30 10:53:17 +0300 |
commit | b84a9523bab4a2483d7b7566b81a7859c2fd9a78 (patch) | |
tree | 10cdebd482fc53568e9f025e3f1e665451fb3cb1 /sound/hda/intel-dsp-config.c | |
parent | 2a28e4d28ca1dcaf5073351517e9b22400994289 (diff) | |
parent | 1b4861e32e461b6fae14dc49ed0f1c7f20af5146 (diff) | |
download | linux-b84a9523bab4a2483d7b7566b81a7859c2fd9a78.tar.xz |
Merge v6.9.3
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/hda/intel-dsp-config.c')
-rw-r--r-- | sound/hda/intel-dsp-config.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c index 6a384b922e4f..d1f6cdcf1866 100644 --- a/sound/hda/intel-dsp-config.c +++ b/sound/hda/intel-dsp-config.c @@ -557,9 +557,32 @@ static const struct config_entry *snd_intel_dsp_find_config 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)) + for (i = 0; i < table->codec_hid->num_codecs; i++) { + struct nhlt_acpi_table *nhlt; + bool ssp_found = false; + + if (!acpi_dev_present(table->codec_hid->codecs[i], NULL, -1)) + continue; + + nhlt = intel_nhlt_init(&pci->dev); + if (!nhlt) { + dev_warn(&pci->dev, "%s: NHLT table not found, skipped HID %s\n", + __func__, table->codec_hid->codecs[i]); + continue; + } + + if (intel_nhlt_has_endpoint_type(nhlt, NHLT_LINK_SSP) && + intel_nhlt_ssp_endpoint_mask(nhlt, NHLT_DEVICE_I2S)) + ssp_found = true; + + intel_nhlt_free(nhlt); + + if (ssp_found) break; + + dev_warn(&pci->dev, "%s: no valid SSP found for HID %s, skipped\n", + __func__, table->codec_hid->codecs[i]); + } if (i == table->codec_hid->num_codecs) continue; } |