Alsa-Devel Archive on lore.kernel.org
 help / color / Atom feed
* Re: [alsa-devel] No sound since 5.4 on skl_n88l25_s4567
       [not found] ` <CAKzrAgTCE4btXr04pkvLUG6PPbtn9dm5h_9rjqDYG0HrTZ0zbg@mail.gmail.com>
@ 2020-01-15  0:23   ` Kuninori Morimoto
  2020-01-15  1:41     ` Pierre-Louis Bossart
  2020-01-15 11:59     ` ojab //
  0 siblings, 2 replies; 11+ messages in thread
From: Kuninori Morimoto @ 2020-01-15  0:23 UTC (permalink / raw)
  To: ojab //; +Cc: alsa-devel


Hi ojab

> > Please take a look, I want my sound back ._.
> 
> Forgot to mention, it's reproducible on linux master git.

Hmm...
This patch 
	1) removes unneeded if check
	2) adds missing error check.

1) shouldn't have effect to your PC.
Thus, maybe your PC failed by 2).
It had been worked by accident before ?
I guess your kernel is telling some message like this ?

	ASoC: no dapm match for %s --> %s --> %s

Thank you for your help !!
Best regards
---
Kuninori Morimoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [alsa-devel] No sound since 5.4 on skl_n88l25_s4567
  2020-01-15  0:23   ` [alsa-devel] No sound since 5.4 on skl_n88l25_s4567 Kuninori Morimoto
@ 2020-01-15  1:41     ` Pierre-Louis Bossart
  2020-01-15 11:57       ` ojab //
  2020-01-15 11:59     ` ojab //
  1 sibling, 1 reply; 11+ messages in thread
From: Pierre-Louis Bossart @ 2020-01-15  1:41 UTC (permalink / raw)
  To: Kuninori Morimoto, ojab //; +Cc: alsa-devel


>>> Please take a look, I want my sound back ._.
>>
>> Forgot to mention, it's reproducible on linux master git.
> 
> Hmm...
> This patch
> 	1) removes unneeded if check
> 	2) adds missing error check.
> 
> 1) shouldn't have effect to your PC.
> Thus, maybe your PC failed by 2).
> It had been worked by accident before ?
> I guess your kernel is telling some message like this ?
> 
> 	ASoC: no dapm match for %s --> %s --> %s

It's likely that the topology file does not contain all the widgets/dais 
required by the hard-coded routes the machine driver, and by becoming 
stricter warnings became errors which in turn prevent the card from 
being created. It may be that we have to define a backwards compatible 
behavior that's enabled only for Intel legacy cases.

Please post the results of alsa-info.sh somewhere so that we can take a 
look.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [alsa-devel] No sound since 5.4 on skl_n88l25_s4567
  2020-01-15  1:41     ` Pierre-Louis Bossart
@ 2020-01-15 11:57       ` ojab //
  2020-01-15 15:07         ` Pierre-Louis Bossart
  0 siblings, 1 reply; 11+ messages in thread
From: ojab // @ 2020-01-15 11:57 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: alsa-devel, Kuninori Morimoto

On Wed, Jan 15, 2020 at 4:41 AM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
> Please post the results of alsa-info.sh somewhere so that we can take a
> look.

5.3.0: http://alsa-project.org/db/?f=d82b3ef237a5050dfb73231ba114e45a6a4420ef
5.4.0: http://alsa-project.org/db/?f=d922b77306a1287eae3624d241f3d46d347c8098

//wbr ojab
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [alsa-devel] No sound since 5.4 on skl_n88l25_s4567
  2020-01-15  0:23   ` [alsa-devel] No sound since 5.4 on skl_n88l25_s4567 Kuninori Morimoto
  2020-01-15  1:41     ` Pierre-Louis Bossart
@ 2020-01-15 11:59     ` ojab //
  1 sibling, 0 replies; 11+ messages in thread
From: ojab // @ 2020-01-15 11:59 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: alsa-devel

On Wed, Jan 15, 2020 at 3:23 AM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> I guess your kernel is telling some message like this ?
>
>         ASoC: no dapm match for %s --> %s --> %s

No such entries on both 5.3 & 5.4 kernels, but I hope needed dmesg
excerpts can be found in alsa-info.sh output.

//wbr ojab
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [alsa-devel] No sound since 5.4 on skl_n88l25_s4567
  2020-01-15 11:57       ` ojab //
@ 2020-01-15 15:07         ` Pierre-Louis Bossart
  2020-01-15 17:54           ` ojab //
  0 siblings, 1 reply; 11+ messages in thread
From: Pierre-Louis Bossart @ 2020-01-15 15:07 UTC (permalink / raw)
  To: ojab //; +Cc: alsa-devel, Ranjani Sridharan, Kuninori Morimoto

[-- Attachment #1: Type: text/plain, Size: 898 bytes --]



On 1/15/20 5:57 AM, ojab // wrote:
> On Wed, Jan 15, 2020 at 4:41 AM Pierre-Louis Bossart
> <pierre-louis.bossart@linux.intel.com> wrote:
>> Please post the results of alsa-info.sh somewhere so that we can take a
>> look.

Thanks, I think that confirms my theory.

> 5.3.0: http://alsa-project.org/db/?f=d82b3ef237a5050dfb73231ba114e45a6a4420ef

In this case, there's a warning on the routes:

[   22.364318] skl_n88l25_s4567 skl_n88l25_s4567: ASoC: Failed to add 
route iDisp3_out -> direct -> iDisp3 Tx

> 5.4.0: http://alsa-project.org/db/?f=d922b77306a1287eae3624d241f3d46d347c8098

And we know that in 5.4 errors on routes caused the card registration to 
stop. I *think* the patch was  daa480bde6b3a9 ("ASoC: soc-core: tidyup 
for snd_soc_dapm_add_routes()")

This patch won't revert cleanly, can you try the following hack on v5.4 
to see if this improves the card registration? Thanks!



[-- Attachment #2: routes.diff --]
[-- Type: text/x-patch, Size: 1107 bytes --]

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 88978a3036c4..796d14feab4d 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1076,8 +1076,8 @@ static int soc_probe_component(struct snd_soc_card *card,
 	ret = snd_soc_dapm_add_routes(dapm,
 				      component->driver->dapm_routes,
 				      component->driver->num_dapm_routes);
-	if (ret < 0)
-		goto err_probe;
+	//if (ret < 0)
+	//	goto err_probe;
 
 	/* see for_each_card_components */
 	list_add(&component->card_list, &card->component_dev_list);
@@ -2065,13 +2065,13 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
 
 	ret = snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes,
 				      card->num_dapm_routes);
-	if (ret < 0)
-		goto probe_end;
+	//if (ret < 0)
+	//	goto probe_end;
 
 	ret = snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
-				      card->num_of_dapm_routes);
-	if (ret < 0)
-		goto probe_end;
+					      card->num_of_dapm_routes);
+	//if (ret < 0)
+	//	goto probe_end;
 
 	/* try to set some sane longname if DMI is available */
 	snd_soc_set_dmi_name(card, NULL);

[-- Attachment #3: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [alsa-devel] No sound since 5.4 on skl_n88l25_s4567
  2020-01-15 15:07         ` Pierre-Louis Bossart
@ 2020-01-15 17:54           ` ojab //
  2020-01-15 19:38             ` Pierre-Louis Bossart
  0 siblings, 1 reply; 11+ messages in thread
From: ojab // @ 2020-01-15 17:54 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: alsa-devel, Ranjani Sridharan, Kuninori Morimoto

On Wed, Jan 15, 2020 at 6:07 PM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
> This patch won't revert cleanly, can you try the following hack on v5.4
> to see if this improves the card registration? Thanks!


Yep, it works with the patch.

//wbr ojab
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [alsa-devel] No sound since 5.4 on skl_n88l25_s4567
  2020-01-15 17:54           ` ojab //
@ 2020-01-15 19:38             ` Pierre-Louis Bossart
  2020-01-16  0:32               ` Kuninori Morimoto
  0 siblings, 1 reply; 11+ messages in thread
From: Pierre-Louis Bossart @ 2020-01-15 19:38 UTC (permalink / raw)
  To: ojab //; +Cc: alsa-devel, Ranjani Sridharan, Kuninori Morimoto


>> This patch won't revert cleanly, can you try the following hack on v5.4
>> to see if this improves the card registration? Thanks!
> 
> 
> Yep, it works with the patch.

ok, thanks for testing! So that leaves us with two options:

a) remove the error handling after soc_dapm_add_routes() to be backwards 
compatible with Intel problematic machine drivers. Not really nice for 
everyone else.

b) remove this error conditionally so that legacy Intel solutions still 
work but new ones deal with errors upfront.

I am not sure if there's a 'clean' way to implement b), maybe with a 
Kconfig selected by some machine drivers? Morimito-san, any suggestions 
now that we've root caused the problem (copied again below for reference)?


diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 88978a3036c4..796d14feab4d 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1076,8 +1076,8 @@ static int soc_probe_component(struct snd_soc_card 
*card,
         ret = snd_soc_dapm_add_routes(dapm,
                                       component->driver->dapm_routes,
                                       component->driver->num_dapm_routes);
-       if (ret < 0)
-               goto err_probe;
+       //if (ret < 0)
+       //      goto err_probe;

         /* see for_each_card_components */
         list_add(&component->card_list, &card->component_dev_list);
@@ -2065,13 +2065,13 @@ static int snd_soc_instantiate_card(struct 
snd_soc_card *card)

         ret = snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes,
                                       card->num_dapm_routes);
-       if (ret < 0)
-               goto probe_end;
+       //if (ret < 0)
+       //      goto probe_end;

         ret = snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
-                                     card->num_of_dapm_routes);
-       if (ret < 0)
-               goto probe_end;
+                                             card->num_of_dapm_routes);
+       //if (ret < 0)
+       //      goto probe_end;

         /* try to set some sane longname if DMI is available */
         snd_soc_set_dmi_name(card, NULL);
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [alsa-devel] No sound since 5.4 on skl_n88l25_s4567
  2020-01-15 19:38             ` Pierre-Louis Bossart
@ 2020-01-16  0:32               ` Kuninori Morimoto
  2020-01-16  1:04                 ` Pierre-Louis Bossart
  0 siblings, 1 reply; 11+ messages in thread
From: Kuninori Morimoto @ 2020-01-16  0:32 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: Linux-ALSA, Mark Brown, ojab //, Ranjani Sridharan


Hi Pierre-Louis
Cc Mark

> a) remove the error handling after soc_dapm_add_routes() to be
> backwards compatible with Intel problematic machine drivers. Not
> really nice for everyone else.
> 
> b) remove this error conditionally so that legacy Intel solutions
> still work but new ones deal with errors upfront.
> 
> I am not sure if there's a 'clean' way to implement b), maybe with a
> Kconfig selected by some machine drivers? Morimito-san, any
> suggestions now that we've root caused the problem (copied again below
> for reference)?

Is it possible to *real* fixup in the future, some day ?
We need correct code, but backward compatibility is also needed.
Not only Intel but some machine might have similar issue,
so, how about to indicate WARNING, and comment ?

Like this

         ret = snd_soc_dapm_add_routes(dapm,
                                       component->driver->dapm_routes,
                                       component->driver->num_dapm_routes);
        if (ret < 0)
 -               goto err_probe;
 +               /*
 +                * This is error, but legacy Intel want
 +                * compatibility until xxxx.
 +                * call "goto err_probe" after that
 +                */
 +               dev_warn(dev, "DAPM route add failed.")

Thank you for your help !!
Best regards
---
Kuninori Morimoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [alsa-devel] No sound since 5.4 on skl_n88l25_s4567
  2020-01-16  0:32               ` Kuninori Morimoto
@ 2020-01-16  1:04                 ` Pierre-Louis Bossart
  2020-01-16  1:42                   ` Kuninori Morimoto
  2020-01-16 14:57                   ` Mark Brown
  0 siblings, 2 replies; 11+ messages in thread
From: Pierre-Louis Bossart @ 2020-01-16  1:04 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, ojab //, Ranjani Sridharan



>> a) remove the error handling after soc_dapm_add_routes() to be
>> backwards compatible with Intel problematic machine drivers. Not
>> really nice for everyone else.
>>
>> b) remove this error conditionally so that legacy Intel solutions
>> still work but new ones deal with errors upfront.
>>
>> I am not sure if there's a 'clean' way to implement b), maybe with a
>> Kconfig selected by some machine drivers? Morimito-san, any
>> suggestions now that we've root caused the problem (copied again below
>> for reference)?
> 
> Is it possible to *real* fixup in the future, some day ?

Quite unlikely I am afraid. This is a mismatch between topology and 
machine driver, and there are no planned updates of those topologies 
(which were never released for upstream use).

In this case I guess the topology file was taken from a ChromeOS 
distribution (based on v4.4 IIRC), so there's really no guarantee that a 
fix would ever reach the user without a convoluted set of manual updates.

> We need correct code, but backward compatibility is also needed.
> Not only Intel but some machine might have similar issue,
> so, how about to indicate WARNING, and comment ?
> 
> Like this
> 
>           ret = snd_soc_dapm_add_routes(dapm,
>                                         component->driver->dapm_routes,
>                                         component->driver->num_dapm_routes);
>          if (ret < 0)
>   -               goto err_probe;
>   +               /*
>   +                * This is error, but legacy Intel want
>   +                * compatibility until xxxx.
>   +                * call "goto err_probe" after that
>   +                */
>   +               dev_warn(dev, "DAPM route add failed.")

we already had a warning before:

[   22.364318] skl_n88l25_s4567 skl_n88l25_s4567: ASoC: Failed to add 
route iDisp3_out -> direct -> iDisp3 Tx

and it was ignored since there was no functional impact....

Maybe we could have some sort of boolean flag in the component->driver 
definition and explicitly request a backwards-compatible behavior (e.g. 
for all SKL/KBL machine drivers) when that driver is known to be flaky. 
There's already things like 'fully_routed', maybe we can add something 
such as 'disable_route_check'?
		
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [alsa-devel] No sound since 5.4 on skl_n88l25_s4567
  2020-01-16  1:04                 ` Pierre-Louis Bossart
@ 2020-01-16  1:42                   ` Kuninori Morimoto
  2020-01-16 14:57                   ` Mark Brown
  1 sibling, 0 replies; 11+ messages in thread
From: Kuninori Morimoto @ 2020-01-16  1:42 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: Linux-ALSA, Mark Brown, ojab //, Ranjani Sridharan


Hi Pierre-Louis, Mark

> > Is it possible to *real* fixup in the future, some day ?
> 
> Quite unlikely I am afraid. This is a mismatch between topology and
> machine driver, and there are no planned updates of those topologies
> (which were never released for upstream use).
> 
> In this case I guess the topology file was taken from a ChromeOS
> distribution (based on v4.4 IIRC), so there's really no guarantee that
> a fix would ever reach the user without a convoluted set of manual
> updates.
(snip)
> Maybe we could have some sort of boolean flag in the component->driver
> definition and explicitly request a backwards-compatible behavior
> (e.g. for all SKL/KBL machine drivers) when that driver is known to be
> flaky. There's already things like 'fully_routed', maybe we can add
> something such as 'disable_route_check'?

Hmm...
I have no idea, but have no objection about this.


Thank you for your help !!
Best regards
---
Kuninori Morimoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [alsa-devel] No sound since 5.4 on skl_n88l25_s4567
  2020-01-16  1:04                 ` Pierre-Louis Bossart
  2020-01-16  1:42                   ` Kuninori Morimoto
@ 2020-01-16 14:57                   ` Mark Brown
  1 sibling, 0 replies; 11+ messages in thread
From: Mark Brown @ 2020-01-16 14:57 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: Linux-ALSA, ojab //, Kuninori Morimoto, Ranjani Sridharan

[-- Attachment #1.1: Type: text/plain, Size: 482 bytes --]

On Wed, Jan 15, 2020 at 07:04:48PM -0600, Pierre-Louis Bossart wrote:

> Maybe we could have some sort of boolean flag in the component->driver
> definition and explicitly request a backwards-compatible behavior (e.g. for
> all SKL/KBL machine drivers) when that driver is known to be flaky. There's
> already things like 'fully_routed', maybe we can add something such as
> 'disable_route_check'?

A quirk for old stuff that can't be fixed sounds like a sensible
solution to this.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, back to index

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAKzrAgTD2oeyajKGOaPea98vZ-uKJOn6uOqABA+CKtpvYpWYvQ@mail.gmail.com>
     [not found] ` <CAKzrAgTCE4btXr04pkvLUG6PPbtn9dm5h_9rjqDYG0HrTZ0zbg@mail.gmail.com>
2020-01-15  0:23   ` [alsa-devel] No sound since 5.4 on skl_n88l25_s4567 Kuninori Morimoto
2020-01-15  1:41     ` Pierre-Louis Bossart
2020-01-15 11:57       ` ojab //
2020-01-15 15:07         ` Pierre-Louis Bossart
2020-01-15 17:54           ` ojab //
2020-01-15 19:38             ` Pierre-Louis Bossart
2020-01-16  0:32               ` Kuninori Morimoto
2020-01-16  1:04                 ` Pierre-Louis Bossart
2020-01-16  1:42                   ` Kuninori Morimoto
2020-01-16 14:57                   ` Mark Brown
2020-01-15 11:59     ` ojab //

Alsa-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/alsa-devel/0 alsa-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 alsa-devel alsa-devel/ https://lore.kernel.org/alsa-devel \
		alsa-devel@alsa-project.org
	public-inbox-index alsa-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.alsa-project.alsa-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git