aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/pxa/pxa2xx-i2s.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index bb8630b6dc8d..115b471b2def 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -176,9 +176,7 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
176 176
177 /* is port used by another stream */ 177 /* is port used by another stream */
178 if (!(SACR0 & SACR0_ENB)) { 178 if (!(SACR0 & SACR0_ENB)) {
179
180 SACR0 = 0; 179 SACR0 = 0;
181 SACR1 = 0;
182 if (pxa_i2s.master) 180 if (pxa_i2s.master)
183 SACR0 |= SACR0_BCKD; 181 SACR0 |= SACR0_BCKD;
184 182
@@ -224,6 +222,10 @@ static int pxa2xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
224 222
225 switch (cmd) { 223 switch (cmd) {
226 case SNDRV_PCM_TRIGGER_START: 224 case SNDRV_PCM_TRIGGER_START:
225 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
226 SACR1 &= ~SACR1_DRPL;
227 else
228 SACR1 &= ~SACR1_DREC;
227 SACR0 |= SACR0_ENB; 229 SACR0 |= SACR0_ENB;
228 break; 230 break;
229 case SNDRV_PCM_TRIGGER_RESUME: 231 case SNDRV_PCM_TRIGGER_RESUME:
@@ -250,7 +252,7 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
250 SAIMR &= ~SAIMR_RFS; 252 SAIMR &= ~SAIMR_RFS;
251 } 253 }
252 254
253 if (SACR1 & (SACR1_DREC | SACR1_DRPL)) { 255 if ((SACR1 & (SACR1_DREC | SACR1_DRPL)) == (SACR1_DREC | SACR1_DRPL)) {
254 SACR0 &= ~SACR0_ENB; 256 SACR0 &= ~SACR0_ENB;
255 pxa_i2s_wait(); 257 pxa_i2s_wait();
256 clk_disable(clk_i2s); 258 clk_disable(clk_i2s);