diff options
Diffstat (limited to 'sound/soc/kirkwood/kirkwood-i2s.c')
-rw-r--r-- | sound/soc/kirkwood/kirkwood-i2s.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index d34d91743e3f..0b18f654b413 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c | |||
@@ -33,6 +33,10 @@ | |||
33 | SNDRV_PCM_FMTBIT_S24_LE | \ | 33 | SNDRV_PCM_FMTBIT_S24_LE | \ |
34 | SNDRV_PCM_FMTBIT_S32_LE) | 34 | SNDRV_PCM_FMTBIT_S32_LE) |
35 | 35 | ||
36 | #define KIRKWOOD_SPDIF_FORMATS \ | ||
37 | (SNDRV_PCM_FMTBIT_S16_LE | \ | ||
38 | SNDRV_PCM_FMTBIT_S24_LE) | ||
39 | |||
36 | static int kirkwood_i2s_set_fmt(struct snd_soc_dai *cpu_dai, | 40 | static int kirkwood_i2s_set_fmt(struct snd_soc_dai *cpu_dai, |
37 | unsigned int fmt) | 41 | unsigned int fmt) |
38 | { | 42 | { |
@@ -244,15 +248,15 @@ static int kirkwood_i2s_play_trigger(struct snd_pcm_substream *substream, | |||
244 | ctl); | 248 | ctl); |
245 | } | 249 | } |
246 | 250 | ||
247 | if (dai->id == 0) | ||
248 | ctl &= ~KIRKWOOD_PLAYCTL_SPDIF_EN; /* i2s */ | ||
249 | else | ||
250 | ctl &= ~KIRKWOOD_PLAYCTL_I2S_EN; /* spdif */ | ||
251 | |||
252 | switch (cmd) { | 251 | switch (cmd) { |
253 | case SNDRV_PCM_TRIGGER_START: | 252 | case SNDRV_PCM_TRIGGER_START: |
254 | /* configure */ | 253 | /* configure */ |
255 | ctl = priv->ctl_play; | 254 | ctl = priv->ctl_play; |
255 | if (dai->id == 0) | ||
256 | ctl &= ~KIRKWOOD_PLAYCTL_SPDIF_EN; /* i2s */ | ||
257 | else | ||
258 | ctl &= ~KIRKWOOD_PLAYCTL_I2S_EN; /* spdif */ | ||
259 | |||
256 | value = ctl & ~KIRKWOOD_PLAYCTL_ENABLE_MASK; | 260 | value = ctl & ~KIRKWOOD_PLAYCTL_ENABLE_MASK; |
257 | writel(value, priv->io + KIRKWOOD_PLAYCTL); | 261 | writel(value, priv->io + KIRKWOOD_PLAYCTL); |
258 | 262 | ||
@@ -449,14 +453,14 @@ static struct snd_soc_dai_driver kirkwood_i2s_dai[2] = { | |||
449 | .channels_max = 2, | 453 | .channels_max = 2, |
450 | .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | | 454 | .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | |
451 | SNDRV_PCM_RATE_96000, | 455 | SNDRV_PCM_RATE_96000, |
452 | .formats = KIRKWOOD_I2S_FORMATS, | 456 | .formats = KIRKWOOD_SPDIF_FORMATS, |
453 | }, | 457 | }, |
454 | .capture = { | 458 | .capture = { |
455 | .channels_min = 1, | 459 | .channels_min = 1, |
456 | .channels_max = 2, | 460 | .channels_max = 2, |
457 | .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | | 461 | .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | |
458 | SNDRV_PCM_RATE_96000, | 462 | SNDRV_PCM_RATE_96000, |
459 | .formats = KIRKWOOD_I2S_FORMATS, | 463 | .formats = KIRKWOOD_SPDIF_FORMATS, |
460 | }, | 464 | }, |
461 | .ops = &kirkwood_i2s_dai_ops, | 465 | .ops = &kirkwood_i2s_dai_ops, |
462 | }, | 466 | }, |
@@ -493,7 +497,7 @@ static struct snd_soc_dai_driver kirkwood_i2s_dai_extclk[2] = { | |||
493 | .rates = SNDRV_PCM_RATE_8000_192000 | | 497 | .rates = SNDRV_PCM_RATE_8000_192000 | |
494 | SNDRV_PCM_RATE_CONTINUOUS | | 498 | SNDRV_PCM_RATE_CONTINUOUS | |
495 | SNDRV_PCM_RATE_KNOT, | 499 | SNDRV_PCM_RATE_KNOT, |
496 | .formats = KIRKWOOD_I2S_FORMATS, | 500 | .formats = KIRKWOOD_SPDIF_FORMATS, |
497 | }, | 501 | }, |
498 | .capture = { | 502 | .capture = { |
499 | .channels_min = 1, | 503 | .channels_min = 1, |
@@ -501,7 +505,7 @@ static struct snd_soc_dai_driver kirkwood_i2s_dai_extclk[2] = { | |||
501 | .rates = SNDRV_PCM_RATE_8000_192000 | | 505 | .rates = SNDRV_PCM_RATE_8000_192000 | |
502 | SNDRV_PCM_RATE_CONTINUOUS | | 506 | SNDRV_PCM_RATE_CONTINUOUS | |
503 | SNDRV_PCM_RATE_KNOT, | 507 | SNDRV_PCM_RATE_KNOT, |
504 | .formats = KIRKWOOD_I2S_FORMATS, | 508 | .formats = KIRKWOOD_SPDIF_FORMATS, |
505 | }, | 509 | }, |
506 | .ops = &kirkwood_i2s_dai_ops, | 510 | .ops = &kirkwood_i2s_dai_ops, |
507 | }, | 511 | }, |