From patchwork Wed Oct 14 06:19:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 11836883 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 649E0921 for ; Wed, 14 Oct 2020 06:25:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 32DDD22243 for ; Wed, 14 Oct 2020 06:25:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dwHMIL76"; dkim=temperror (0-bit key) header.d=sholland.org header.i=@sholland.org header.b="IuzzdR03"; dkim=temperror (0-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="dWrC20xv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32DDD22243 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IB7vl/yHvNjNr+997g6WM7+59hHACX3fRXYUNOn8+rc=; b=dwHMIL76XuCv9JBC89hB0+49h 1NH7Fnmb+d+xMT7zQX9pUQYSuvfXT1RaXzzs1BQA2hwI0v0/DnrTTwOHAuUFsRkJCQFID4f2gheU/ lWO5Rvvt6PSXkay8BPDWC4E3geBsZs5xObAyb+i2P8c8/NGD1KSPHPSma3a05JifGv6vvx8OjOqW2 DJZkMMKnRZpSO3QI/3d0Am7YUmreDuZL/7mhotnqmbC3IWf7HL60nS+1D7A+MsXPxRgC358BgE7nq mW4sclF6/CluYqAReHxi2YCCs86coz//WWnTxAK1778l0lnefkG152lgXBz5UcHpuVzQorJs9MKFf LtAmw7gpA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSa9P-0003Dc-0y; Wed, 14 Oct 2020 06:20:39 +0000 Received: from wnew2-smtp.messagingengine.com ([64.147.123.27]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSa8e-0002yO-6r for linux-arm-kernel@lists.infradead.org; Wed, 14 Oct 2020 06:19:59 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id AEB51D1E; Wed, 14 Oct 2020 02:19:46 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 14 Oct 2020 02:19:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=EqGca1O/37qL2 eEQTtuQjYXAemOTb/tmNMF84A0l+X8=; b=IuzzdR03YnZdmZDodg18o5RQVDTGN zCd1jGcGYLtt+rl5EwB4u/tsoY9zcaCeoKGaX43vN+oFq/gDYBuEFuvOflS0jxwB hysUbzKjdSJ3noTAp/wlQwogryGCnyQ2vi3hXyXpU5lNfiXEDRBLp3yeHMKCm7VF l1NMp0Fw6moIymbUPXnVMiuUVE8pwFWo2Y/+r3gySD/Q8GfAPTd8rALrnYVfgxxP TtFTCjR9oq1RVhqIx2a3wFtJSmphe53U6B8YgiTL9GHXEKAe9lWzYc1iGI1QDtea L00OsB2Js5liIUMpNEypiLNVzh+WtXJDcqCgWUXy4LGY0cCcyhCktq30Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=EqGca1O/37qL2eEQTtuQjYXAemOTb/tmNMF84A0l+X8=; b=dWrC20xv qEs40NO6dzLuCZGzeBmwkcVp26ne9cKiCNDgokcEULiB/F0UCh3n8rY5TyqUnNyp vBzxQEFiTYQEUrX7l+vc2gCwhonIhUb0FYYZQEHEmSvBJoks8i00MDiSQoH7J7dt zqIaaBIYtLZJjp1YQvLm+gtBVwk3t/pUhphWH2XI7ATte6mT8+n34lu7GF1v57Ew z96kHI7XlBFbL8EIPA2euKDDt7QUwA17xlOEEFID2Xqh3FHPwB0gig3fJtGXQhjN MU0JGLYScXQIDpzxJYIe6oFkczdIR/4Ust428e30JoPJxMUmhpKLkitvaSMc6KQa z62VfFvR2qpZEw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedriedtgddutdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucfkphepjedtrddufeehrddugeekrdduhedunecuvehluhhsthgvrhfuih iivgepjeenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhhuvghlsehshhholhhlrghn ugdrohhrgh X-ME-Proxy: Received: from titanium.stl.sholland.net (70-135-148-151.lightspeed.stlsmo.sbcglobal.net [70.135.148.151]) by mail.messagingengine.com (Postfix) with ESMTPA id 9F95B328005A; Wed, 14 Oct 2020 02:19:45 -0400 (EDT) From: Samuel Holland To: Mark Brown , Liam Girdwood , Maxime Ripard , Chen-Yu Tsai , Jaroslav Kysela , Takashi Iwai Subject: [PATCH v2 08/17] ASoC: sun8i-codec: Enforce symmetric DAI parameters Date: Wed, 14 Oct 2020 01:19:32 -0500 Message-Id: <20201014061941.4306-9-samuel@sholland.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201014061941.4306-1-samuel@sholland.org> References: <20201014061941.4306-1-samuel@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201014_021952_473099_24D34EC9 X-CRM114-Status: GOOD ( 11.86 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [64.147.123.27 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Samuel Holland Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The AIFs have a single register controlling DAI parameters in both directions, including BCLK/LRCK divisor and word size. The DAIs produce only noise or silence if any of these parameters is wrong. Therefore, we need to enforce symmetry for these parameters, so starting a new substream will not break an existing substream. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland --- sound/soc/sunxi/sun8i-codec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c index 49e763d1891b..21104e6e8892 100644 --- a/sound/soc/sunxi/sun8i-codec.c +++ b/sound/soc/sunxi/sun8i-codec.c @@ -420,16 +420,19 @@ static struct snd_soc_dai_driver sun8i_codec_dais[] = { /* playback capabilities */ .playback = { .stream_name = "AIF1 Playback", .channels_min = 1, .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_S16_LE, }, + .symmetric_rates = true, + .symmetric_channels = true, + .symmetric_samplebits = true, }, }; static const char *const sun8i_aif_stereo_mux_enum_values[] = { "Stereo", "Reverse Stereo", "Sum Mono", "Mix Mono" }; static SOC_ENUM_DOUBLE_DECL(sun8i_aif1_ad0_stereo_mux_enum,