* [PATCH] ASoC: rk3399_gru_sound: Support 32, 44.1 and 88.2 kHz sample rates
@ 2019-06-20 13:47 Enric Balletbo i Serra
2019-06-20 15:41 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Enric Balletbo i Serra @ 2019-06-20 13:47 UTC (permalink / raw)
To: linux-kernel
Cc: Collabora Kernel ML, Xing Zheng, Benson Leung, Jaroslav Kysela,
alsa-devel, Heiko Stuebner, linux-rockchip, Mark Brown,
Takashi Iwai, Liam Girdwood, linux-arm-kernel
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@collabora.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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: rk3399_gru_sound: Support 32, 44.1 and 88.2 kHz sample rates
2019-06-20 13:47 [PATCH] ASoC: rk3399_gru_sound: Support 32, 44.1 and 88.2 kHz sample rates Enric Balletbo i Serra
@ 2019-06-20 15:41 ` Mark Brown
2019-06-20 16:08 ` Enric Balletbo Serra
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2019-06-20 15:41 UTC (permalink / raw)
To: Enric Balletbo i Serra
Cc: linux-kernel, Collabora Kernel ML, Xing Zheng, Benson Leung,
Jaroslav Kysela, alsa-devel, Heiko Stuebner, linux-rockchip,
Takashi Iwai, Liam Girdwood, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 663 bytes --]
On Thu, Jun 20, 2019 at 03:47:08PM +0200, Enric Balletbo i Serra wrote:
> 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.
Does the machine actually need to validate this at all? The component
drivers can all apply whatever constraints are needed and do their own
validation, the machine driver is just getting in the way here.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: rk3399_gru_sound: Support 32, 44.1 and 88.2 kHz sample rates
2019-06-20 15:41 ` Mark Brown
@ 2019-06-20 16:08 ` Enric Balletbo Serra
0 siblings, 0 replies; 3+ messages in thread
From: Enric Balletbo Serra @ 2019-06-20 16:08 UTC (permalink / raw)
To: Mark Brown
Cc: Enric Balletbo i Serra, alsa-devel, Heiko Stuebner, Xing Zheng,
Liam Girdwood, Takashi Iwai, linux-kernel, Jaroslav Kysela,
open list:ARM/Rockchip SoC..., Collabora Kernel ML, Benson Leung,
Linux ARM
Hi Mark,
Missatge de Mark Brown <broonie@kernel.org> del dia dj., 20 de juny
2019 a les 17:42:
>
> On Thu, Jun 20, 2019 at 03:47:08PM +0200, Enric Balletbo i Serra wrote:
> > 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.
>
> Does the machine actually need to validate this at all? The component
> drivers can all apply whatever constraints are needed and do their own
> validation, the machine driver is just getting in the way here.
I think you have reason, I'll test by removing these validation and
respin the patch.
Thanks,
~ Enric
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-20 16:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-20 13:47 [PATCH] ASoC: rk3399_gru_sound: Support 32, 44.1 and 88.2 kHz sample rates Enric Balletbo i Serra
2019-06-20 15:41 ` Mark Brown
2019-06-20 16:08 ` Enric Balletbo Serra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox