Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* compress: dpcm_path_get called in wrong place
@ 2014-03-07  7:52 noman pouigt
  2014-03-07 18:28 ` Liam Girdwood
  0 siblings, 1 reply; 2+ messages in thread
From: noman pouigt @ 2014-03-07  7:52 UTC (permalink / raw)
  To: Vinod Koul, liam.r.girdwood, Lars-Peter Clausen
  Cc: alsa-devel, pierre-louis.bossart

Shouldn't  dpcm_path_get be called earlier ? I think it should be
called earlier as happens in soc-pcm file.

static int soc_compr_open_fe(struct snd_compr_stream *cstream)
{

if (dpcm_path_get(fe, stream, &list) <= 0) {
dev_dbg(fe->dev, "ASoC: %s no valid %s route\n",
fe->dai_link->name, stream ? "capture" : "playback");

In current code we open platform driver and then machine startup function
gets called. After this we check for valid path which i think should happen
earlier i.e. in the beginning of soc_compr_open_fe function.

If you agree, then i will send a patch.

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

* Re: compress: dpcm_path_get called in wrong place
  2014-03-07  7:52 compress: dpcm_path_get called in wrong place noman pouigt
@ 2014-03-07 18:28 ` Liam Girdwood
  0 siblings, 0 replies; 2+ messages in thread
From: Liam Girdwood @ 2014-03-07 18:28 UTC (permalink / raw)
  To: noman pouigt
  Cc: Vinod Koul, Lars-Peter Clausen, Mark Brown, alsa-devel,
	pierre-louis.bossart

On Thu, 2014-03-06 at 23:52 -0800, noman pouigt wrote:
> Shouldn't  dpcm_path_get be called earlier ? I think it should be
> called earlier as happens in soc-pcm file.
> 
> static int soc_compr_open_fe(struct snd_compr_stream *cstream)
> {
> 
> if (dpcm_path_get(fe, stream, &list) <= 0) {
> dev_dbg(fe->dev, "ASoC: %s no valid %s route\n",
> fe->dai_link->name, stream ? "capture" : "playback");
> 
> In current code we open platform driver and then machine startup function
> gets called. After this we check for valid path which i think should happen
> earlier i.e. in the beginning of soc_compr_open_fe function.
> 
> If you agree, then i will send a patch.

I don't think it's making any difference atm, but for consistency with
dpcm_fe_dai_open() we could re-order. Fwiw, the open functions don't use
any data from the path check yet, but I suppose they could in the
future. Please submit a patch and also CC Mark Brown with your patch.

Thanks

Liam

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

end of thread, other threads:[~2014-03-07 18:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-07  7:52 compress: dpcm_path_get called in wrong place noman pouigt
2014-03-07 18:28 ` Liam Girdwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox