Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24A32C2BA2B for ; Thu, 16 Apr 2020 20:52:30 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A51B02054F for ; Thu, 16 Apr 2020 20:52:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="IO+iMhl4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A51B02054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EB3B515E4; Thu, 16 Apr 2020 22:51:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EB3B515E4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1587070348; bh=79asucDXdhLpbOJ69I296G/1PIqyk/hWN4rcCmdnFTE=; h=From:Subject:To:References:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=IO+iMhl4GHXQ56Y2jsOn5YOz2l11f676Q6FALuWbZx76KuErEhSrTJbknVoeaX0BG LJr+5XXNgEmkTeJQ2vZTnluXbU+cCLDEkPjzvFEuh0EvtlREt//cdM0TC3WIPtsh2n tRQPeyWHjD7YN2TFPfP4gLo8xqV3ehk1Qp0YYbJs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 43566F8013D; Thu, 16 Apr 2020 22:51:37 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C3085F8014E; Thu, 16 Apr 2020 22:51:34 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 60C64F8012E for ; Thu, 16 Apr 2020 22:51:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 60C64F8012E IronPort-SDR: FeT+R7CTXwmoW+pSujJn/NV99yUoqo1NAuE/9s6wVd8rIDpvrSKjTGZBpvVdq7Rs6TigRMe7Sv df+jAytn0mCw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2020 13:51:25 -0700 IronPort-SDR: AsoYwv8ry0Y5O13ttEOTJSWzbdmr+B9NzA2oriGRnmNOtPEkUvl2GW1CankfzMeZ4nwXsn6G6d X2VrhMiTiLxQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,392,1580803200"; d="scan'208";a="242779835" Received: from atrikali-mobl.amr.corp.intel.com (HELO [10.254.59.97]) ([10.254.59.97]) by orsmga007.jf.intel.com with ESMTP; 16 Apr 2020 13:51:24 -0700 From: Pierre-Louis Bossart Subject: Re: [PATCH] ASoC: soc-pcm: dpcm: Only allow playback/capture if supported To: Stephan Gerhold , Mark Brown References: <20200415104928.86091-1-stephan@gerhold.net> Message-ID: <61ccf27d-a511-b3a4-2da7-56edb01b24c6@linux.intel.com> Date: Thu, 16 Apr 2020 15:51:23 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200415104928.86091-1-stephan@gerhold.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Cc: alsa-devel@alsa-project.org, Srinivas Kandagatla , Liam Girdwood , ~postmarketos/upstreaming@lists.sr.ht X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" > diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c > index 454735f8fa92..77a680da366f 100644 > --- a/sound/soc/soc-pcm.c > +++ b/sound/soc/soc-pcm.c > @@ -2911,8 +2911,17 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) > int i; > > if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { > - playback = rtd->dai_link->dpcm_playback; > - capture = rtd->dai_link->dpcm_capture; > + cpu_dai = asoc_rtd_to_cpu(rtd, 0); > + if (rtd->num_cpus > 1) { > + dev_err(rtd->dev, > + "DPCM doesn't support Multi CPU yet\n"); > + return -EINVAL; > + } > + > + playback = rtd->dai_link->dpcm_playback && > + snd_soc_dai_stream_valid(cpu_dai, SNDRV_PCM_STREAM_PLAYBACK); > + capture = rtd->dai_link->dpcm_capture && > + snd_soc_dai_stream_valid(cpu_dai, SNDRV_PCM_STREAM_CAPTURE); This commit introduces major regressions with SOF on CherryTrail and Broadwell: [ 25.705750] SSP2-Codec: ASoC: no backend playback stream [ 27.923378] SSP2-Codec: ASoC: no users playback at close - state it's likely due to the check for min_channels > 0 in snd_soc_dai_stream_valid(), which wasn't a requirement before. We are testing a fix [1] but other users of DPCM might be impacted. Mark, this commit is on your for-5.7 branch but not on for-next? Not sure which SHA1 to use for the Fixes: tag [1] https://github.com/thesofproject/linux/pull/2018/commits/4fa10638dca8aad7a320e85cc3e00b179b8de410