[alsa-devel] compress: dpcm_path_get called in wrong place

Liam Girdwood liam.r.girdwood at linux.intel.com
Fri Mar 7 19:28:59 CET 2014


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



More information about the Alsa-devel mailing list