Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2138346ybg; Thu, 30 Jul 2020 11:15:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQQXMSAVpZ7ulx0AeTFZ2F1B+U721AXsTJPkNzlCvgMN8puDQgxT3fovbDEDt/qvIzuTWS X-Received: by 2002:a17:906:aad2:: with SMTP id kt18mr299837ejb.537.1596132902333; Thu, 30 Jul 2020 11:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596132902; cv=none; d=google.com; s=arc-20160816; b=ngXOZ4PfIyG9Jn6VRjyg+70vQ2qfFGIJMgfgF6swi1G9fy2016VWJcxzjHS/YS6F7k 6nAhkIvFarfJEVwc80XC5qzAYpbrIjcY+xEaaK/CghZwGSfaGt/EHMXJfBcLR8sa3eyL X3cE+N7648JnzeWN27yg2bDRNkoXCIpSstZLc1S1SX3kK43oKkXzUEY/qrksGfINWg/B xtuoZg4d+dydZIkR140UWWczCCVx3LezamvaXpnlKqKtIhu3XLc1F4hYgcuu8JkYQing rOlkEAfEbHGo4OXHECSc7beRm6z7+f8i1NK6ct6FBND2JiAlquT/3q+/H1LHOeP7i+FE C5MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2h64dTmCH63W6XEG2w6fjVBH+8b5D14kYrdgZFrNHGY=; b=d9hO1Jns3KOz/yg9igUwsfBf96wG9Bvn9iQZO2mEOGODuXgfWZnoP9bc8F10+h6ppl ZcxU1Ood+ARgjxGwXXa/B1SpGL+Y3O5LWAQTZIqgrSU9rfaDrt9SA9Y6PExhU1P8AYTt 88gd3o8G6sPACB4R6T7N6Z3c0tdo93iuMwkSxiae8ObdjXr6cIypwj1pq4snisNep4Jh ex60ZYahKpknguFX6TEM2SV6iGG6ieoP5IGOZI7tWvrPGfn49nDSExy5ZvWTVkQ5s+4Y 5mxr79rSzKOaE9YoCg9zUvFuqIvc1i6K5qJ8ZAT8qPG5g4IiKyXBWUzR4FAM+euiDsuM j7MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qEBcihMz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u25si3660132eje.33.2020.07.30.11.14.39; Thu, 30 Jul 2020 11:15:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qEBcihMz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727099AbgG3SNS (ORCPT + 99 others); Thu, 30 Jul 2020 14:13:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:50410 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726343AbgG3SNS (ORCPT ); Thu, 30 Jul 2020 14:13:18 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B5C6D20829; Thu, 30 Jul 2020 18:13:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596132797; bh=vIJFWrnXpMFHH8EimughuB8y+lmfzGjAgR03PPlEdOk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qEBcihMz9YjzJB2lwWShh3zEfgGGSl291HW4Zvh8Bc18dbNAvzbYgPG/tHuiihSBU jjyvar5wpDBOzT+X6soS9Ny2YyOBoVvbauv+mEFSwlpyjzsq/Si73sVCsUvBl3ZzTG rGdennpMtSdGeT66ngzeEAffDlKV9bHKCyxk6RyY= Date: Thu, 30 Jul 2020 19:12:57 +0100 From: Mark Brown To: Jerome Brunet Cc: Pierre-Louis Bossart , Liam Girdwood , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Kevin Hilman , zhangn1985@outlook.com, Stephan Gerhold Subject: Re: [PATCH] ASoC: core: restore dpcm flags semantics Message-ID: <20200730181257.GF5055@sirena.org.uk> References: <20200723180533.220312-1-pierre-louis.bossart@linux.intel.com> <20200729154639.1983854-1-jbrunet@baylibre.com> <2ad13f95-434d-376a-bc38-b209623b461e@linux.intel.com> <1jft998jbe.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="udcq9yAoWb9A4FsZ" Content-Disposition: inline In-Reply-To: <1jft998jbe.fsf@starbuckisacylon.baylibre.com> X-Cookie: Alex Haley was adopted! User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --udcq9yAoWb9A4FsZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 30, 2020 at 11:04:53AM +0200, Jerome Brunet wrote: > Carrying redundant information makes things complex and error prone. > If you really want to update this, here is another proposition: > * Removing snd_soc_dai_link_set_capabilities() > * Removing both flags completely > * Let ASoC figure out what is needed based on the components present. My understanding is that that was broadly where we were headed with this stuff - snd_soc_dai_link_set_capabilities() is trying to figure things out from the components already, it's storing the flags as a cache but could be modified so we use it every time we need a value. >=20 > > > >> > >> Cc: Pierre-Louis Bossart > >> Signed-off-by: Jerome Brunet > >> --- > >> > >> Hi Mark, > >> > >> Because b73287f0b0745 ('ASoC: soc-pcm: dpcm: fix playback/capture ch= ecks') > >> introduced more than one problem, the change > >> "ASoC: core: use less strict tests for dailink capabilities" [0] is = still > >> necessary but the change of semantic remains a problem with it. > >> > >> This patch applies on top of it. > >> > >> sound/soc/soc-pcm.c | 14 -------------- > >> 1 file changed, 14 deletions(-) > >> > >> diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c > >> index 00ac1cbf6f88..2e205b738eae 100644 > >> --- a/sound/soc/soc-pcm.c > >> +++ b/sound/soc/soc-pcm.c > >> @@ -2749,13 +2749,6 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd= , int num) > >> break; > >> } > >> } > >> - > >> - if (!playback) { > >> - dev_err(rtd->card->dev, > >> - "No CPU DAIs support playback for stream %s\n", > >> - rtd->dai_link->stream_name); > >> - return -EINVAL; > >> - } > >> } > >> if (rtd->dai_link->dpcm_capture) { > >> stream =3D SNDRV_PCM_STREAM_CAPTURE; > >> @@ -2766,13 +2759,6 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd= , int num) > >> break; > >> } > >> } > >> - > >> - if (!capture) { > >> - dev_err(rtd->card->dev, > >> - "No CPU DAIs support capture for stream %s\n", > >> - rtd->dai_link->stream_name); > >> - return -EINVAL; > >> - } > >> } > >> } else { > >> /* Adapt stream for codec2codec links */ > >> >=20 --udcq9yAoWb9A4FsZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl8jDagACgkQJNaLcl1U h9AuXgf8C4yoy4FY4cfbvcLUvUftWpBQ68HnBjmmDssWMcnsYPZ7eZAuo12Pivif aUOrt8CMxCHQ2wDuoSwzLRNhAIHNUMBwGqLwTiLtT5vivhKDjZjnZqjtkswHWb2T fJMyArIjKroVQWjmOkarx4gjKfx5mfv1RZmS3xnNvyD+YVY6AcCaITZuEo7j86td QN1iHXQ1TPJI0wcql4Y3PEVkLC0O7F+4pReUCugbsPAfjTPvUc63KMfbtqzpQeov WYBOnSzQyhJyeaT7YC9AaiGLgWcHq8o1TrmtQT+DD/qZotxlGOcaxx9GgHdkM3mq X1YVKyKa3/VCh1h9xxE1P38ZSeo0qA== =y7TQ -----END PGP SIGNATURE----- --udcq9yAoWb9A4FsZ--