From patchwork Thu Jan 21 15:26:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Siverskog X-Patchwork-Id: 8082621 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 2A8C5BEEE5 for ; Thu, 21 Jan 2016 15:29:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4B5A820502 for ; Thu, 21 Jan 2016 15:29:10 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id DA83E20504 for ; Thu, 21 Jan 2016 15:29:08 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 2C2C4266021; Thu, 21 Jan 2016 16:29:08 +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, NO_DNS_FOR_FROM,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 D06852608ED; Thu, 21 Jan 2016 16:27:37 +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 B9F14260A5B; Thu, 21 Jan 2016 16:27:35 +0100 (CET) Received: from mail-lf0-f41.google.com (mail-lf0-f41.google.com [209.85.215.41]) by alsa0.perex.cz (Postfix) with ESMTP id E22832606BA for ; Thu, 21 Jan 2016 16:27:22 +0100 (CET) Received: by mail-lf0-f41.google.com with SMTP id h129so29170920lfh.3 for ; Thu, 21 Jan 2016 07:27:22 -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=lL9dL/Sq47/TJLNJAuyCvMAx+hclHiiqFYbfPA7sv6Q=; b=e+ahvdSZ1Xu5+fQerKEKpoH0z5NzmDD9iVMY7YtOjN3yjG2m/IN7hMSeevdpSPLL/d ewEcggVAVYc1Um9B3kM2YsjvsF6SQnBx728idHbxJSmPCUrQuWxUSk0rGavirdEbgrCL zooCJYoFrm8vRrgVjIG7UvQbuzHspDXTroxwk= 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=lL9dL/Sq47/TJLNJAuyCvMAx+hclHiiqFYbfPA7sv6Q=; b=mCiRL0FD1i3UCaFvL75dp/M+wKgn6l5kAcmWa6VE9CyCrzeW9WilrRLM29Qv1qmd7K R49g7+XVnoX8bdXS/wLzfWpKNZ6m8QX8t7vA3orYj31MPusdQVsHLEszSa5Nv2szWeFs 2V1lc/MDelezIm+1IJtLo/z4OWKONheAHsAZgxAaGruTgiiDnNgV1AZfKc/+w4cRGhTk vqNSb6eX7RpfCrSVmaykK5pkn2QHigqyDK+B2hq0u55ZTC9R6XY2hJL0yhAVIxpaFl8M m6LtQ0dKzHdZg1Jk1VEpcuShl4BtHQuORkA7w+e/+lwm9KHN0vI4m53+mghkCL+6kWdD Z0pw== X-Gm-Message-State: ALoCoQlD39SEO5MwD8NhqjAuBdhZ0GXBODfmQaqofq4m2E298ZmMdIkeOPbH6Qw2LCMjIE4zxgLTv0ZTcg8ED8OzJ5/M4eFouw== X-Received: by 10.25.28.80 with SMTP id c77mr16764319lfc.74.1453390042365; Thu, 21 Jan 2016 07:27:22 -0800 (PST) Received: from localhost.localdomain (212-107-146-90.customers.ownit.se. [212.107.146.90]) by smtp.gmail.com with ESMTPSA id q76sm259357lfd.41.2016.01.21.07.27.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Jan 2016 07:27:21 -0800 (PST) From: Jacob Siverskog To: Liam Girdwood , Mark Brown Date: Thu, 21 Jan 2016 16:26:58 +0100 Message-Id: <1453390018-16854-4-git-send-email-jacob@teenage.engineering> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1453390018-16854-1-git-send-email-jacob@teenage.engineering> References: <1453390018-16854-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 v3 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 eba451f..d492b5a 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)