From patchwork Mon Jan 18 15:57:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Siverskog X-Patchwork-Id: 8055791 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 AA6FCBEEE5 for ; Mon, 18 Jan 2016 16:00:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D14D8204A2 for ; Mon, 18 Jan 2016 16:00:14 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 276C72049C for ; Mon, 18 Jan 2016 16:00:10 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 01CC42655E3; Mon, 18 Jan 2016 17:00:06 +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 131882652C5; Mon, 18 Jan 2016 16:58:44 +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 5F50D2651FE; Mon, 18 Jan 2016 16:58:42 +0100 (CET) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179]) by alsa0.perex.cz (Postfix) with ESMTP id B7041261A28 for ; Mon, 18 Jan 2016 16:58:29 +0100 (CET) Received: by mail-lb0-f179.google.com with SMTP id cl12so131580881lbc.1 for ; Mon, 18 Jan 2016 07:58:29 -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=OqTnQgHNO4unCryib0ij+ULSx/ZTteMwHgsW2N1nrO4=; b=ExGAPMW5l8nmnmuN2pFAGR14KoutlcCU3JqNCHtKMUSkjSrEskNC88znxbVIjRkBns jBqW1dgf/eoJCGNjGzYitXBg1S84Mu5hz2qEoMKx9TsPen0OgL+M2WCWSPl+bUVsYfA+ +DYWVGFrpuXWgEK5/w2z7Y05QlTfetbzb/6ZA= 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=OqTnQgHNO4unCryib0ij+ULSx/ZTteMwHgsW2N1nrO4=; b=K+NHd9Al2KdHIAU3EoTo/blS8EgXJ7KUpjMxMYCZJdCH8h9fB5FmcJTWxQ+BhNB+KZ yz/kJyT94TEvS0HrlzhRtEkK601SYdsidW7hbX74lyB8IJgWCJ5STyeCHsWJI18769LM 1UyteKeXvz/PqzEbGOvpz4//veVfS1ijuSRrHzuLSM8qogGXT4Nql2pSvC508pGeHqOx xRhcW+c3KHtyn4AtUIEglK0wvIztoNsqrrVrcACcTmd7MRRYXgdQG2GW8dxf9IKrtESH ZHb/LhtSfQHOfqQVz+Qeo+v5YXFcbHUvsXv/lZXLZEFAb48WzFNM9e29PbpqKp4KvXYa 7ziA== X-Gm-Message-State: ALoCoQlapG8EeIRQYR4KR2wAJochAH/0soGDXOegKpGlm3NLXxBAnMv0UxCv+5aJhHarDN1sya7BBm1q2jQjTUkF88tUyU5Lgw== X-Received: by 10.112.147.161 with SMTP id tl1mr8348397lbb.4.1453132709361; Mon, 18 Jan 2016 07:58:29 -0800 (PST) Received: from localhost.localdomain (212-107-146-90.customers.ownit.se. [212.107.146.90]) by smtp.gmail.com with ESMTPSA id o9sm3290700lfe.15.2016.01.18.07.58.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Jan 2016 07:58:28 -0800 (PST) From: Jacob Siverskog To: Jaroslav Kysela , Takashi Iwai Date: Mon, 18 Jan 2016 16:57:37 +0100 Message-Id: <1453132657-18678-4-git-send-email-jacob@teenage.engineering> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1453132657-18678-1-git-send-email-jacob@teenage.engineering> References: <1453132657-18678-1-git-send-email-jacob@teenage.engineering> Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Liam Girdwood , Jacob Siverskog , Mark Brown , Johan Hovold , Michael Trimarchi Subject: [alsa-devel] [PATCH 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 08bc6e0..5a70384 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)