From mboxrd@z Thu Jan 1 00:00:00 1970 From: Liam Girdwood Subject: Re: compress: dpcm_path_get called in wrong place Date: Fri, 07 Mar 2014 18:28:59 +0000 Message-ID: <1394216939.2419.37.camel@loki> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by alsa0.perex.cz (Postfix) with ESMTP id 12A6726524F for ; Fri, 7 Mar 2014 19:29:36 +0100 (CET) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: noman pouigt Cc: Vinod Koul , Lars-Peter Clausen , Mark Brown , alsa-devel@alsa-project.org, pierre-louis.bossart@linux.intel.com List-Id: alsa-devel@alsa-project.org 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