From: Cezary Rojewski <cezary.rojewski@intel.com>
To: broonie@kernel.org
Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org,
tiwai@suse.com, perex@perex.cz,
amadeuszx.slawinski@linux.intel.com,
pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com,
rafael@kernel.org, Cezary Rojewski <cezary.rojewski@intel.com>
Subject: [PATCH 1/2] ALSA: hda: intel-dsp-config: Switch to ACPI NHLT
Date: Fri, 19 Apr 2024 10:43:06 +0200 [thread overview]
Message-ID: <20240419084307.2718881-2-cezary.rojewski@intel.com> (raw)
In-Reply-To: <20240419084307.2718881-1-cezary.rojewski@intel.com>
From: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Now that NHLT support in ACPI framework was introduced, migrate
intel-dsp-config driver to new API.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
sound/hda/Kconfig | 1 +
sound/hda/intel-dsp-config.c | 16 +++++++++-------
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/sound/hda/Kconfig b/sound/hda/Kconfig
index 741179ccbd4e..e2ac247fc1d4 100644
--- a/sound/hda/Kconfig
+++ b/sound/hda/Kconfig
@@ -42,6 +42,7 @@ config SND_INTEL_NHLT
config SND_INTEL_DSP_CONFIG
tristate
+ select ACPI_NHLT if ACPI
select SND_INTEL_NHLT if ACPI
select SND_INTEL_SOUNDWIRE_ACPI if ACPI
# this config should be selected only for Intel DSP platforms.
diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
index 6a384b922e4f..ea050805c20f 100644
--- a/sound/hda/intel-dsp-config.c
+++ b/sound/hda/intel-dsp-config.c
@@ -13,6 +13,8 @@
#include <sound/intel-nhlt.h>
#include <sound/soc-acpi.h>
+#include <acpi/nhlt.h>
+
static int dsp_driver;
module_param(dsp_driver, int, 0444);
@@ -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)
{
- struct nhlt_acpi_table *nhlt;
int ret = 0;
- nhlt = intel_nhlt_init(&pci->dev);
- if (nhlt) {
- if (intel_nhlt_has_endpoint_type(nhlt, NHLT_LINK_DMIC))
- ret = 1;
- intel_nhlt_free(nhlt);
- }
+ acpi_nhlt_get_gbl_table();
+
+ if (acpi_nhlt_find_endpoint(ACPI_NHLT_LINKTYPE_PDM, -1, -1, -1))
+ ret = 1;
+
+ acpi_nhlt_put_gbl_table();
+
return ret;
}
--
2.25.1
next prev parent reply other threads:[~2024-04-19 8:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 8:43 [PATCH 0/2] ASoC: Intel: avs: Switch to acpi-nhlt Cezary Rojewski
2024-04-19 8:43 ` Cezary Rojewski [this message]
2024-05-09 11:15 ` [PATCH 1/2] ALSA: hda: intel-dsp-config: Switch to ACPI NHLT Cezary Rojewski
2024-05-09 12:35 ` Takashi Iwai
2024-05-09 13:08 ` Takashi Iwai
2024-05-09 15:41 ` Mark Brown
2024-05-09 18:25 ` Takashi Iwai
2024-04-19 8:43 ` [PATCH 2/2] ASoC: Intel: avs: " Cezary Rojewski
2024-04-22 8:09 ` (subset) [PATCH 0/2] ASoC: Intel: avs: Switch to acpi-nhlt Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240419084307.2718881-2-cezary.rojewski@intel.com \
--to=cezary.rojewski@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=broonie@kernel.org \
--cc=hdegoede@redhat.com \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=rafael@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox