[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <021436ab-8035-4c56-99d5-c478075e6add@amd.com>
Date: Wed, 27 Nov 2024 22:34:32 +0530
From: potturu venkata prasad <venkataprasad.potturu@....com>
To: Jaroslav Kysela <perex@...ex.cz>, broonie@...nel.org,
alsa-devel@...a-project.org
Cc: Vijendar.Mukunda@....com, Basavaraj.Hiregoudar@....com,
Sunil-kumar.Dommati@....com, syed.sabakareem@....com,
mario.limonciello@....com, Liam Girdwood <lgirdwood@...il.com>,
Takashi Iwai <tiwai@...e.com>, Tim Crawford <tcrawford@...tem76.com>,
Attila Tőkés <attitokes@...il.com>,
Techno Mooney <techno.mooney@...il.com>, Jeremy Soller
<jeremy@...tem76.com>, Malcolm Hart <malcolm@...rts.com>,
"open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..."
<linux-sound@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ASoC: amd: yc: Fix for enabling DMIC on acp6x via _DSD
entry
On 11/27/24 18:06, Jaroslav Kysela wrote:
> On 27. 11. 24 12:22, Venkata Prasad Potturu wrote:
>> Add condition check to register ACP PDM sound card by reading
>> _WOV acpi entry.
>>
>> Fixes: 5426f506b584 ("ASoC: amd: Add support for enabling DMIC on
>> acp6x via _DSD")
>>
>> Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@....com>
>> ---
>> sound/soc/amd/yc/acp6x-mach.c | 18 +++++++++++++++++-
>> 1 file changed, 17 insertions(+), 1 deletion(-)
>>
>> diff --git a/sound/soc/amd/yc/acp6x-mach.c
>> b/sound/soc/amd/yc/acp6x-mach.c
>> index 438865d5e376..c301dac8b979 100644
>> --- a/sound/soc/amd/yc/acp6x-mach.c
>> +++ b/sound/soc/amd/yc/acp6x-mach.c
>> @@ -523,8 +523,14 @@ static int acp6x_probe(struct platform_device
>> *pdev)
>> struct acp6x_pdm *machine = NULL;
>> struct snd_soc_card *card;
>> struct acpi_device *adev;
>> + acpi_handle handle;
>> + acpi_integer dmic_status;
>> int ret;
>> + bool is_dmic_enable, wov_en;
>> + /* IF WOV entry not found, enable dmic based on
>> AcpDmicConnected entry*/
>> + is_dmic_enable = false;
>> + wov_en = true;
>> /* check the parent device's firmware node has _DSD or not */
>> adev = ACPI_COMPANION(pdev->dev.parent);
>> if (adev) {
>> @@ -532,9 +538,19 @@ static int acp6x_probe(struct platform_device
>> *pdev)
>> if (!acpi_dev_get_property(adev, "AcpDmicConnected",
>> ACPI_TYPE_INTEGER, &obj) &&
>> obj->integer.value == 1)
>> - platform_set_drvdata(pdev, &acp6x_card);
>> + is_dmic_enable = true;
>> }
>> + handle = ACPI_HANDLE(pdev->dev.parent);
>> + ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status);
>> + if (!ACPI_FAILURE(ret))
>> + wov_en = dmic_status;
>> +
>> + if (is_dmic_enable && wov_en)
>> + platform_set_drvdata(pdev, &acp6x_card);
>> + else
>> + return 0;
>
> The logic seems wrong. The overrides code bellow won't be executed
> when ACPI _WOV data are not set. I think that it may cause regressions
> for some BIOS versions.
>
> Also, the return code should be probably -ENODEV.
>
> Jaroslav
Okay Jaroslav,
We will correct it and resend v2 patch.
Thanks.
Powered by blists - more mailing lists