diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/kirkwood/kirkwood-i2s.c | 9 | ||||
-rw-r--r-- | sound/soc/kirkwood/kirkwood.h | 3 |
2 files changed, 12 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, | |||
153 | default: | 153 | default: |
154 | return -EINVAL; | 154 | return -EINVAL; |
155 | } | 155 | } |
156 | |||
157 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | ||
158 | value &= ~KIRKWOOD_PLAYCTL_MONO_MASK; | ||
159 | if (params_channels(params) == 1) | ||
160 | value |= KIRKWOOD_PLAYCTL_MONO_BOTH; | ||
161 | else | ||
162 | value |= KIRKWOOD_PLAYCTL_MONO_OFF; | ||
163 | } | ||
164 | |||
156 | writel(i2s_value, priv->io+i2s_reg); | 165 | writel(i2s_value, priv->io+i2s_reg); |
157 | writel(value, priv->io+reg); | 166 | writel(value, priv->io+reg); |
158 | 167 | ||
diff --git a/sound/soc/kirkwood/kirkwood.h b/sound/soc/kirkwood/kirkwood.h index b6e4f68d71dd..bb6e6a5648c9 100644 --- a/sound/soc/kirkwood/kirkwood.h +++ b/sound/soc/kirkwood/kirkwood.h | |||
@@ -49,6 +49,9 @@ | |||
49 | #define KIRKWOOD_PLAYCTL_BURST_32 (1<<11) | 49 | #define KIRKWOOD_PLAYCTL_BURST_32 (1<<11) |
50 | #define KIRKWOOD_PLAYCTL_PAUSE (1<<9) | 50 | #define KIRKWOOD_PLAYCTL_PAUSE (1<<9) |
51 | #define KIRKWOOD_PLAYCTL_SPDIF_MUTE (1<<8) | 51 | #define KIRKWOOD_PLAYCTL_SPDIF_MUTE (1<<8) |
52 | #define KIRKWOOD_PLAYCTL_MONO_MASK (3<<5) | ||
53 | #define KIRKWOOD_PLAYCTL_MONO_BOTH (3<<5) | ||
54 | #define KIRKWOOD_PLAYCTL_MONO_OFF (0<<5) | ||
52 | #define KIRKWOOD_PLAYCTL_I2S_MUTE (1<<7) | 55 | #define KIRKWOOD_PLAYCTL_I2S_MUTE (1<<7) |
53 | #define KIRKWOOD_PLAYCTL_SPDIF_EN (1<<4) | 56 | #define KIRKWOOD_PLAYCTL_SPDIF_EN (1<<4) |
54 | #define KIRKWOOD_PLAYCTL_I2S_EN (1<<3) | 57 | #define KIRKWOOD_PLAYCTL_I2S_EN (1<<3) |