From patchwork Thu May 2 04:07:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu-Hsuan Hsu X-Patchwork-Id: 10926089 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8898615A6 for ; Thu, 2 May 2019 06:48:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7768528C7F for ; Thu, 2 May 2019 06:48:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6BB3A28F89; Thu, 2 May 2019 06:48:52 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9038628C7F for ; Thu, 2 May 2019 06:48:51 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 24F3D177A; Thu, 2 May 2019 08:47:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 24F3D177A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1556779729; bh=n9LIXaa3bDF6iMwdZxtV/mvMHjnLPJxa8D5BTsjX8og=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=qhVq5zsS48YX2RfNT9jd/a91BESx3ZsbkOy7mlc4GrZ69sZGqHkuJPzzpPzduHYaY lbHQD0E3zc3BazVUNgijzl7xPvYnZy+Fjwc8p8CtKtGcVsmDJTnS1f3CQMT+K6DwfN 2JTp7ylnkGPgnXDmxfnG3WV44J5N42K8kHAT92Wk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9E23FF896AA; Thu, 2 May 2019 08:47:58 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 52BBCF896C7; Thu, 2 May 2019 06:08:27 +0200 (CEST) Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 00B27F80722 for ; Thu, 2 May 2019 06:08:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 00B27F80722 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="OM63BoL4" Received: by mail-pl1-x643.google.com with SMTP id ck18so417818plb.1 for ; Wed, 01 May 2019 21:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fOwKWUPB3XYL5vqCBpfMhq2ycc4DNiuOgeK/TTjRmug=; b=OM63BoL46xvlrzeumkV1LZA93RUL3Tn8qyNAtNyvef+IRAl9lg08hzIZVDBLnB43l9 faSzDUTKXqhKzADVxeVXcKYh3EscgVnyI2P3JuY0rzwfvhkjCIZK/sLhRkz6YTnjy8U3 ac8Rq85iP1+dm+tMt6U5hhlK0hwcuOiV2/DAU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fOwKWUPB3XYL5vqCBpfMhq2ycc4DNiuOgeK/TTjRmug=; b=DLe9LlFB8WeR7JkJNYZ8rygsYnF3GZjz7mDLb3Vu/gSrUI2sIAdowuu12wRpvUMJXl pvpD/b2Jk3YzyPInruGElycxEVy+0RLayYUc9AeZ04iORneD0nejeKCT487pjjZx3iLl 65aq09kyK1i3tKJULXbNgEyh7nahkBOXv9a4t7T1WhVAViKbCBltC5ZW1QfFbY4GNbcs gJCQh9HqJ1yKaes54nnMvgatHSE5C7CkOpIhsCuloR6iiDChslGKo9NXb4aKUGeWrbKe WQBkASMdEQHfzTXs7SGtkiIZeoeHzDslHVjEpuvSNQo/uQCQPByQm9cUmAWY9oeYtYpI XjhA== X-Gm-Message-State: APjAAAWO9ZKATWaTOnoZozxNJX5lblARY66GXZizVSHQNyXsHzA5/mjR QdeC7maVFh2s+f9+0lSa6+38jQ== X-Google-Smtp-Source: APXvYqzB3uwZbHEMviHNeD8m1xkKNL2FXm123P94Bp57SbqrASolvKxjmDOyHF1jlW5+fb0pShkuzA== X-Received: by 2002:a17:902:8642:: with SMTP id y2mr1343912plt.104.1556770072646; Wed, 01 May 2019 21:07:52 -0700 (PDT) Received: from localhost ([2401:fa00:1:10:6cc8:36d1:3ceb:a986]) by smtp.gmail.com with ESMTPSA id d5sm31527869pgb.33.2019.05.01.21.07.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 May 2019 21:07:51 -0700 (PDT) From: Yu-Hsuan Hsu To: linux-kernel@vger.kernel.org Date: Thu, 2 May 2019 12:07:43 +0800 Message-Id: <20190502040743.184310-1-yuhsuan@chromium.org> X-Mailer: git-send-email 2.21.0.593.g511ec345e18-goog MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 02 May 2019 08:47:52 +0200 Cc: alsa-devel@alsa-project.org, Support Opensource , Liam Girdwood , Takashi Iwai , Mark Brown , Yu-Hsuan Hsu , Adam Thomson , dgreid@chromium.org Subject: [alsa-devel] [PATCH] ASoC: da7219: Update the support rate list X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP If we want to set rate to 64000 on da7219, it fails and returns "snd_pcm_hw_params: Invalid argument". We should remove 64000 from support rate list because it is not available. Signed-off-by: Yu-Hsuan Hsu Reviewed-by: Adam Thomson --- sound/soc/codecs/da7219.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c index 5f5fa3416af3..7497457cf3d4 100644 --- a/sound/soc/codecs/da7219.c +++ b/sound/soc/codecs/da7219.c @@ -1658,20 +1658,26 @@ static const struct snd_soc_dai_ops da7219_dai_ops = { #define DA7219_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) +#define DA7219_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ + SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 |\ + SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |\ + SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 |\ + SNDRV_PCM_RATE_96000) + static struct snd_soc_dai_driver da7219_dai = { .name = "da7219-hifi", .playback = { .stream_name = "Playback", .channels_min = 1, .channels_max = DA7219_DAI_CH_NUM_MAX, - .rates = SNDRV_PCM_RATE_8000_96000, + .rates = DA7219_RATES, .formats = DA7219_FORMATS, }, .capture = { .stream_name = "Capture", .channels_min = 1, .channels_max = DA7219_DAI_CH_NUM_MAX, - .rates = SNDRV_PCM_RATE_8000_96000, + .rates = DA7219_RATES, .formats = DA7219_FORMATS, }, .ops = &da7219_dai_ops,