From patchwork Wed Nov 8 20:03:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Reichl X-Patchwork-Id: 10049163 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 A6191603FF for ; Wed, 8 Nov 2017 20:09:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 984D729433 for ; Wed, 8 Nov 2017 20:09:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D17129490; Wed, 8 Nov 2017 20:09:50 +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 6877B29433 for ; Wed, 8 Nov 2017 20:09:49 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9BF392675AA; Wed, 8 Nov 2017 21:03:39 +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 3B1172675B1; Wed, 8 Nov 2017 21:03:38 +0100 (CET) Received: from mail.horus.com (mail.horus.com [78.46.148.228]) by alsa0.perex.cz (Postfix) with ESMTP id 418B52675AA 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 001C464094; Wed, 8 Nov 2017 21:03:34 +0100 (CET) Received: by camel2.lan (Postfix, from userid 1000) id 7CC111C7864; 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:31 +0100 Message-Id: <20171108200332.28949-4-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 3/4] ASoC: bcm2835: Support additional samplerates up to 384kHz 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 Sample rates are only restricted by the capabilities of the clock driver, so use SNDRV_PCM_RATE_CONTINUOUS instead of SNDRV_PCM_RATE_8000_192000. Tests (eg with pcm5122) have shown that bcm2835 works fine in 384kHz/32bit stereo mode, so change the maximum allowed rate from 192kHz to 384kHz. Signed-off-by: Matthias Reichl Reviewed-by: Eric Anholt --- sound/soc/bcm/bcm2835-i2s.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c index 3a706fda4f39..43f5715a0d5d 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -765,7 +765,9 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { .playback = { .channels_min = 2, .channels_max = 2, - .rates = SNDRV_PCM_RATE_8000_192000, + .rates = SNDRV_PCM_RATE_CONTINUOUS, + .rate_min = 8000, + .rate_max = 384000, .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE @@ -773,7 +775,9 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { .capture = { .channels_min = 2, .channels_max = 2, - .rates = SNDRV_PCM_RATE_8000_192000, + .rates = SNDRV_PCM_RATE_CONTINUOUS, + .rate_min = 8000, + .rate_max = 384000, .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE