From patchwork Wed Nov 8 20:03:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Reichl X-Patchwork-Id: 10049171 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1698F60381 for ; Wed, 8 Nov 2017 20:14:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06E572983F for ; Wed, 8 Nov 2017 20:14:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAAE22954C; Wed, 8 Nov 2017 20:14:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56D5C2954C for ; Wed, 8 Nov 2017 20:14:49 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9A46C267605; Wed, 8 Nov 2017 21:03:43 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id DF2DD2675B6; Wed, 8 Nov 2017 21:03:39 +0100 (CET) Received: from mail.horus.com (mail.horus.com [78.46.148.228]) by alsa0.perex.cz (Postfix) with ESMTP id 4153A267591 for ; Wed, 8 Nov 2017 21:03:35 +0100 (CET) Received: from [192.168.1.20] (193-83-226-251.adsl.highway.telekom.at [193.83.226.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "E-Mail Matthias Reichl", Issuer "HiassofT CA 2014" (verified OK)) by mail.horus.com (Postfix) with ESMTPS id ED63264093; Wed, 8 Nov 2017 21:03:34 +0100 (CET) Received: by camel2.lan (Postfix, from userid 1000) id 64C9F1C779E; Wed, 8 Nov 2017 21:03:34 +0100 (CET) From: Matthias Reichl To: Mark Brown , Eric Anholt , Stefan Wahren Date: Wed, 8 Nov 2017 21:03:32 +0100 Message-Id: <20171108200332.28949-5-hias@horus.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171108200332.28949-1-hias@horus.com> References: <20171108200332.28949-1-hias@horus.com> Cc: alsa-devel@alsa-project.org, linux-rpi-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH 4/4] ASoC: bcm2835: Enforce full symmetry X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP bcm2835's configuration registers can't be changed when a stream is running, which means asymmetric configurations aren't supported. Channel and rate symmetry are already enforced by constraints but samplebits had been missed. As hw_params doesn't check for symmetry constraints by itself and just returns success if a stream is running this led to situations where asymmetric configurations were seeming to succeed but of course didn't work because the hardware wasn't configured at all. Fix this by adding the missing samplerate symmetry constraint. Signed-off-by: Matthias Reichl --- sound/soc/bcm/bcm2835-i2s.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c index 43f5715a0d5d..2e449d7173fc 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -783,7 +783,8 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { | SNDRV_PCM_FMTBIT_S32_LE }, .ops = &bcm2835_i2s_dai_ops, - .symmetric_rates = 1 + .symmetric_rates = 1, + .symmetric_samplebits = 1, }; static bool bcm2835_i2s_volatile_reg(struct device *dev, unsigned int reg)