[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190620134708.28311-1-enric.balletbo@collabora.com>
Date: Thu, 20 Jun 2019 15:47:08 +0200
From: Enric Balletbo i Serra <enric.balletbo@...labora.com>
To: linux-kernel@...r.kernel.org
Cc: Collabora Kernel ML <kernel@...labora.com>,
Xing Zheng <zhengxing@...k-chips.com>,
Benson Leung <bleung@...omium.org>,
Jaroslav Kysela <perex@...ex.cz>, alsa-devel@...a-project.org,
Heiko Stuebner <heiko@...ech.de>,
linux-rockchip@...ts.infradead.org,
Mark Brown <broonie@...nel.org>, Takashi Iwai <tiwai@...e.com>,
Liam Girdwood <lgirdwood@...il.com>,
linux-arm-kernel@...ts.infradead.org
Subject: [PATCH] ASoC: rk3399_gru_sound: Support 32, 44.1 and 88.2 kHz sample rates
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 <enric.balletbo@...labora.com>
---
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;
--
2.20.1
Powered by blists - more mailing lists