From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA154C6FD1C for ; Tue, 14 Mar 2023 16:16:12 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1D0AE1336; Tue, 14 Mar 2023 17:15:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1D0AE1336 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678810570; bh=V6U675NRIIcVCoUxfsyJbXikofxVtHsIk28ldvKqnEI=; h=Date:Subject:To:References:From:In-Reply-To:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=mdYPYP3WTeJwLqFIqqHPO22B37g/JhI1tqCEIXrNo85DtZL48O5ApmDdouBEEhhEu OiXYAi4VCbcRde1squ66JcJ+9wbIknP1QdV6OF9Jn0XfXRr9NauakLl72l0PsjWz1D Vq1Mandsjbx0ILW8hw3MnVYTOW6IT9SOD4nbTOd0= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E022DF80425; Tue, 14 Mar 2023 17:14:58 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 85036F80425; Tue, 14 Mar 2023 17:14:54 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C9AACF80272 for ; Tue, 14 Mar 2023 17:14:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C9AACF80272 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=fFzqHPUO DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678810492; x=1710346492; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=V6U675NRIIcVCoUxfsyJbXikofxVtHsIk28ldvKqnEI=; b=fFzqHPUOJ3yUVt61RuL14rwvbxL8kfkbe0/dxl4TlJBYuLW1Ra7+lBnb NVAL+88xvQXFrQ3vpEQx/SNtZtCzYvBCncbyQY2sbF9N/M+O8Ev3rkDPh 0IlLEFsQBzQx7x5ZxQD2fjjbFl3KkVbd8D9TCfg/RIB0kLlADPW3mVBPd PYzFvboKVO1YMqfAHmAlRnBpq6h/H8ZkILV50YGOuxdcezqnpZgjqd8FE sTrrwFTuvykRN1DIV//ayqS6dOkq5Q4c2Twxso9gVtyrcNf1srsCeUwxR IRrW8HSIcgArgtHOWCj3CfJZRVxCZmh8V7wLLmS0Y0WiEb6ewvFfh8niA Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="339015236" X-IronPort-AV: E=Sophos;i="5.98,260,1673942400"; d="scan'208";a="339015236" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2023 09:14:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="802922318" X-IronPort-AV: E=Sophos;i="5.98,260,1673942400"; d="scan'208";a="802922318" Received: from hsaquing-mobl.amr.corp.intel.com (HELO [10.255.35.31]) ([10.255.35.31]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2023 09:14:47 -0700 Message-ID: <6d9d09aa-d83e-e811-1d43-34780ea05d4d@linux.intel.com> Date: Tue, 14 Mar 2023 11:14:46 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.8.0 Subject: Re: [PATCH] ASoC: soc-compress: Inherit atomicity from DAI link for Compress FE Content-Language: en-US To: Daniel Baluta , broonie@kernel.org, alsa-devel@alsa-project.org References: <20230314153409.1805280-1-daniel.baluta@oss.nxp.com> From: Pierre-Louis Bossart In-Reply-To: <20230314153409.1805280-1-daniel.baluta@oss.nxp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Message-ID-Hash: XF7567GRI6PHJDCQV7VNEZAAFM5EYCTB X-Message-ID-Hash: XF7567GRI6PHJDCQV7VNEZAAFM5EYCTB X-MailFrom: pierre-louis.bossart@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: lgirdwood@gmail.com, kai.vehmanen@linux.intel.com, ranjani.sridharan@linux.intel.com, linux-kernel@vger.kernel.org, daniel.baluta@gmail.com, paul.olaru@nxp.com X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 3/14/23 10:34, Daniel Baluta wrote: > From: Daniel Baluta > > After commit bbf7d3b1c4f40 ("ASoC: soc-pcm: align BE 'atomicity' with > that of the FE") BE and FE atomicity must match. > > In the case of Compress PCM there is a mismatch in atomicity between FE > and BE and we get errors like this: > > [ 36.434566] sai1-wm8960-hifi: dpcm_be_connect: FE is atomic but BE > is nonatomic, invalid configuration Not clear on the 'FE is atomic' in the case of a compressed stream, which has to be handled with some sort of IPC, i.e. be nonatomic. Also not sure why the FE is not set as nonatomic by the SOF parts? If it's needed for PCM, why wouldn't it be needed for compressed data? > [ 36.444278] PCM Deep Buffer: ASoC: can't connect SAI1.OUT > > In order to fix this we must inherit the atomicity from DAI link > associated with current PCM Compress FE. > > Fixes: bbf7d3b1c4f4 ("ASoC: soc-pcm: align BE 'atomicity' with that of the FE") > Signed-off-by: Daniel Baluta > --- > sound/soc/soc-compress.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c > index e7aa6f360cab..d649b0cf4744 100644 > --- a/sound/soc/soc-compress.c > +++ b/sound/soc/soc-compress.c > @@ -622,6 +622,9 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) > return ret; > } > > + /* inherit atomicity from DAI link */ > + be_pcm->nonatomic = rtd->dai_link->nonatomic; > + > rtd->pcm = be_pcm; > rtd->fe_compr = 1; > if (rtd->dai_link->dpcm_playback)