From patchwork Thu Jun 20 13:47:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo i Serra X-Patchwork-Id: 11006683 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 D679776 for ; Thu, 20 Jun 2019 13:47:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C794427E01 for ; Thu, 20 Jun 2019 13:47:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBDAD28784; Thu, 20 Jun 2019 13:47:24 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 667D627E01 for ; Thu, 20 Jun 2019 13:47:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=+1jXOOPFKmUX9REDNDyfFLd4T8ntSkX2eWpUGL4nOaE=; b=HFlZbd5qzqUrm5 AQUy3cNwNBpP5F/hKax2mJHunmy7ymtQLy/1Hef2149vqf/1CP0Czbtz0wAiRRlp7VsGmqO7aEFtm 0AiLe/uEqX2AZKPNhfV65jrE0Uaee5GrU905YRLmWYCAbWKeu5Zk8PQ1P/wyFLS8M0VlXVhnDzgw0 cTKS5Y2EU6xiuPibbIGl94iw2UYnPCPPuQcSrCV2s0PucSECHrbuGpR3j5RKyzB4zteDUVv8yspjM oLO277MJEbBOXveu4e7Uo96nlE8zDOmGhRwFfTTQ0kh9XEkcUzTc0aVbpDR22Ag1l5EOtuQAKfzuz gBUFMtODkQo0DhwbuHWg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hdxPP-0001Qw-OY; Thu, 20 Jun 2019 13:47:23 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hdxPM-0001L9-BC; Thu, 20 Jun 2019 13:47:21 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id C036826126D From: Enric Balletbo i Serra To: linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: rk3399_gru_sound: Support 32, 44.1 and 88.2 kHz sample rates Date: Thu, 20 Jun 2019 15:47:08 +0200 Message-Id: <20190620134708.28311-1-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190620_064720_600883_9DE8C048 X-CRM114-Status: UNSURE ( 9.08 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, Heiko Stuebner , Xing Zheng , Liam Girdwood , Takashi Iwai , Jaroslav Kysela , linux-rockchip@lists.infradead.org, Mark Brown , Collabora Kernel ML , Benson Leung , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP According to the datasheet the max98357a also supports 32, 44.1 and 88.2 kHz sample rate. This support was also introduced recently by commit fdf34366d324 ("ASoC: max98357a: add missing supported rates"). This patch adds support for these rates also for the machine driver so we get rid of the errors like the below and we are able to play files using these sample rates. rk3399-gru-sound sound: rockchip_sound_max98357a_hw_params() doesn't support this sample rate: 44100 rk3399-gru-sound sound: ASoC: machine hw_params failed: -22 Signed-off-by: Enric Balletbo i Serra --- sound/soc/rockchip/rk3399_gru_sound.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3399_gru_sound.c index 3d0cc6e90d7b..8dfe1a560e42 100644 --- a/sound/soc/rockchip/rk3399_gru_sound.c +++ b/sound/soc/rockchip/rk3399_gru_sound.c @@ -59,7 +59,10 @@ static int rockchip_sound_max98357a_hw_params(struct snd_pcm_substream *substrea switch (params_rate(params)) { case 8000: case 16000: + case 32000: + case 44100: case 48000: + case 88200: case 96000: mclk = params_rate(params) * SOUND_FS; break;