From patchwork Tue Jan 19 10:29:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Siverskog X-Patchwork-Id: 8060031 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BDC82BEEE5 for ; Tue, 19 Jan 2016 10:31:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DCA1720414 for ; Tue, 19 Jan 2016 10:31:08 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id DA4C7203DB for ; Tue, 19 Jan 2016 10:31:06 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id E7D17265821; Tue, 19 Jan 2016 11:31:05 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 81D35261A5A; Tue, 19 Jan 2016 11:30:33 +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 1E4D2265139; Tue, 19 Jan 2016 11:30:33 +0100 (CET) Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) by alsa0.perex.cz (Postfix) with ESMTP id 70E67260561 for ; Tue, 19 Jan 2016 11:30:24 +0100 (CET) Received: by mail-lf0-f47.google.com with SMTP id c192so335538053lfe.2 for ; Tue, 19 Jan 2016 02:30:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=teenage.engineering; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KTfT04XESXL1Uy0d+HMxhtjhEWcWpV93ZthlxAzDJhY=; b=h1m/dClL/CjP4AwG0Hx+Eyeeb7+rhMzrwQDryD5AtGwo31DrUYcurzwukLZzrB2tWI nMaootZWwzEX9Uz+ywq8YI8byq9R/ChqobN+zES/I72U53tncQ0RcqNK+yrBfzYQdI7z 1VFX6Jeyk3Yx1DB2a1Gbp+X+S7dcLXVwCp5Ts= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KTfT04XESXL1Uy0d+HMxhtjhEWcWpV93ZthlxAzDJhY=; b=ZdLbkK843HiOJXGWcVgYYZkVqPTQbecwSQtBIS/KLYacV8zAxOP9uP5BwgkwhtYu8A 6KWHfdwT7GkyJSLDjqiCu5OUARzud35yV0Dfr8vyq/nOgcC0EMO4QXq57GhcSlRYTf6h ocknXBaaQSM+XNjUoLGZ2+ORBOjkDK2GVr/1FiFYmG4e8a6u24bWcQt0C0rB5oZL42/r NNOwUWbfFChblrIAuYsm+CJcSAgFvDVYXMrDsqc0jXjqW1mD6hwv220hhawaXCihm7mu mCidTHukUiv8UhjH4hSR4fMkg2VfKNaR9J8AY/Jg2A9bDHNI53C6Ahf4XOlLq50GVh9c fTZQ== X-Gm-Message-State: ALoCoQlbvmZEDPCkve6SelVAI1BqBiXmvMDf7d45473F0Av2uNxUgjooxnMjouNFc/M6gy5kW2fqCrgDLYdWBugB8cK2KgeNpA== X-Received: by 10.25.169.74 with SMTP id s71mr9072116lfe.128.1453199424065; Tue, 19 Jan 2016 02:30:24 -0800 (PST) Received: from localhost.localdomain (212-107-146-90.customers.ownit.se. [212.107.146.90]) by smtp.gmail.com with ESMTPSA id 99sm3957813lfp.30.2016.01.19.02.30.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Jan 2016 02:30:23 -0800 (PST) From: Jacob Siverskog To: Liam Girdwood , Mark Brown Date: Tue, 19 Jan 2016 11:29:48 +0100 Message-Id: <1453199388-8354-4-git-send-email-jacob@teenage.engineering> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1453199388-8354-1-git-send-email-jacob@teenage.engineering> References: <1453199388-8354-1-git-send-email-jacob@teenage.engineering> Cc: alsa-devel@alsa-project.org, Takashi Iwai , linux-kernel@vger.kernel.org, Johan Hovold , Jacob Siverskog , Michael Trimarchi Subject: [alsa-devel] [PATCH v2 3/3] ASoC: pcm179x: Support continuous rates 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 According to the PCM179x data sheets sampling frequencies between 10 kHz and 200 kHz are supported. Specify support in the driver. Tested with PCM1791A. References: http://www.ti.com/lit/ds/symlink/pcm1791a.pdf http://www.ti.com/lit/ds/symlink/pcm1792a.pdf http://www.ti.com/lit/ds/symlink/pcm1795.pdf http://www.ti.com/lit/ds/symlink/pcm1796.pdf Reviewed-by: Johan Hovold Signed-off-by: Jacob Siverskog --- sound/soc/codecs/pcm179x.c | 4 +++- sound/soc/codecs/pcm179x.h | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/pcm179x.c b/sound/soc/codecs/pcm179x.c index d35d2ae..6e40be2 100644 --- a/sound/soc/codecs/pcm179x.c +++ b/sound/soc/codecs/pcm179x.c @@ -181,7 +181,9 @@ static struct snd_soc_dai_driver pcm179x_dai = { .stream_name = "Playback", .channels_min = 2, .channels_max = 2, - .rates = PCM1792A_RATES, + .rates = SNDRV_PCM_RATE_CONTINUOUS, + .rate_min = 10000, + .rate_max = 200000, .formats = PCM1792A_FORMATS, }, .ops = &pcm179x_dai_ops, }; diff --git a/sound/soc/codecs/pcm179x.h b/sound/soc/codecs/pcm179x.h index d1536e0..7829157 100644 --- a/sound/soc/codecs/pcm179x.h +++ b/sound/soc/codecs/pcm179x.h @@ -24,10 +24,6 @@ struct pcm179x_private { unsigned int rate; }; -#define PCM1792A_RATES (SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_8000_48000 | \ - SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | \ - SNDRV_PCM_RATE_192000) - #define PCM1792A_FORMATS (SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S24_LE | \ SNDRV_PCM_FMTBIT_S16_LE)