* [PATCH] ASoC: amd: ps: Fix for enabling DMIC on acp63 platform via _DSD entry
@ 2024-12-13 6:11 Venkata Prasad Potturu
2024-12-16 15:09 ` Mario Limonciello
2024-12-16 15:12 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Venkata Prasad Potturu @ 2024-12-13 6:11 UTC (permalink / raw)
To: broonie, alsa-devel
Cc: Vijendar.Mukunda, mario.limonciello, Basavaraj.Hiregoudar,
Sunil-kumar.Dommati, syed.sabakareem, Venkata Prasad Potturu,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Bard Liao,
Péter Ujfalusi, Pierre-Louis Bossart,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
open list
Add condition check to register ACP PDM sound card by reading
_WOV acpi entry.
Fixes: 0386d765f27a ("ASoC: amd: ps: refactor acp device configuration read logic")
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
---
sound/soc/amd/ps/pci-ps.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/ps/pci-ps.c b/sound/soc/amd/ps/pci-ps.c
index a7583844f5b4..983d7fa13938 100644
--- a/sound/soc/amd/ps/pci-ps.c
+++ b/sound/soc/amd/ps/pci-ps.c
@@ -374,11 +374,18 @@ static int get_acp63_device_config(struct pci_dev *pci, struct acp63_dev_data *a
{
struct acpi_device *pdm_dev;
const union acpi_object *obj;
+ acpi_handle handle;
+ acpi_integer dmic_status;
u32 config;
bool is_dmic_dev = false;
bool is_sdw_dev = false;
+ bool wov_en, dmic_en;
int ret;
+ /* IF WOV entry not found, enable dmic based on acp-audio-device-type entry*/
+ wov_en = true;
+ dmic_en = false;
+
config = readl(acp_data->acp63_base + ACP_PIN_CONFIG);
switch (config) {
case ACP_CONFIG_4:
@@ -411,10 +418,18 @@ static int get_acp63_device_config(struct pci_dev *pci, struct acp63_dev_data *a
if (!acpi_dev_get_property(pdm_dev, "acp-audio-device-type",
ACPI_TYPE_INTEGER, &obj) &&
obj->integer.value == ACP_DMIC_DEV)
- is_dmic_dev = true;
+ dmic_en = true;
}
+
+ handle = ACPI_HANDLE(&pci->dev);
+ ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status);
+ if (!ACPI_FAILURE(ret))
+ wov_en = dmic_status;
}
+ if (dmic_en && wov_en)
+ is_dmic_dev = true;
+
if (acp_data->is_sdw_config) {
ret = acp_scan_sdw_devices(&pci->dev, ACP63_SDW_ADDR);
if (!ret && acp_data->info.link_mask)
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: amd: ps: Fix for enabling DMIC on acp63 platform via _DSD entry
2024-12-13 6:11 [PATCH] ASoC: amd: ps: Fix for enabling DMIC on acp63 platform via _DSD entry Venkata Prasad Potturu
@ 2024-12-16 15:09 ` Mario Limonciello
2024-12-16 15:12 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mario Limonciello @ 2024-12-16 15:09 UTC (permalink / raw)
To: Venkata Prasad Potturu, broonie, alsa-devel
Cc: Vijendar.Mukunda, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
syed.sabakareem, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Bard Liao, Péter Ujfalusi, Pierre-Louis Bossart,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
open list
On 12/13/2024 00:11, Venkata Prasad Potturu wrote:
> Add condition check to register ACP PDM sound card by reading
> _WOV acpi entry.
>
> Fixes: 0386d765f27a ("ASoC: amd: ps: refactor acp device configuration read logic")
>
> Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> sound/soc/amd/ps/pci-ps.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/amd/ps/pci-ps.c b/sound/soc/amd/ps/pci-ps.c
> index a7583844f5b4..983d7fa13938 100644
> --- a/sound/soc/amd/ps/pci-ps.c
> +++ b/sound/soc/amd/ps/pci-ps.c
> @@ -374,11 +374,18 @@ static int get_acp63_device_config(struct pci_dev *pci, struct acp63_dev_data *a
> {
> struct acpi_device *pdm_dev;
> const union acpi_object *obj;
> + acpi_handle handle;
> + acpi_integer dmic_status;
> u32 config;
> bool is_dmic_dev = false;
> bool is_sdw_dev = false;
> + bool wov_en, dmic_en;
> int ret;
>
> + /* IF WOV entry not found, enable dmic based on acp-audio-device-type entry*/
> + wov_en = true;
> + dmic_en = false;
> +
> config = readl(acp_data->acp63_base + ACP_PIN_CONFIG);
> switch (config) {
> case ACP_CONFIG_4:
> @@ -411,10 +418,18 @@ static int get_acp63_device_config(struct pci_dev *pci, struct acp63_dev_data *a
> if (!acpi_dev_get_property(pdm_dev, "acp-audio-device-type",
> ACPI_TYPE_INTEGER, &obj) &&
> obj->integer.value == ACP_DMIC_DEV)
> - is_dmic_dev = true;
> + dmic_en = true;
> }
> +
> + handle = ACPI_HANDLE(&pci->dev);
> + ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status);
> + if (!ACPI_FAILURE(ret))
> + wov_en = dmic_status;
> }
>
> + if (dmic_en && wov_en)
> + is_dmic_dev = true;
> +
> if (acp_data->is_sdw_config) {
> ret = acp_scan_sdw_devices(&pci->dev, ACP63_SDW_ADDR);
> if (!ret && acp_data->info.link_mask)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: amd: ps: Fix for enabling DMIC on acp63 platform via _DSD entry
2024-12-13 6:11 [PATCH] ASoC: amd: ps: Fix for enabling DMIC on acp63 platform via _DSD entry Venkata Prasad Potturu
2024-12-16 15:09 ` Mario Limonciello
@ 2024-12-16 15:12 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2024-12-16 15:12 UTC (permalink / raw)
To: alsa-devel, Venkata Prasad Potturu
Cc: Vijendar.Mukunda, mario.limonciello, Basavaraj.Hiregoudar,
Sunil-kumar.Dommati, syed.sabakareem, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, Bard Liao, Péter Ujfalusi,
Pierre-Louis Bossart,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
open list
On Fri, 13 Dec 2024 11:41:46 +0530, Venkata Prasad Potturu wrote:
> Add condition check to register ACP PDM sound card by reading
> _WOV acpi entry.
>
> Fixes: 0386d765f27a ("ASoC: amd: ps: refactor acp device configuration read logic")
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: amd: ps: Fix for enabling DMIC on acp63 platform via _DSD entry
commit: 88438444fdddd0244c8b2697713adcca3e71599e
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-16 15:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-13 6:11 [PATCH] ASoC: amd: ps: Fix for enabling DMIC on acp63 platform via _DSD entry Venkata Prasad Potturu
2024-12-16 15:09 ` Mario Limonciello
2024-12-16 15:12 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®