Commit 51bebf34 authored by Amadeusz Sławiński's avatar Amadeusz Sławiński Committed by Takashi Iwai

ALSA: hda: intel-dsp-config: Switch to ACPI NHLT

Now that NHLT support in ACPI framework was introduced, migrate
intel-dsp-config driver to new API.
Signed-off-by: default avatarAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240419084307.2718881-2-cezary.rojewski@intel.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a640acab
...@@ -42,6 +42,7 @@ config SND_INTEL_NHLT ...@@ -42,6 +42,7 @@ config SND_INTEL_NHLT
config SND_INTEL_DSP_CONFIG config SND_INTEL_DSP_CONFIG
tristate tristate
select ACPI_NHLT if ACPI
select SND_INTEL_NHLT if ACPI select SND_INTEL_NHLT if ACPI
select SND_INTEL_SOUNDWIRE_ACPI if ACPI select SND_INTEL_SOUNDWIRE_ACPI if ACPI
# this config should be selected only for Intel DSP platforms. # this config should be selected only for Intel DSP platforms.
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#include <sound/intel-nhlt.h> #include <sound/intel-nhlt.h>
#include <sound/soc-acpi.h> #include <sound/soc-acpi.h>
#include <acpi/nhlt.h>
static int dsp_driver; static int dsp_driver;
module_param(dsp_driver, int, 0444); module_param(dsp_driver, int, 0444);
...@@ -570,15 +572,15 @@ static const struct config_entry *snd_intel_dsp_find_config ...@@ -570,15 +572,15 @@ static const struct config_entry *snd_intel_dsp_find_config
static int snd_intel_dsp_check_dmic(struct pci_dev *pci) static int snd_intel_dsp_check_dmic(struct pci_dev *pci)
{ {
struct nhlt_acpi_table *nhlt;
int ret = 0; int ret = 0;
nhlt = intel_nhlt_init(&pci->dev); acpi_nhlt_get_gbl_table();
if (nhlt) {
if (intel_nhlt_has_endpoint_type(nhlt, NHLT_LINK_DMIC)) if (acpi_nhlt_find_endpoint(ACPI_NHLT_LINKTYPE_PDM, -1, -1, -1))
ret = 1; ret = 1;
intel_nhlt_free(nhlt);
} acpi_nhlt_put_gbl_table();
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment