From patchwork Wed Mar 27 06:42:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 10872819 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 162D5139A for ; Wed, 27 Mar 2019 07:21:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFC3328C2A for ; Wed, 27 Mar 2019 07:21:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D3BB628CF6; Wed, 27 Mar 2019 07:21:29 +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_ADSP_CUSTOM_MED, 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 B4B1C28C2A for ; Wed, 27 Mar 2019 07:21:28 +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 B0D18875; Wed, 27 Mar 2019 07:43:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B0D18875 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1553669039; bh=62XSXMAD//QWrHuUOlYeXjocyjp+zfwpod/zOHvdBXk=; h=Date:From:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=kYa4rC6d09UDusVIpqGQFKc6y5SWqe6TEEUPVkWLsK4Pw5rYuGz019bYiCV1RWEq/ Qwe5DSQIF9lrPVw5zeEJ8ue2+dSy1O6cot54vMmFG/pZgo4HAkw0swzNXUK7azUQIV ugdzIQDbijpPqkrbeoqHCoZwWY1L+I1XfCPcPFTY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0D22FF8071D; Wed, 27 Mar 2019 07:43:09 +0100 (CET) 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 2F0F8F80C17; Wed, 27 Mar 2019 07:43:06 +0100 (CET) Received: from mail-qt1-x849.google.com (mail-qt1-x849.google.com [IPv6:2607:f8b0:4864:20::849]) (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 1CBE2F801D9 for ; Wed, 27 Mar 2019 07:42:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1CBE2F801D9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="APbi2+d5" Received: by mail-qt1-x849.google.com with SMTP id 18so15962322qtw.20 for ; Tue, 26 Mar 2019 23:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=gZ6UJV1xZQJ76M76wTbZavQ9q8hP3MGNnYzaEl8OR4M=; b=APbi2+d5cw4PulpwvlTnWBE55SN5Tv+36o5gUeN3Sdwg4BCriBuT+Ey1Npc/LDN4JQ hkhHBCkl+E5iLqWG2oHmJXW7+ddnU6D0SU5a8xg9yzZC3wkVyKmxNBGOdjStKy406jgO sNX7V9bpGjt2XAgykCsjKJJAfIm8PzB/5mWCF6q8j/QsiiMxozL606qBBPwAIvBWnGD8 lWBbB5aCUxsr9ZVjrK7dedAu9hQSTKxxvZRBzTZefSOCw9NsDjWZlPaLosvP/ZhfkfLx jevKqppsE8cedMhvdNowIp1xIyJMOR8hQJCzyUPlwtvDU+o2Clh4RJb7w3x4ryy01ywy K1gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=gZ6UJV1xZQJ76M76wTbZavQ9q8hP3MGNnYzaEl8OR4M=; b=TkJxPujHbdUUNhsjOBEwmzvzCx9zq6KzEwChfUHOJWnuW9OCHD2v323PpdcCPrM2jy gr35Vu6w8czwE4/TLTT/E7iR2jRrw0bEyA6jBzeSCMFQ5KvBHVdMi25RD/kIx22F5ZoN j5RZsEqd8ZvqnOgaATNmzlcLgqmxENf72tiuvDdacAiN61iQjuboj5IqZNzLKTwpPCLY AA/EZ2kbnsIiad1YRxr3/RXOiwOw/EyXq5N/V9aAzrhKhebvfbKm4fHym2Q84dfZZzWF Pg6+zJZ4Ne4hwMyeALPZo52hE7vQmiIwm6sv6W1/h2HRCPGIREICwVcgvaE3Tuzw+1pe 5qDA== X-Gm-Message-State: APjAAAXbv+T/mgSjid60oEliucd8AB2z4e39FEc7uq1TGH/HsSk5hWvR 90d5M+s8F86sb87SRxR2asM2Ll7Jw2P+ X-Google-Smtp-Source: APXvYqwY+MdEcZNgbFUfPKcF5+BXoKvI/mqvu2dqArIyUOgmjAGY1n3+FNdiW8vS2qZa1PAS8jW3Dkce29H6 X-Received: by 2002:ac8:8b9:: with SMTP id v54mr13818495qth.64.1553668976506; Tue, 26 Mar 2019 23:42:56 -0700 (PDT) Date: Wed, 27 Mar 2019 14:42:36 +0800 Message-Id: <20190327064236.144843-1-tzungbi@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.21.0.392.gf8f6787159e-goog From: Tzung-Bi Shih To: broonie@kernel.org Cc: alsa-devel@alsa-project.org, cychiang@google.com, jiaxin.yu@mediatek.com, tzungbi@google.com, shunli.wang@mediatek.com, dgreid@google.com Subject: [alsa-devel] [PATCH] ASoC: mt8183: change supported formats of DL2 and UL1 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 DL2 and UL1 should only provide 16-bit, mono, 8kHz and 16kHz to userspace. Change the formats accordingly. Signed-off-by: Tzung-Bi Shih --- sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c index 43be51bf0329..ad42da1b948c 100644 --- a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c +++ b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c @@ -195,9 +195,9 @@ static struct snd_soc_dai_driver mt8183_memif_dai_driver[] = { .playback = { .stream_name = "DL2", .channels_min = 1, - .channels_max = 2, - .rates = MTK_PCM_RATES, - .formats = MTK_PCM_FORMATS, + .channels_max = 1, + .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000, + .formats = SNDRV_PCM_FMTBIT_S16_LE, }, .ops = &mtk_afe_fe_ops, }, @@ -219,9 +219,9 @@ static struct snd_soc_dai_driver mt8183_memif_dai_driver[] = { .capture = { .stream_name = "UL1", .channels_min = 1, - .channels_max = 2, - .rates = MTK_PCM_RATES, - .formats = MTK_PCM_FORMATS, + .channels_max = 1, + .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000, + .formats = SNDRV_PCM_FMTBIT_S16_LE, }, .ops = &mtk_afe_fe_ops, },