fbdev: sh_mobile_hdmi: modify snd_soc_dai_driver settings
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 9 Sep 2010 02:48:10 +0000 (11:48 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 10 Sep 2010 15:07:41 +0000 (16:07 +0100)
This patch solve below report from Guennadi

> +static struct snd_soc_dai_driver sh_hdmi_dai = {
> + .name = "sh_mobile_hdmi-hifi",
> + .playback = {
> + .stream_name = "Playback",
> + .channels_min = 1,

Can it actually do mono? Maybe at probe time you could look at audio flags
from your previous patch and, e.g., for SPDIF set channels_min to 2?

> + .channels_max = 2,

That's the "smallest max," yes. With some other interfaces (I2S, DSD) it
can support up to 8 channels...

> + .rates = SNDRV_PCM_RATE_8000_48000,

Hm, in the datasheet I see supported frequencies 32kHz to 192kHz. And if
you promise support for multiple frequencies, don't you want to implement
.hw_params? Besides, not all of these frequencies will be available,
depending on your supplied clock and your willingness to implement
downsampling.

Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/video/sh_mobile_hdmi.c

index beb04ef..a2cb492 100644 (file)
@@ -249,9 +249,12 @@ static struct snd_soc_dai_driver sh_hdmi_dai = {
        .name = "sh_mobile_hdmi-hifi",
        .playback = {
                .stream_name = "Playback",
-               .channels_min = 1,
-               .channels_max = 2,
-               .rates = SNDRV_PCM_RATE_8000_48000,
+               .channels_min = 2,
+               .channels_max = 8,
+               .rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100  |
+                        SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200  |
+                        SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 |
+                        SNDRV_PCM_RATE_192000,
                .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE,
        },
 };