diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-09 12:13:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-09 12:13:10 -0400 |
commit | 047ec4b5de745fa1e0b56afcb06d431046bd36a3 (patch) | |
tree | 4da0893fd269b5016217f692a09b41f85feb2704 | |
parent | fd98a5d78062289552fff19afb9aa6918eaee63f (diff) | |
parent | 69b91bc1551a2fc746a01fea9d3291e60be3780d (diff) |
Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ASoC: Fix CODEC DAI names for Goni
ASoC: Fix CODEC name in Goni
davinci-mcasp: fix _CBM_CFS pin directions
davinci-mcasp: fix _CBM_CFS hw_params
davinci-mcasp: use bitfield definitions for PDIR
ASoC: davinci-mcasp: correct tdm_slots limit
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.c | 19 | ||||
-rw-r--r-- | sound/soc/samsung/goni_wm8994.c | 8 |
2 files changed, 16 insertions, 11 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index a5af834c8ef5..4ddc6d3b6678 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c | |||
@@ -434,17 +434,21 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
434 | mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE); | 434 | mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE); |
435 | mcasp_set_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE); | 435 | mcasp_set_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE); |
436 | 436 | ||
437 | mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG, (0x7 << 26)); | 437 | mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG, |
438 | ACLKX | AHCLKX | AFSX); | ||
438 | break; | 439 | break; |
439 | case SND_SOC_DAIFMT_CBM_CFS: | 440 | case SND_SOC_DAIFMT_CBM_CFS: |
440 | /* codec is clock master and frame slave */ | 441 | /* codec is clock master and frame slave */ |
441 | mcasp_set_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE); | 442 | mcasp_clr_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE); |
442 | mcasp_set_bits(base + DAVINCI_MCASP_TXFMCTL_REG, AFSXE); | 443 | mcasp_set_bits(base + DAVINCI_MCASP_TXFMCTL_REG, AFSXE); |
443 | 444 | ||
444 | mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE); | 445 | mcasp_clr_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE); |
445 | mcasp_set_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE); | 446 | mcasp_set_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE); |
446 | 447 | ||
447 | mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG, (0x2d << 26)); | 448 | mcasp_clr_bits(base + DAVINCI_MCASP_PDIR_REG, |
449 | ACLKX | ACLKR); | ||
450 | mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG, | ||
451 | AFSX | AFSR); | ||
448 | break; | 452 | break; |
449 | case SND_SOC_DAIFMT_CBM_CFM: | 453 | case SND_SOC_DAIFMT_CBM_CFM: |
450 | /* codec is clock and frame master */ | 454 | /* codec is clock and frame master */ |
@@ -454,7 +458,8 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
454 | mcasp_clr_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE); | 458 | mcasp_clr_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE); |
455 | mcasp_clr_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE); | 459 | mcasp_clr_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE); |
456 | 460 | ||
457 | mcasp_clr_bits(base + DAVINCI_MCASP_PDIR_REG, (0x3f << 26)); | 461 | mcasp_clr_bits(base + DAVINCI_MCASP_PDIR_REG, |
462 | ACLKX | AHCLKX | AFSX | ACLKR | AHCLKR | AFSR); | ||
458 | break; | 463 | break; |
459 | 464 | ||
460 | default: | 465 | default: |
@@ -644,7 +649,7 @@ static void davinci_hw_param(struct davinci_audio_dev *dev, int stream) | |||
644 | mcasp_set_reg(dev->base + DAVINCI_MCASP_TXTDM_REG, mask); | 649 | mcasp_set_reg(dev->base + DAVINCI_MCASP_TXTDM_REG, mask); |
645 | mcasp_set_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, TXORD); | 650 | mcasp_set_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, TXORD); |
646 | 651 | ||
647 | if ((dev->tdm_slots >= 2) || (dev->tdm_slots <= 32)) | 652 | if ((dev->tdm_slots >= 2) && (dev->tdm_slots <= 32)) |
648 | mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMCTL_REG, | 653 | mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMCTL_REG, |
649 | FSXMOD(dev->tdm_slots), FSXMOD(0x1FF)); | 654 | FSXMOD(dev->tdm_slots), FSXMOD(0x1FF)); |
650 | else | 655 | else |
@@ -660,7 +665,7 @@ static void davinci_hw_param(struct davinci_audio_dev *dev, int stream) | |||
660 | AHCLKRE); | 665 | AHCLKRE); |
661 | mcasp_set_reg(dev->base + DAVINCI_MCASP_RXTDM_REG, mask); | 666 | mcasp_set_reg(dev->base + DAVINCI_MCASP_RXTDM_REG, mask); |
662 | 667 | ||
663 | if ((dev->tdm_slots >= 2) || (dev->tdm_slots <= 32)) | 668 | if ((dev->tdm_slots >= 2) && (dev->tdm_slots <= 32)) |
664 | mcasp_mod_bits(dev->base + DAVINCI_MCASP_RXFMCTL_REG, | 669 | mcasp_mod_bits(dev->base + DAVINCI_MCASP_RXFMCTL_REG, |
665 | FSRMOD(dev->tdm_slots), FSRMOD(0x1FF)); | 670 | FSRMOD(dev->tdm_slots), FSRMOD(0x1FF)); |
666 | else | 671 | else |
diff --git a/sound/soc/samsung/goni_wm8994.c b/sound/soc/samsung/goni_wm8994.c index f6b3a3ce5919..0e80daee8b6f 100644 --- a/sound/soc/samsung/goni_wm8994.c +++ b/sound/soc/samsung/goni_wm8994.c | |||
@@ -236,18 +236,18 @@ static struct snd_soc_dai_link goni_dai[] = { | |||
236 | .name = "WM8994", | 236 | .name = "WM8994", |
237 | .stream_name = "WM8994 HiFi", | 237 | .stream_name = "WM8994 HiFi", |
238 | .cpu_dai_name = "samsung-i2s.0", | 238 | .cpu_dai_name = "samsung-i2s.0", |
239 | .codec_dai_name = "wm8994-hifi", | 239 | .codec_dai_name = "wm8994-aif1", |
240 | .platform_name = "samsung-audio", | 240 | .platform_name = "samsung-audio", |
241 | .codec_name = "wm8994-codec.0-0x1a", | 241 | .codec_name = "wm8994-codec.0-001a", |
242 | .init = goni_wm8994_init, | 242 | .init = goni_wm8994_init, |
243 | .ops = &goni_hifi_ops, | 243 | .ops = &goni_hifi_ops, |
244 | }, { | 244 | }, { |
245 | .name = "WM8994 Voice", | 245 | .name = "WM8994 Voice", |
246 | .stream_name = "Voice", | 246 | .stream_name = "Voice", |
247 | .cpu_dai_name = "goni-voice-dai", | 247 | .cpu_dai_name = "goni-voice-dai", |
248 | .codec_dai_name = "wm8994-voice", | 248 | .codec_dai_name = "wm8994-aif2", |
249 | .platform_name = "samsung-audio", | 249 | .platform_name = "samsung-audio", |
250 | .codec_name = "wm8994-codec.0-0x1a", | 250 | .codec_name = "wm8994-codec.0-001a", |
251 | .ops = &goni_voice_ops, | 251 | .ops = &goni_voice_ops, |
252 | }, | 252 | }, |
253 | }; | 253 | }; |