From patchwork Fri Jan 22 12:39:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Siverskog X-Patchwork-Id: 8089891 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7AEEA9F6FA for ; Fri, 22 Jan 2016 12:42:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B60522042A for ; Fri, 22 Jan 2016 12:42:25 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 874BD20364 for ; Fri, 22 Jan 2016 12:42:24 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 48663266523; Fri, 22 Jan 2016 13:42:22 +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 BA5D1265E3C; Fri, 22 Jan 2016 13:40:49 +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 11C45261585; Fri, 22 Jan 2016 13:40:47 +0100 (CET) Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) by alsa0.perex.cz (Postfix) with ESMTP id A6EDB2606F3 for ; Fri, 22 Jan 2016 13:40:36 +0100 (CET) Received: by mail-lf0-f46.google.com with SMTP id 17so46164375lfz.1 for ; Fri, 22 Jan 2016 04:40:36 -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=YLEKWFAArz1l0s62wW8f6obrYsUzoSV4KdNnfPghaOw=; b=N+qzsGL7p4XMQ+8xH6jiQYAiPGgAFA05RG5KR3DvKvdNd/Z+jcxE4PRbX9KFceLeIX eb4zvgcNoa1pHjJ0cLAGmFE/30sWFdgwjj0e0W142FL3ubRk6u2JHs1QnxD5SmtkKtup 3eXyURoFHiKfhwiW7g7pJXawgXcq7E39t5GaY= 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=YLEKWFAArz1l0s62wW8f6obrYsUzoSV4KdNnfPghaOw=; b=UZL6aEsYNwknzuRaWiSnOEmhnerJIBzZRG1/zT8zb3dmlOUCzreiYkT6JJL6cQi3xn oCJ0eiKsd5emTzSExD3fW2rjpqZDqJRzxxR1jKeaP1BBEvwXztTblXyU76uiJHMzaVgB Fq20RP1/du2kn6aVvssmfW2NRtIiCN3PitdPQnCRMfVpcD/+ZK3LEX0ukkR+AP03901H SPyGNTSNU4eLI3VvUJFjfffsHdW3xB4L8/omyz1mi/BgmR2wCXygKv3Bi9AYPVsIlCWS S396FVdlvOiX4f9emuF1r6Huf5W+6/9OoXJL2L2kV3IG+rH1bo0foOT1zUK1tJzr/wOU Z5Sg== X-Gm-Message-State: AG10YOSJBtec/0wHHC3sXHHQZEsblNr2kE8LjgVWXB0jyGqSOE4DSKFuQxB1XkxQzgd7UHFw X-Received: by 10.25.17.32 with SMTP id g32mr1197605lfi.38.1453466436301; Fri, 22 Jan 2016 04:40:36 -0800 (PST) Received: from localhost.localdomain (212-107-146-90.customers.ownit.se. [212.107.146.90]) by smtp.gmail.com with ESMTPSA id mj4sm863764lbc.19.2016.01.22.04.40.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Jan 2016 04:40:35 -0800 (PST) From: Jacob Siverskog To: Liam Girdwood , Mark Brown Date: Fri, 22 Jan 2016 13:39:55 +0100 Message-Id: <1453466395-7352-4-git-send-email-jacob@teenage.engineering> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1453466395-7352-1-git-send-email-jacob@teenage.engineering> References: <1453466395-7352-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 v4 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 8f20f70..06a6657 100644 --- a/sound/soc/codecs/pcm179x.c +++ b/sound/soc/codecs/pcm179x.c @@ -187,7 +187,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 c4eea4d..11e3312 100644 --- a/sound/soc/codecs/pcm179x.h +++ b/sound/soc/codecs/pcm179x.h @@ -17,10 +17,6 @@ #ifndef __PCM179X_H__ #define __PCM179X_H__ -#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)