alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [alsa-devel] Converting a non BE to BE inside soc_check_tplg_fes
@ 2019-11-25 16:45 Daniel Baluta
  2019-11-26 15:32 ` Liam Girdwood
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Baluta @ 2019-11-25 16:45 UTC (permalink / raw)
  To: Sridharan, Ranjani, Liam Girdwood
  Cc: Linux-ALSA, sof, Pierre-Louis Bossart, sound-open-firmware

Hi all,

I am trying how a non-BE link is converted to a BE link
inside soc_check_tplg_fes.

soc_check_tplg_fes
=> for all components that have ignore_machine setup to card name
     => dai_link->platforms->name = component->name;
     => dai_link->no_pcm = 1;

But the thing is that the link is a true non-DPCM link, than fields
like dpcm_playback/dpcm_capture are not set and playback/record
substreams are no created.

The question is: is this supposed to be working with non-DPCM links?
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [alsa-devel] Converting a non BE to BE inside soc_check_tplg_fes
  2019-11-25 16:45 [alsa-devel] Converting a non BE to BE inside soc_check_tplg_fes Daniel Baluta
@ 2019-11-26 15:32 ` Liam Girdwood
  2019-11-26 16:23   ` Daniel Baluta
  2019-11-26 21:20   ` Daniel Baluta
  0 siblings, 2 replies; 5+ messages in thread
From: Liam Girdwood @ 2019-11-26 15:32 UTC (permalink / raw)
  To: Daniel Baluta, Sridharan, Ranjani
  Cc: Linux-ALSA, sof, Pierre-Louis Bossart, sound-open-firmware

On Mon, 2019-11-25 at 18:45 +0200, Daniel Baluta wrote:
> Hi all,
> 
> I am trying how a non-BE link is converted to a BE link
> inside soc_check_tplg_fes.
> 
> soc_check_tplg_fes
> => for all components that have ignore_machine setup to card name
>      => dai_link->platforms->name = component->name;
>      => dai_link->no_pcm = 1;
> 
> But the thing is that the link is a true non-DPCM link, than fields
> like dpcm_playback/dpcm_capture are not set and playback/record
> substreams are no created.

These fields should be being populated by topology since they are
runtime configuration on a non DPCM PCM device. 

> 
> The question is: is this supposed to be working with non-DPCM links?

Yes, it "should do" and did when I last tested - there were some non
DPCM Intel machine drivers that needed to work (grep -L no_pcm
sound/soc/intel/boards/*.c), but I am not as up to date as other on the
SOF driver core now. So if it's not working, it could be a regression
(as these non DPCM boards are not used now IIRC).

Liam

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

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

* Re: [alsa-devel] Converting a non BE to BE inside soc_check_tplg_fes
  2019-11-26 15:32 ` Liam Girdwood
@ 2019-11-26 16:23   ` Daniel Baluta
  2019-11-26 21:20   ` Daniel Baluta
  1 sibling, 0 replies; 5+ messages in thread
From: Daniel Baluta @ 2019-11-26 16:23 UTC (permalink / raw)
  To: Liam Girdwood
  Cc: Linux-ALSA, Sridharan, Ranjani, sof, Pierre-Louis Bossart,
	sound-open-firmware

Thanks Liam for your answer! Some comments inside:

On Tue, Nov 26, 2019 at 5:32 PM Liam Girdwood
<liam.r.girdwood@linux.intel.com> wrote:
>
> On Mon, 2019-11-25 at 18:45 +0200, Daniel Baluta wrote:
> > Hi all,
> >
> > I am trying how a non-BE link is converted to a BE link
> > inside soc_check_tplg_fes.
> >
> > soc_check_tplg_fes
> > => for all components that have ignore_machine setup to card name
> >      => dai_link->platforms->name = component->name;
> >      => dai_link->no_pcm = 1;
> >
> > But the thing is that the link is a true non-DPCM link, than fields
> > like dpcm_playback/dpcm_capture are not set and playback/record
> > substreams are no created.
>
> These fields should be being populated by topology since they are
> runtime configuration on a non DPCM PCM device.

Well looking at topology code (soc-topology.c) it looks like only newly
created links (and only FE links) get dpcm_playback/dpcm_capture set.

soc_tplg_fe_link_create
=> link->dynamic = 1;
=> link->dpcm_playback = le32_to_cpu(pcm->playback);

So, for an existing BE link, dpcm_playback/dpcm_capture are not touched.

>
> >
> > The question is: is this supposed to be working with non-DPCM links?

>
> Yes, it "should do" and did when I last tested - there were some non
> DPCM Intel machine drivers that needed to work (grep -L no_pcm
> sound/soc/intel/boards/*.c), but I am not as up to date as other on the
> SOF driver core now. So if it's not working, it could be a regression
> (as these non DPCM boards are not used now IIRC).

Oh, I see. Thanks for confirming that this works. I will dig through the history
to see what happen. Because I do think it is a regression.

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

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

* Re: [alsa-devel] Converting a non BE to BE inside soc_check_tplg_fes
  2019-11-26 15:32 ` Liam Girdwood
  2019-11-26 16:23   ` Daniel Baluta
@ 2019-11-26 21:20   ` Daniel Baluta
  2019-11-26 22:35     ` Pierre-Louis Bossart
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Baluta @ 2019-11-26 21:20 UTC (permalink / raw)
  To: Liam Girdwood
  Cc: Linux-ALSA, Sridharan, Ranjani, sof, Pierre-Louis Bossart,
	sound-open-firmware

Hi Liam,

I continued with the investigation and found really interesting
things. See below:

On Tue, Nov 26, 2019 at 5:32 PM Liam Girdwood
<liam.r.girdwood@linux.intel.com> wrote:
>
> On Mon, 2019-11-25 at 18:45 +0200, Daniel Baluta wrote:
> > Hi all,
> >
> > I am trying how a non-BE link is converted to a BE link
> > inside soc_check_tplg_fes.
> >
> > soc_check_tplg_fes
> > => for all components that have ignore_machine setup to card name
> >      => dai_link->platforms->name = component->name;
> >      => dai_link->no_pcm = 1;
> >
> > But the thing is that the link is a true non-DPCM link, than fields
> > like dpcm_playback/dpcm_capture are not set and playback/record
> > substreams are no created.
>
> These fields should be being populated by topology since they are
> runtime configuration on a non DPCM PCM device.
>
> >
> > The question is: is this supposed to be working with non-DPCM links?
>
> Yes, it "should do" and did when I last tested - there were some non
> DPCM Intel machine drivers that needed to work (grep -L no_pcm
> sound/soc/intel/boards/*.c), but I am not as up to date as other on the
> SOF driver core now. So if it's not working, it could be a regression
> (as these non DPCM boards are not used now IIRC).

Did you somehow tested it between March 27 and April 19. I think
in this window span it should have worked.

The history is like this:

commit 45f8cb57da0d7a9ead4b39d7f5def333a5b0c08b
Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Date:   Tue Mar 27 14:30:40 2018 +0100

    ASoC: core: Allow topology to override machine driver FE DAI link config.


This patch introduced the overriding FE capability. This patch
contains something like this;

+                       /* convert non BE into BE */
+                       dai_link->no_pcm = 1;
+                       dai_link->dpcm_playback = 1;
+                       dai_link->dpcm_capture = 1;

then the patch got reverted by:

commit 291bfb928863d496e25c785e132a8fbfb32341a8
Author: Mark Brown <broonie@kernel.org>
Date:   Thu Apr 19 12:14:10 2018 +0100

    ASoC: topology: Revert recent changes while boot errors are investigated

and then when it got reinstantiated with:

commit a655de808cbde6c58b3298e704d786b53f59fb5d
Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Date:   Mon Jul 2 16:59:54 2018 +0100

    ASoC: core: Allow topology to override machine driver FE DAI link config.

it does have some changes one of them is that
dpcm_playback/dpcm_capture are no longer
set.

+                       /* convert non BE into BE */
+                       dai_link->no_pcm = 1;

Do you remember what was the root cause that caused the crash?

I would like to re-add the following lines:

+                       dai_link->dpcm_playback = 1;
+                       dai_link->dpcm_capture = 1;

With these two lines added back the non-DPCM link works well for me.

Thanks a lot for your help.

Can someone at Intel test following machine drivers for SOF:

sound/soc/intel/boards/byt-max98090.c
sound/soc/intel/boards/byt-rt5640.c

I would expect them not to work for SOF case.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [alsa-devel] Converting a non BE to BE inside soc_check_tplg_fes
  2019-11-26 21:20   ` Daniel Baluta
@ 2019-11-26 22:35     ` Pierre-Louis Bossart
  0 siblings, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2019-11-26 22:35 UTC (permalink / raw)
  To: Daniel Baluta, Liam Girdwood
  Cc: Linux-ALSA, Sridharan, Ranjani, sof, sound-open-firmware


> Can someone at Intel test following machine drivers for SOF:
> 
> sound/soc/intel/boards/byt-max98090.c
> sound/soc/intel/boards/byt-rt5640.c
> 
> I would expect them not to work for SOF case.

these machine drivers are not supported with SOF.
We have better ones (chtmax98090_ti.c and bytcr_rt5640.c)
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

end of thread, other threads:[~2019-11-26 22:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-25 16:45 [alsa-devel] Converting a non BE to BE inside soc_check_tplg_fes Daniel Baluta
2019-11-26 15:32 ` Liam Girdwood
2019-11-26 16:23   ` Daniel Baluta
2019-11-26 21:20   ` Daniel Baluta
2019-11-26 22:35     ` Pierre-Louis Bossart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).