* [PATCH] ASoC: amd: vangogh: Use non-legacy DAI naming for cs35l41
@ 2022-07-21 23:32 Cristian Ciocaltea
2022-07-22 8:20 ` Charles Keepax
2022-07-22 9:05 ` Charles Keepax
0 siblings, 2 replies; 4+ messages in thread
From: Cristian Ciocaltea @ 2022-07-21 23:32 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai, Charles Keepax
Cc: alsa-devel, linux-kernel, kernel
Unlike most CODEC drivers, the CS35L41 driver did not have the
non_legacy_dai_naming set, meaning the corresponding DAI has been
traditionally registered using the legacy naming: spi-VLV1776:0x
The recent migration to the new legacy DAI naming style has implicitly
corrected that behavior and DAI gets now registered via the non-legacy
naming, i.e. cs35l41-pcm.
The problem is the acp5x platform driver is now broken as it continues
to refer to the above mentioned codec using the legacy DAI naming in
function acp5x_cs35l41_hw_params() and, therefore, the related setup
is not being executed anymore.
Let's fix that by replacing the obsolete DAI name with the correct one.
Fixes: bc949a3b4af3 ("ASoC: core: Switch core to new DAI naming flag")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
sound/soc/amd/vangogh/acp5x-mach.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/amd/vangogh/acp5x-mach.c b/sound/soc/amd/vangogh/acp5x-mach.c
index 727de46860b1..af3737ef9707 100644
--- a/sound/soc/amd/vangogh/acp5x-mach.c
+++ b/sound/soc/amd/vangogh/acp5x-mach.c
@@ -178,8 +178,7 @@ static int acp5x_cs35l41_hw_params(struct snd_pcm_substream *substream,
ret = 0;
for (i = 0; i < num_codecs; i++) {
codec_dai = asoc_rtd_to_codec(rtd, i);
- if ((strcmp(codec_dai->name, "spi-VLV1776:00") == 0) ||
- (strcmp(codec_dai->name, "spi-VLV1776:01") == 0)) {
+ if (strcmp(codec_dai->name, "cs35l41-pcm") == 0) {
switch (params_rate(params)) {
case 48000:
bclk_val = 1536000;
--
2.37.1
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] ASoC: amd: vangogh: Use non-legacy DAI naming for cs35l41
2022-07-21 23:32 [PATCH] ASoC: amd: vangogh: Use non-legacy DAI naming for cs35l41 Cristian Ciocaltea
@ 2022-07-22 8:20 ` Charles Keepax
2022-07-22 9:05 ` Charles Keepax
1 sibling, 0 replies; 4+ messages in thread
From: Charles Keepax @ 2022-07-22 8:20 UTC (permalink / raw)
To: Cristian Ciocaltea
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
alsa-devel, linux-kernel, kernel, david.rhodes, tanureal
On Fri, Jul 22, 2022 at 02:32:27AM +0300, Cristian Ciocaltea wrote:
> Unlike most CODEC drivers, the CS35L41 driver did not have the
> non_legacy_dai_naming set, meaning the corresponding DAI has been
> traditionally registered using the legacy naming: spi-VLV1776:0x
>
> The recent migration to the new legacy DAI naming style has implicitly
> corrected that behavior and DAI gets now registered via the non-legacy
> naming, i.e. cs35l41-pcm.
>
> The problem is the acp5x platform driver is now broken as it continues
> to refer to the above mentioned codec using the legacy DAI naming in
> function acp5x_cs35l41_hw_params() and, therefore, the related setup
> is not being executed anymore.
>
> Let's fix that by replacing the obsolete DAI name with the correct one.
>
> Fixes: bc949a3b4af3 ("ASoC: core: Switch core to new DAI naming flag")
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
> ---
Looks good to me:
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Looped in David and Lucas from ourside who I believe worked on
the steam deck incase they have any comments too. Apologies for
this one and thank you for fixing it up.
Thanks,
Charles
> sound/soc/amd/vangogh/acp5x-mach.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/sound/soc/amd/vangogh/acp5x-mach.c b/sound/soc/amd/vangogh/acp5x-mach.c
> index 727de46860b1..af3737ef9707 100644
> --- a/sound/soc/amd/vangogh/acp5x-mach.c
> +++ b/sound/soc/amd/vangogh/acp5x-mach.c
> @@ -178,8 +178,7 @@ static int acp5x_cs35l41_hw_params(struct snd_pcm_substream *substream,
> ret = 0;
> for (i = 0; i < num_codecs; i++) {
> codec_dai = asoc_rtd_to_codec(rtd, i);
> - if ((strcmp(codec_dai->name, "spi-VLV1776:00") == 0) ||
> - (strcmp(codec_dai->name, "spi-VLV1776:01") == 0)) {
> + if (strcmp(codec_dai->name, "cs35l41-pcm") == 0) {
> switch (params_rate(params)) {
> case 48000:
> bclk_val = 1536000;
> --
> 2.37.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] ASoC: amd: vangogh: Use non-legacy DAI naming for cs35l41
2022-07-21 23:32 [PATCH] ASoC: amd: vangogh: Use non-legacy DAI naming for cs35l41 Cristian Ciocaltea
2022-07-22 8:20 ` Charles Keepax
@ 2022-07-22 9:05 ` Charles Keepax
2022-07-22 9:31 ` Cristian Ciocaltea
1 sibling, 1 reply; 4+ messages in thread
From: Charles Keepax @ 2022-07-22 9:05 UTC (permalink / raw)
To: Cristian Ciocaltea
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
alsa-devel, linux-kernel, kernel
On Fri, Jul 22, 2022 at 02:32:27AM +0300, Cristian Ciocaltea wrote:
> Unlike most CODEC drivers, the CS35L41 driver did not have the
> non_legacy_dai_naming set, meaning the corresponding DAI has been
> traditionally registered using the legacy naming: spi-VLV1776:0x
>
> The recent migration to the new legacy DAI naming style has implicitly
> corrected that behavior and DAI gets now registered via the non-legacy
> naming, i.e. cs35l41-pcm.
>
> The problem is the acp5x platform driver is now broken as it continues
> to refer to the above mentioned codec using the legacy DAI naming in
> function acp5x_cs35l41_hw_params() and, therefore, the related setup
> is not being executed anymore.
>
> Let's fix that by replacing the obsolete DAI name with the correct one.
>
> Fixes: bc949a3b4af3 ("ASoC: core: Switch core to new DAI naming flag")
Although sorry just noticed you might want to double check the SHA
here, I think the upstream one is 129f055a2144.
Thanks,
Charles
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] ASoC: amd: vangogh: Use non-legacy DAI naming for cs35l41
2022-07-22 9:05 ` Charles Keepax
@ 2022-07-22 9:31 ` Cristian Ciocaltea
0 siblings, 0 replies; 4+ messages in thread
From: Cristian Ciocaltea @ 2022-07-22 9:31 UTC (permalink / raw)
To: Charles Keepax
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
alsa-devel, linux-kernel, kernel
On 7/22/22 12:05, Charles Keepax wrote:
> On Fri, Jul 22, 2022 at 02:32:27AM +0300, Cristian Ciocaltea wrote:
>> Unlike most CODEC drivers, the CS35L41 driver did not have the
>> non_legacy_dai_naming set, meaning the corresponding DAI has been
>> traditionally registered using the legacy naming: spi-VLV1776:0x
>>
>> The recent migration to the new legacy DAI naming style has implicitly
>> corrected that behavior and DAI gets now registered via the non-legacy
>> naming, i.e. cs35l41-pcm.
>>
>> The problem is the acp5x platform driver is now broken as it continues
>> to refer to the above mentioned codec using the legacy DAI naming in
>> function acp5x_cs35l41_hw_params() and, therefore, the related setup
>> is not being executed anymore.
>>
>> Let's fix that by replacing the obsolete DAI name with the correct one.
>>
>> Fixes: bc949a3b4af3 ("ASoC: core: Switch core to new DAI naming flag")
>
> Although sorry just noticed you might want to double check the SHA
> here, I think the upstream one is 129f055a2144.
You are right, thanks for noticing!
I've done some rebasing/bisecting operations and I forgot to recheck the
original commit.. I've just sent v2.
Regards,
Cristian
> Thanks,
> Charles
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-22 9:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-21 23:32 [PATCH] ASoC: amd: vangogh: Use non-legacy DAI naming for cs35l41 Cristian Ciocaltea
2022-07-22 8:20 ` Charles Keepax
2022-07-22 9:05 ` Charles Keepax
2022-07-22 9:31 ` Cristian Ciocaltea
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®