From patchwork Mon Sep 26 13:34:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Thanki X-Patchwork-Id: 9350773 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 B80BD607D6 for ; Mon, 26 Sep 2016 14:23:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA70528A3C for ; Mon, 26 Sep 2016 14:23:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F04E28A47; Mon, 26 Sep 2016 14:23:54 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no 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 39CAD28A3C for ; Mon, 26 Sep 2016 14:23:52 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6292326686A; Mon, 26 Sep 2016 16:23:51 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9D41826686F; Mon, 26 Sep 2016 16:21:25 +0200 (CEST) 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 0CCEB26672D; Mon, 26 Sep 2016 15:34:25 +0200 (CEST) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by alsa0.perex.cz (Postfix) with ESMTP id 655AF261560 for ; Mon, 26 Sep 2016 15:34:23 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id b184so14178365wma.3 for ; Mon, 26 Sep 2016 06:34:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=iSuXCsnyRIJZEKlANURyWvY1RGobnm/YC5Fdr/42wmA=; b=cT6EHw088oASF7J6dYnHU5jFYadKyt4q4z9qJdXBSIegM4IS2G7ffjpNX/tghtKaUA bGjE3/hdHfypMSHlguHq+k99uaVfVV+LcbKWfZTzOsXpmXsKvePRxACQbUFNj4vhwEmf ERhmHfR6SFlGrZtN7wqOxU/62QesGN5N1ND0TCSbWJ8vRtKsP6OOKf48CSkxUER9g1Zx BqK8NTazsXhnft5m4IMQlsnTFNshN8W+GQDZu5fDd6y8WWuaCx0u2TZxBKuDJHOrQWPA ZQPOw+ZFzwFNCtLfK/rtA23HORBzJntwWoX8adJnBicXfT0xC8PbVt666vVqD4TW+QK/ 0Wwg== 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; bh=iSuXCsnyRIJZEKlANURyWvY1RGobnm/YC5Fdr/42wmA=; b=XKT01NzV0c8W5PaPbKYN1bUvM9ao1FiEo9YrICzGgiOEhj/cNNtFj2YDyTQfUhXyqE h6lwqpNLD8Xhlfh1maht6qJGCn7dx+kyyMEhB4kTHO06lRsbbFAAsQlim5GscgAn3sCk F2uO6uwSDlsK/VlDK5B5fSufxYPE/oWYW7xk/IDCceQLM7FbNsnfuV7TvHq83MWOgpES vCrVLLJRXFP2h3UglRBzk0Tw7zh2d3/KADiHCZg1UyOdIxPBWxvsGDQCmtYmpx/LEQzr N6GslQazdtDI93fZUM8vbF8XEj2i+9hLdClrCoeXaaKcxSsGyQeNChcZSJEtIcV96fhR PuBA== X-Gm-Message-State: AE9vXwPQBIJ9RGxfZuz93NYgAGLgq1tmOn9CqYBwkxb/QV/vagmCBi5QnjloOs1pBPve6Q== X-Received: by 10.194.112.98 with SMTP id ip2mr17588378wjb.95.1474896862969; Mon, 26 Sep 2016 06:34:22 -0700 (PDT) Received: from c50.bag.software ([212.91.253.218]) by smtp.gmail.com with ESMTPSA id s9sm1007235wjh.16.2016.09.26.06.34.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Sep 2016 06:34:22 -0700 (PDT) From: Vishal Thanki To: alsa-devel@alsa-project.org, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, jic23@kernel.org, afd@ti.com, kuninori.morimoto.gx@renesas.com Date: Mon, 26 Sep 2016 15:34:19 +0200 Message-Id: <1474896859-31069-1-git-send-email-vishalthanki@gmail.com> X-Mailer: git-send-email 2.4.11 Cc: Vishal Thanki Subject: [alsa-devel] [PATCH] ASoC: ak4104: Limit the supported sample 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 Currently the driver exposes range of sample rates between 8KHz to 192KHz as a part of dai_driver. This does not hold true as the limited number sample rates are allowed in hw_params DAI callback. This patch limits the sample rates exposed via dai_driver. Signed-off-by: Vishal Thanki --- sound/soc/codecs/ak4104.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/ak4104.c b/sound/soc/codecs/ak4104.c index bdca879..1a9d233 100644 --- a/sound/soc/codecs/ak4104.c +++ b/sound/soc/codecs/ak4104.c @@ -163,7 +163,10 @@ static struct snd_soc_dai_driver ak4104_dai = { .stream_name = "Playback", .channels_min = 2, .channels_max = 2, - .rates = SNDRV_PCM_RATE_8000_192000, + .rates = SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | + SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | + SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | + SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000, .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_LE