diff options
author | arnaud.patard@rtp-net.org <arnaud.patard@rtp-net.org> | 2010-07-11 23:28:31 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-07-13 13:37:09 +0200 |
commit | dfe4c93627c4a1a7fb7e30b15e31f4ccf3ca60f5 (patch) | |
tree | 2570b4c9c193bd4857e0984345dd57bd6258ff47 /sound/soc/kirkwood/kirkwood-i2s.c | |
parent | ASoC: fsi: Fixup for master mode (diff) | |
download | linux-dfe4c93627c4a1a7fb7e30b15e31f4ccf3ca60f5.tar.xz linux-dfe4c93627c4a1a7fb7e30b15e31f4ccf3ca60f5.zip |
ASoC: Fix kirkwood i2s mono playback
Kirkwood controller needs to be informed if the audio stream is mono
or not. Failing to do so will result in playing at the wrong speed.
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/kirkwood/kirkwood-i2s.c')
-rw-r--r-- | sound/soc/kirkwood/kirkwood-i2s.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index 0fdc7db7a469..d80ea1ff7b0e 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c @@ -153,6 +153,15 @@ static int kirkwood_i2s_hw_params(struct snd_pcm_substream *substream, default: return -EINVAL; } + + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { + value &= ~KIRKWOOD_PLAYCTL_MONO_MASK; + if (params_channels(params) == 1) + value |= KIRKWOOD_PLAYCTL_MONO_BOTH; + else + value |= KIRKWOOD_PLAYCTL_MONO_OFF; + } + writel(i2s_value, priv->io+i2s_reg); writel(value, priv->io+reg); |