diff options
Diffstat (limited to 'sound')
37 files changed, 257 insertions, 107 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 7fbd68fab944..5c48e36038f2 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
@@ -1074,7 +1074,7 @@ static unsigned int __devinit aaci_size_fifo(struct aaci *aaci) | |||
1074 | return i; | 1074 | return i; |
1075 | } | 1075 | } |
1076 | 1076 | ||
1077 | static int __devinit aaci_probe(struct amba_device *dev, void *id) | 1077 | static int __devinit aaci_probe(struct amba_device *dev, struct amba_id *id) |
1078 | { | 1078 | { |
1079 | struct aaci *aaci; | 1079 | struct aaci *aaci; |
1080 | int ret, i; | 1080 | int ret, i; |
diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c index a2c12d105c9a..6fdca97186e7 100644 --- a/sound/arm/pxa2xx-ac97-lib.c +++ b/sound/arm/pxa2xx-ac97-lib.c | |||
@@ -65,7 +65,7 @@ static void set_resetgpio_mode(int resetgpio_action) | |||
65 | switch (resetgpio_action) { | 65 | switch (resetgpio_action) { |
66 | case RESETGPIO_NORMAL_ALTFUNC: | 66 | case RESETGPIO_NORMAL_ALTFUNC: |
67 | if (reset_gpio == 113) | 67 | if (reset_gpio == 113) |
68 | mode = 113 | GPIO_OUT | GPIO_DFLT_LOW; | 68 | mode = 113 | GPIO_ALT_FN_2_OUT; |
69 | if (reset_gpio == 95) | 69 | if (reset_gpio == 95) |
70 | mode = 95 | GPIO_ALT_FN_1_OUT; | 70 | mode = 95 | GPIO_ALT_FN_1_OUT; |
71 | break; | 71 | break; |
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 63d088f2265f..d659995ac3ac 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -249,6 +249,17 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream) | |||
249 | new_hw_ptr = hw_base + pos; | 249 | new_hw_ptr = hw_base + pos; |
250 | } | 250 | } |
251 | } | 251 | } |
252 | |||
253 | /* Do jiffies check only in xrun_debug mode */ | ||
254 | if (!xrun_debug(substream)) | ||
255 | goto no_jiffies_check; | ||
256 | |||
257 | /* Skip the jiffies check for hardwares with BATCH flag. | ||
258 | * Such hardware usually just increases the position at each IRQ, | ||
259 | * thus it can't give any strange position. | ||
260 | */ | ||
261 | if (runtime->hw.info & SNDRV_PCM_INFO_BATCH) | ||
262 | goto no_jiffies_check; | ||
252 | hdelta = new_hw_ptr - old_hw_ptr; | 263 | hdelta = new_hw_ptr - old_hw_ptr; |
253 | jdelta = jiffies - runtime->hw_ptr_jiffies; | 264 | jdelta = jiffies - runtime->hw_ptr_jiffies; |
254 | if (((hdelta * HZ) / runtime->rate) > jdelta + HZ/100) { | 265 | if (((hdelta * HZ) / runtime->rate) > jdelta + HZ/100) { |
@@ -272,6 +283,7 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream) | |||
272 | hw_base -= hw_base % runtime->buffer_size; | 283 | hw_base -= hw_base % runtime->buffer_size; |
273 | delta = 0; | 284 | delta = 0; |
274 | } | 285 | } |
286 | no_jiffies_check: | ||
275 | if (delta > runtime->period_size + runtime->period_size / 2) { | 287 | if (delta > runtime->period_size + runtime->period_size / 2) { |
276 | hw_ptr_error(substream, | 288 | hw_ptr_error(substream, |
277 | "Lost interrupts? " | 289 | "Lost interrupts? " |
@@ -329,7 +341,9 @@ int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream) | |||
329 | hw_base = 0; | 341 | hw_base = 0; |
330 | new_hw_ptr = hw_base + pos; | 342 | new_hw_ptr = hw_base + pos; |
331 | } | 343 | } |
332 | if (((delta * HZ) / runtime->rate) > jdelta + HZ/100) { | 344 | /* Do jiffies check only in xrun_debug mode */ |
345 | if (xrun_debug(substream) && | ||
346 | ((delta * HZ) / runtime->rate) > jdelta + HZ/100) { | ||
333 | hw_ptr_error(substream, | 347 | hw_ptr_error(substream, |
334 | "hw_ptr skipping! " | 348 | "hw_ptr skipping! " |
335 | "(pos=%ld, delta=%ld, period=%ld, jdelta=%lu/%lu)\n", | 349 | "(pos=%ld, delta=%ld, period=%ld, jdelta=%lu/%lu)\n", |
@@ -1471,7 +1485,6 @@ static int snd_pcm_lib_ioctl_reset(struct snd_pcm_substream *substream, | |||
1471 | runtime->status->hw_ptr %= runtime->buffer_size; | 1485 | runtime->status->hw_ptr %= runtime->buffer_size; |
1472 | else | 1486 | else |
1473 | runtime->status->hw_ptr = 0; | 1487 | runtime->status->hw_ptr = 0; |
1474 | runtime->hw_ptr_jiffies = jiffies; | ||
1475 | snd_pcm_stream_unlock_irqrestore(substream, flags); | 1488 | snd_pcm_stream_unlock_irqrestore(substream, flags); |
1476 | return 0; | 1489 | return 0; |
1477 | } | 1490 | } |
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index fc6f98e257df..b5da656d1ece 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -848,6 +848,7 @@ static void snd_pcm_post_start(struct snd_pcm_substream *substream, int state) | |||
848 | { | 848 | { |
849 | struct snd_pcm_runtime *runtime = substream->runtime; | 849 | struct snd_pcm_runtime *runtime = substream->runtime; |
850 | snd_pcm_trigger_tstamp(substream); | 850 | snd_pcm_trigger_tstamp(substream); |
851 | runtime->hw_ptr_jiffies = jiffies; | ||
851 | runtime->status->state = state; | 852 | runtime->status->state = state; |
852 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && | 853 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && |
853 | runtime->silence_size > 0) | 854 | runtime->silence_size > 0) |
@@ -961,6 +962,11 @@ static int snd_pcm_do_pause(struct snd_pcm_substream *substream, int push) | |||
961 | { | 962 | { |
962 | if (substream->runtime->trigger_master != substream) | 963 | if (substream->runtime->trigger_master != substream) |
963 | return 0; | 964 | return 0; |
965 | /* The jiffies check in snd_pcm_update_hw_ptr*() is done by | ||
966 | * a delta betwen the current jiffies, this gives a large enough | ||
967 | * delta, effectively to skip the check once. | ||
968 | */ | ||
969 | substream->runtime->hw_ptr_jiffies = jiffies - HZ * 1000; | ||
964 | return substream->ops->trigger(substream, | 970 | return substream->ops->trigger(substream, |
965 | push ? SNDRV_PCM_TRIGGER_PAUSE_PUSH : | 971 | push ? SNDRV_PCM_TRIGGER_PAUSE_PUSH : |
966 | SNDRV_PCM_TRIGGER_PAUSE_RELEASE); | 972 | SNDRV_PCM_TRIGGER_PAUSE_RELEASE); |
diff --git a/sound/drivers/pcsp/pcsp_mixer.c b/sound/drivers/pcsp/pcsp_mixer.c index caeb0f57fcca..199b03377142 100644 --- a/sound/drivers/pcsp/pcsp_mixer.c +++ b/sound/drivers/pcsp/pcsp_mixer.c | |||
@@ -50,8 +50,8 @@ static int pcsp_treble_info(struct snd_kcontrol *kcontrol, | |||
50 | uinfo->value.enumerated.items = chip->max_treble + 1; | 50 | uinfo->value.enumerated.items = chip->max_treble + 1; |
51 | if (uinfo->value.enumerated.item > chip->max_treble) | 51 | if (uinfo->value.enumerated.item > chip->max_treble) |
52 | uinfo->value.enumerated.item = chip->max_treble; | 52 | uinfo->value.enumerated.item = chip->max_treble; |
53 | sprintf(uinfo->value.enumerated.name, "%d", | 53 | sprintf(uinfo->value.enumerated.name, "%lu", |
54 | PCSP_CALC_RATE(uinfo->value.enumerated.item)); | 54 | (unsigned long)PCSP_CALC_RATE(uinfo->value.enumerated.item)); |
55 | return 0; | 55 | return 0; |
56 | } | 56 | } |
57 | 57 | ||
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c index b2b6d50c9425..a25fb7b1f441 100644 --- a/sound/drivers/serial-u16550.c +++ b/sound/drivers/serial-u16550.c | |||
@@ -963,16 +963,11 @@ static int __devinit snd_serial_probe(struct platform_device *devptr) | |||
963 | if (err < 0) | 963 | if (err < 0) |
964 | goto _err; | 964 | goto _err; |
965 | 965 | ||
966 | sprintf(card->longname, "%s at 0x%lx, irq %d speed %d div %d outs %d ins %d adaptor %s droponfull %d", | 966 | sprintf(card->longname, "%s [%s] at %#lx, irq %d", |
967 | card->shortname, | 967 | card->shortname, |
968 | uart->base, | ||
969 | uart->irq, | ||
970 | uart->speed, | ||
971 | (int)uart->divisor, | ||
972 | outs[dev], | ||
973 | ins[dev], | ||
974 | adaptor_names[uart->adaptor], | 968 | adaptor_names[uart->adaptor], |
975 | uart->drop_on_full); | 969 | uart->base, |
970 | uart->irq); | ||
976 | 971 | ||
977 | snd_card_set_dev(card, &devptr->dev); | 972 | snd_card_set_dev(card, &devptr->dev); |
978 | 973 | ||
diff --git a/sound/isa/msnd/msnd.c b/sound/isa/msnd/msnd.c index 906454413ed2..3a1526ae1729 100644 --- a/sound/isa/msnd/msnd.c +++ b/sound/isa/msnd/msnd.c | |||
@@ -438,7 +438,8 @@ static void snd_msnd_capture_reset_queue(struct snd_msnd *chip, | |||
438 | static struct snd_pcm_hardware snd_msnd_playback = { | 438 | static struct snd_pcm_hardware snd_msnd_playback = { |
439 | .info = SNDRV_PCM_INFO_MMAP | | 439 | .info = SNDRV_PCM_INFO_MMAP | |
440 | SNDRV_PCM_INFO_INTERLEAVED | | 440 | SNDRV_PCM_INFO_INTERLEAVED | |
441 | SNDRV_PCM_INFO_MMAP_VALID, | 441 | SNDRV_PCM_INFO_MMAP_VALID | |
442 | SNDRV_PCM_INFO_BATCH, | ||
442 | .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, | 443 | .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, |
443 | .rates = SNDRV_PCM_RATE_8000_48000, | 444 | .rates = SNDRV_PCM_RATE_8000_48000, |
444 | .rate_min = 8000, | 445 | .rate_min = 8000, |
@@ -456,7 +457,8 @@ static struct snd_pcm_hardware snd_msnd_playback = { | |||
456 | static struct snd_pcm_hardware snd_msnd_capture = { | 457 | static struct snd_pcm_hardware snd_msnd_capture = { |
457 | .info = SNDRV_PCM_INFO_MMAP | | 458 | .info = SNDRV_PCM_INFO_MMAP | |
458 | SNDRV_PCM_INFO_INTERLEAVED | | 459 | SNDRV_PCM_INFO_INTERLEAVED | |
459 | SNDRV_PCM_INFO_MMAP_VALID, | 460 | SNDRV_PCM_INFO_MMAP_VALID | |
461 | SNDRV_PCM_INFO_BATCH, | ||
460 | .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, | 462 | .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, |
461 | .rates = SNDRV_PCM_RATE_8000_48000, | 463 | .rates = SNDRV_PCM_RATE_8000_48000, |
462 | .rate_min = 8000, | 464 | .rate_min = 8000, |
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 81bc93e5f1e3..7337abdbe4e3 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c | |||
@@ -958,10 +958,13 @@ static int patch_sigmatel_stac9708_3d(struct snd_ac97 * ac97) | |||
958 | } | 958 | } |
959 | 959 | ||
960 | static const struct snd_kcontrol_new snd_ac97_sigmatel_4speaker = | 960 | static const struct snd_kcontrol_new snd_ac97_sigmatel_4speaker = |
961 | AC97_SINGLE("Sigmatel 4-Speaker Stereo Playback Switch", AC97_SIGMATEL_DAC2INVERT, 2, 1, 0); | 961 | AC97_SINGLE("Sigmatel 4-Speaker Stereo Playback Switch", |
962 | AC97_SIGMATEL_DAC2INVERT, 2, 1, 0); | ||
962 | 963 | ||
964 | /* "Sigmatel " removed due to excessive name length: */ | ||
963 | static const struct snd_kcontrol_new snd_ac97_sigmatel_phaseinvert = | 965 | static const struct snd_kcontrol_new snd_ac97_sigmatel_phaseinvert = |
964 | AC97_SINGLE("Sigmatel Surround Phase Inversion Playback Switch", AC97_SIGMATEL_DAC2INVERT, 3, 1, 0); | 966 | AC97_SINGLE("Surround Phase Inversion Playback Switch", |
967 | AC97_SIGMATEL_DAC2INVERT, 3, 1, 0); | ||
965 | 968 | ||
966 | static const struct snd_kcontrol_new snd_ac97_sigmatel_controls[] = { | 969 | static const struct snd_kcontrol_new snd_ac97_sigmatel_controls[] = { |
967 | AC97_SINGLE("Sigmatel DAC 6dB Attenuate", AC97_SIGMATEL_ANALOG, 1, 1, 0), | 970 | AC97_SINGLE("Sigmatel DAC 6dB Attenuate", AC97_SIGMATEL_ANALOG, 1, 1, 0), |
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index a299340519df..ce3f2e90f4d7 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
@@ -349,7 +349,8 @@ static struct snd_pcm_hardware snd_bt87x_digital_hw = { | |||
349 | .info = SNDRV_PCM_INFO_MMAP | | 349 | .info = SNDRV_PCM_INFO_MMAP | |
350 | SNDRV_PCM_INFO_INTERLEAVED | | 350 | SNDRV_PCM_INFO_INTERLEAVED | |
351 | SNDRV_PCM_INFO_BLOCK_TRANSFER | | 351 | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
352 | SNDRV_PCM_INFO_MMAP_VALID, | 352 | SNDRV_PCM_INFO_MMAP_VALID | |
353 | SNDRV_PCM_INFO_BATCH, | ||
353 | .formats = SNDRV_PCM_FMTBIT_S16_LE, | 354 | .formats = SNDRV_PCM_FMTBIT_S16_LE, |
354 | .rates = 0, /* set at runtime */ | 355 | .rates = 0, /* set at runtime */ |
355 | .channels_min = 2, | 356 | .channels_min = 2, |
@@ -365,7 +366,8 @@ static struct snd_pcm_hardware snd_bt87x_analog_hw = { | |||
365 | .info = SNDRV_PCM_INFO_MMAP | | 366 | .info = SNDRV_PCM_INFO_MMAP | |
366 | SNDRV_PCM_INFO_INTERLEAVED | | 367 | SNDRV_PCM_INFO_INTERLEAVED | |
367 | SNDRV_PCM_INFO_BLOCK_TRANSFER | | 368 | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
368 | SNDRV_PCM_INFO_MMAP_VALID, | 369 | SNDRV_PCM_INFO_MMAP_VALID | |
370 | SNDRV_PCM_INFO_BATCH, | ||
369 | .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8, | 371 | .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8, |
370 | .rates = SNDRV_PCM_RATE_KNOT, | 372 | .rates = SNDRV_PCM_RATE_KNOT, |
371 | .rate_min = ANALOG_CLOCK / CLOCK_DIV_MAX, | 373 | .rate_min = ANALOG_CLOCK / CLOCK_DIV_MAX, |
diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c index ad2888705d2a..c111efe61c3c 100644 --- a/sound/pci/ca0106/ca0106_mixer.c +++ b/sound/pci/ca0106/ca0106_mixer.c | |||
@@ -800,7 +800,7 @@ int __devinit snd_ca0106_mixer(struct snd_ca0106 *emu) | |||
800 | "Capture Volume", | 800 | "Capture Volume", |
801 | "External Amplifier", | 801 | "External Amplifier", |
802 | "Sigmatel 4-Speaker Stereo Playback Switch", | 802 | "Sigmatel 4-Speaker Stereo Playback Switch", |
803 | "Sigmatel Surround Phase Inversion Playback ", | 803 | "Surround Phase Inversion Playback Switch", |
804 | NULL | 804 | NULL |
805 | }; | 805 | }; |
806 | static char *ca0106_rename_ctls[] = { | 806 | static char *ca0106_rename_ctls[] = { |
diff --git a/sound/pci/echoaudio/indigodjx.c b/sound/pci/echoaudio/indigodjx.c index 3482ef69f491..2e44316530a2 100644 --- a/sound/pci/echoaudio/indigodjx.c +++ b/sound/pci/echoaudio/indigodjx.c | |||
@@ -88,6 +88,7 @@ static struct snd_pcm_hardware pcm_hardware_skel = { | |||
88 | .rates = SNDRV_PCM_RATE_32000 | | 88 | .rates = SNDRV_PCM_RATE_32000 | |
89 | SNDRV_PCM_RATE_44100 | | 89 | SNDRV_PCM_RATE_44100 | |
90 | SNDRV_PCM_RATE_48000 | | 90 | SNDRV_PCM_RATE_48000 | |
91 | SNDRV_PCM_RATE_64000 | | ||
91 | SNDRV_PCM_RATE_88200 | | 92 | SNDRV_PCM_RATE_88200 | |
92 | SNDRV_PCM_RATE_96000, | 93 | SNDRV_PCM_RATE_96000, |
93 | .rate_min = 32000, | 94 | .rate_min = 32000, |
diff --git a/sound/pci/echoaudio/indigoiox.c b/sound/pci/echoaudio/indigoiox.c index aebee27a40ff..eb3819f9654a 100644 --- a/sound/pci/echoaudio/indigoiox.c +++ b/sound/pci/echoaudio/indigoiox.c | |||
@@ -89,6 +89,7 @@ static struct snd_pcm_hardware pcm_hardware_skel = { | |||
89 | .rates = SNDRV_PCM_RATE_32000 | | 89 | .rates = SNDRV_PCM_RATE_32000 | |
90 | SNDRV_PCM_RATE_44100 | | 90 | SNDRV_PCM_RATE_44100 | |
91 | SNDRV_PCM_RATE_48000 | | 91 | SNDRV_PCM_RATE_48000 | |
92 | SNDRV_PCM_RATE_64000 | | ||
92 | SNDRV_PCM_RATE_88200 | | 93 | SNDRV_PCM_RATE_88200 | |
93 | SNDRV_PCM_RATE_96000, | 94 | SNDRV_PCM_RATE_96000, |
94 | .rate_min = 32000, | 95 | .rate_min = 32000, |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 21e99cfa8c49..3128e1a6bc65 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -2141,6 +2141,7 @@ static struct snd_pci_quirk probe_mask_list[] __devinitdata = { | |||
2141 | /* including bogus ALC268 in slot#2 that conflicts with ALC888 */ | 2141 | /* including bogus ALC268 in slot#2 that conflicts with ALC888 */ |
2142 | SND_PCI_QUIRK(0x17c0, 0x4085, "Medion MD96630", 0x01), | 2142 | SND_PCI_QUIRK(0x17c0, 0x4085, "Medion MD96630", 0x01), |
2143 | /* forced codec slots */ | 2143 | /* forced codec slots */ |
2144 | SND_PCI_QUIRK(0x1043, 0x1262, "ASUS W5Fm", 0x103), | ||
2144 | SND_PCI_QUIRK(0x1046, 0x1262, "ASUS W5F", 0x103), | 2145 | SND_PCI_QUIRK(0x1046, 0x1262, "ASUS W5F", 0x103), |
2145 | {} | 2146 | {} |
2146 | }; | 2147 | }; |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 56ce19e68cb5..4fcbe21829ab 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -1848,6 +1848,7 @@ static const char *cxt5051_models[CXT5051_MODELS] = { | |||
1848 | 1848 | ||
1849 | static struct snd_pci_quirk cxt5051_cfg_tbl[] = { | 1849 | static struct snd_pci_quirk cxt5051_cfg_tbl[] = { |
1850 | SND_PCI_QUIRK(0x103c, 0x30cf, "HP DV6736", CXT5051_HP_DV6736), | 1850 | SND_PCI_QUIRK(0x103c, 0x30cf, "HP DV6736", CXT5051_HP_DV6736), |
1851 | SND_PCI_QUIRK(0x103c, 0x360b, "Compaq Presario CQ60", CXT5051_HP), | ||
1851 | SND_PCI_QUIRK(0x14f1, 0x0101, "Conexant Reference board", | 1852 | SND_PCI_QUIRK(0x14f1, 0x0101, "Conexant Reference board", |
1852 | CXT5051_LAPTOP), | 1853 | CXT5051_LAPTOP), |
1853 | SND_PCI_QUIRK(0x14f1, 0x5051, "HP Spartan 1.1", CXT5051_HP), | 1854 | SND_PCI_QUIRK(0x14f1, 0x5051, "HP Spartan 1.1", CXT5051_HP), |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index b8a0d3e79272..0fd258eba3a5 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -776,6 +776,12 @@ static void alc_set_input_pin(struct hda_codec *codec, hda_nid_t nid, | |||
776 | pincap = (pincap & AC_PINCAP_VREF) >> AC_PINCAP_VREF_SHIFT; | 776 | pincap = (pincap & AC_PINCAP_VREF) >> AC_PINCAP_VREF_SHIFT; |
777 | if (pincap & AC_PINCAP_VREF_80) | 777 | if (pincap & AC_PINCAP_VREF_80) |
778 | val = PIN_VREF80; | 778 | val = PIN_VREF80; |
779 | else if (pincap & AC_PINCAP_VREF_50) | ||
780 | val = PIN_VREF50; | ||
781 | else if (pincap & AC_PINCAP_VREF_100) | ||
782 | val = PIN_VREF100; | ||
783 | else if (pincap & AC_PINCAP_VREF_GRD) | ||
784 | val = PIN_VREFGRD; | ||
779 | } | 785 | } |
780 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, val); | 786 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, val); |
781 | } | 787 | } |
@@ -12058,6 +12064,7 @@ static struct snd_pci_quirk alc268_cfg_tbl[] = { | |||
12058 | SND_PCI_QUIRK(0x1028, 0x0253, "Dell OEM", ALC268_DELL), | 12064 | SND_PCI_QUIRK(0x1028, 0x0253, "Dell OEM", ALC268_DELL), |
12059 | SND_PCI_QUIRK(0x1028, 0x02b0, "Dell Inspiron Mini9", ALC268_DELL), | 12065 | SND_PCI_QUIRK(0x1028, 0x02b0, "Dell Inspiron Mini9", ALC268_DELL), |
12060 | SND_PCI_QUIRK(0x103c, 0x30cc, "TOSHIBA", ALC268_TOSHIBA), | 12066 | SND_PCI_QUIRK(0x103c, 0x30cc, "TOSHIBA", ALC268_TOSHIBA), |
12067 | SND_PCI_QUIRK(0x103c, 0x30f1, "HP TX25xx series", ALC268_TOSHIBA), | ||
12061 | SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST), | 12068 | SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST), |
12062 | SND_PCI_QUIRK(0x1179, 0xff10, "TOSHIBA A205", ALC268_TOSHIBA), | 12069 | SND_PCI_QUIRK(0x1179, 0xff10, "TOSHIBA A205", ALC268_TOSHIBA), |
12063 | SND_PCI_QUIRK(0x1179, 0xff50, "TOSHIBA A305", ALC268_TOSHIBA), | 12070 | SND_PCI_QUIRK(0x1179, 0xff50, "TOSHIBA A305", ALC268_TOSHIBA), |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 917bc5d3ac2c..d2fd8ef6aef8 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -150,6 +150,7 @@ enum { | |||
150 | STAC_D965_REF, | 150 | STAC_D965_REF, |
151 | STAC_D965_3ST, | 151 | STAC_D965_3ST, |
152 | STAC_D965_5ST, | 152 | STAC_D965_5ST, |
153 | STAC_D965_5ST_NO_FP, | ||
153 | STAC_DELL_3ST, | 154 | STAC_DELL_3ST, |
154 | STAC_DELL_BIOS, | 155 | STAC_DELL_BIOS, |
155 | STAC_927X_MODELS | 156 | STAC_927X_MODELS |
@@ -2154,6 +2155,13 @@ static unsigned int d965_5st_pin_configs[14] = { | |||
2154 | 0x40000100, 0x40000100 | 2155 | 0x40000100, 0x40000100 |
2155 | }; | 2156 | }; |
2156 | 2157 | ||
2158 | static unsigned int d965_5st_no_fp_pin_configs[14] = { | ||
2159 | 0x40000100, 0x40000100, 0x0181304e, 0x01014010, | ||
2160 | 0x01a19040, 0x01011012, 0x01016011, 0x40000100, | ||
2161 | 0x40000100, 0x40000100, 0x40000100, 0x01442070, | ||
2162 | 0x40000100, 0x40000100 | ||
2163 | }; | ||
2164 | |||
2157 | static unsigned int dell_3st_pin_configs[14] = { | 2165 | static unsigned int dell_3st_pin_configs[14] = { |
2158 | 0x02211230, 0x02a11220, 0x01a19040, 0x01114210, | 2166 | 0x02211230, 0x02a11220, 0x01a19040, 0x01114210, |
2159 | 0x01111212, 0x01116211, 0x01813050, 0x01112214, | 2167 | 0x01111212, 0x01116211, 0x01813050, 0x01112214, |
@@ -2166,6 +2174,7 @@ static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = { | |||
2166 | [STAC_D965_REF] = ref927x_pin_configs, | 2174 | [STAC_D965_REF] = ref927x_pin_configs, |
2167 | [STAC_D965_3ST] = d965_3st_pin_configs, | 2175 | [STAC_D965_3ST] = d965_3st_pin_configs, |
2168 | [STAC_D965_5ST] = d965_5st_pin_configs, | 2176 | [STAC_D965_5ST] = d965_5st_pin_configs, |
2177 | [STAC_D965_5ST_NO_FP] = d965_5st_no_fp_pin_configs, | ||
2169 | [STAC_DELL_3ST] = dell_3st_pin_configs, | 2178 | [STAC_DELL_3ST] = dell_3st_pin_configs, |
2170 | [STAC_DELL_BIOS] = NULL, | 2179 | [STAC_DELL_BIOS] = NULL, |
2171 | }; | 2180 | }; |
@@ -2176,6 +2185,7 @@ static const char *stac927x_models[STAC_927X_MODELS] = { | |||
2176 | [STAC_D965_REF] = "ref", | 2185 | [STAC_D965_REF] = "ref", |
2177 | [STAC_D965_3ST] = "3stack", | 2186 | [STAC_D965_3ST] = "3stack", |
2178 | [STAC_D965_5ST] = "5stack", | 2187 | [STAC_D965_5ST] = "5stack", |
2188 | [STAC_D965_5ST_NO_FP] = "5stack-no-fp", | ||
2179 | [STAC_DELL_3ST] = "dell-3stack", | 2189 | [STAC_DELL_3ST] = "dell-3stack", |
2180 | [STAC_DELL_BIOS] = "dell-bios", | 2190 | [STAC_DELL_BIOS] = "dell-bios", |
2181 | }; | 2191 | }; |
@@ -4079,7 +4089,12 @@ static int stac92xx_init(struct hda_codec *codec) | |||
4079 | pinctl = snd_hda_codec_read(codec, nid, 0, | 4089 | pinctl = snd_hda_codec_read(codec, nid, 0, |
4080 | AC_VERB_GET_PIN_WIDGET_CONTROL, 0); | 4090 | AC_VERB_GET_PIN_WIDGET_CONTROL, 0); |
4081 | /* if PINCTL already set then skip */ | 4091 | /* if PINCTL already set then skip */ |
4082 | if (!(pinctl & AC_PINCTL_IN_EN)) { | 4092 | /* Also, if both INPUT and OUTPUT are set, |
4093 | * it must be a BIOS bug; need to override, too | ||
4094 | */ | ||
4095 | if (!(pinctl & AC_PINCTL_IN_EN) || | ||
4096 | (pinctl & AC_PINCTL_OUT_EN)) { | ||
4097 | pinctl &= ~AC_PINCTL_OUT_EN; | ||
4083 | pinctl |= AC_PINCTL_IN_EN; | 4098 | pinctl |= AC_PINCTL_IN_EN; |
4084 | stac92xx_auto_set_pinctl(codec, nid, | 4099 | stac92xx_auto_set_pinctl(codec, nid, |
4085 | pinctl); | 4100 | pinctl); |
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index 8b79969034be..7cc38a11e997 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c | |||
@@ -1238,7 +1238,8 @@ static struct snd_pcm_hardware snd_korg1212_playback_info = | |||
1238 | { | 1238 | { |
1239 | .info = (SNDRV_PCM_INFO_MMAP | | 1239 | .info = (SNDRV_PCM_INFO_MMAP | |
1240 | SNDRV_PCM_INFO_MMAP_VALID | | 1240 | SNDRV_PCM_INFO_MMAP_VALID | |
1241 | SNDRV_PCM_INFO_INTERLEAVED), | 1241 | SNDRV_PCM_INFO_INTERLEAVED | |
1242 | SNDRV_PCM_INFO_BATCH), | ||
1242 | .formats = SNDRV_PCM_FMTBIT_S16_LE, | 1243 | .formats = SNDRV_PCM_FMTBIT_S16_LE, |
1243 | .rates = (SNDRV_PCM_RATE_44100 | | 1244 | .rates = (SNDRV_PCM_RATE_44100 | |
1244 | SNDRV_PCM_RATE_48000), | 1245 | SNDRV_PCM_RATE_48000), |
@@ -1258,7 +1259,8 @@ static struct snd_pcm_hardware snd_korg1212_capture_info = | |||
1258 | { | 1259 | { |
1259 | .info = (SNDRV_PCM_INFO_MMAP | | 1260 | .info = (SNDRV_PCM_INFO_MMAP | |
1260 | SNDRV_PCM_INFO_MMAP_VALID | | 1261 | SNDRV_PCM_INFO_MMAP_VALID | |
1261 | SNDRV_PCM_INFO_INTERLEAVED), | 1262 | SNDRV_PCM_INFO_INTERLEAVED | |
1263 | SNDRV_PCM_INFO_BATCH), | ||
1262 | .formats = SNDRV_PCM_FMTBIT_S16_LE, | 1264 | .formats = SNDRV_PCM_FMTBIT_S16_LE, |
1263 | .rates = (SNDRV_PCM_RATE_44100 | | 1265 | .rates = (SNDRV_PCM_RATE_44100 | |
1264 | SNDRV_PCM_RATE_48000), | 1266 | SNDRV_PCM_RATE_48000), |
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c index 6f1034417a02..e51a5ef1954d 100644 --- a/sound/pci/riptide/riptide.c +++ b/sound/pci/riptide/riptide.c | |||
@@ -889,7 +889,7 @@ static int sendcmd(struct cmdif *cif, u32 flags, u32 cmd, u32 parm, | |||
889 | spin_lock_irqsave(&cif->lock, irqflags); | 889 | spin_lock_irqsave(&cif->lock, irqflags); |
890 | while (i++ < CMDIF_TIMEOUT && !IS_READY(cif->hwport)) | 890 | while (i++ < CMDIF_TIMEOUT && !IS_READY(cif->hwport)) |
891 | udelay(10); | 891 | udelay(10); |
892 | if (i >= CMDIF_TIMEOUT) { | 892 | if (i > CMDIF_TIMEOUT) { |
893 | err = -EBUSY; | 893 | err = -EBUSY; |
894 | goto errout; | 894 | goto errout; |
895 | } | 895 | } |
@@ -907,8 +907,10 @@ static int sendcmd(struct cmdif *cif, u32 flags, u32 cmd, u32 parm, | |||
907 | WRITE_PORT_ULONG(cmdport->data1, cmd); /* write cmd */ | 907 | WRITE_PORT_ULONG(cmdport->data1, cmd); /* write cmd */ |
908 | if ((flags & RESP) && ret) { | 908 | if ((flags & RESP) && ret) { |
909 | while (!IS_DATF(cmdport) && | 909 | while (!IS_DATF(cmdport) && |
910 | time++ < CMDIF_TIMEOUT) | 910 | time < CMDIF_TIMEOUT) { |
911 | udelay(10); | 911 | udelay(10); |
912 | time++; | ||
913 | } | ||
912 | if (time < CMDIF_TIMEOUT) { /* read response */ | 914 | if (time < CMDIF_TIMEOUT) { /* read response */ |
913 | ret->retlongs[0] = | 915 | ret->retlongs[0] = |
914 | READ_PORT_ULONG(cmdport->data1); | 916 | READ_PORT_ULONG(cmdport->data1); |
@@ -1454,7 +1456,7 @@ static int snd_riptide_trigger(struct snd_pcm_substream *substream, int cmd) | |||
1454 | SEND_GPOS(cif, 0, data->id, &rptr); | 1456 | SEND_GPOS(cif, 0, data->id, &rptr); |
1455 | udelay(1); | 1457 | udelay(1); |
1456 | } while (i != rptr.retlongs[1] && j++ < MAX_WRITE_RETRY); | 1458 | } while (i != rptr.retlongs[1] && j++ < MAX_WRITE_RETRY); |
1457 | if (j >= MAX_WRITE_RETRY) | 1459 | if (j > MAX_WRITE_RETRY) |
1458 | snd_printk(KERN_ERR "Riptide: Could not stop stream!"); | 1460 | snd_printk(KERN_ERR "Riptide: Could not stop stream!"); |
1459 | break; | 1461 | break; |
1460 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: | 1462 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: |
@@ -1783,7 +1785,7 @@ snd_riptide_codec_write(struct snd_ac97 *ac97, unsigned short reg, | |||
1783 | SEND_SACR(cif, val, reg); | 1785 | SEND_SACR(cif, val, reg); |
1784 | SEND_RACR(cif, reg, &rptr); | 1786 | SEND_RACR(cif, reg, &rptr); |
1785 | } while (rptr.retwords[1] != val && i++ < MAX_WRITE_RETRY); | 1787 | } while (rptr.retwords[1] != val && i++ < MAX_WRITE_RETRY); |
1786 | if (i == MAX_WRITE_RETRY) | 1788 | if (i > MAX_WRITE_RETRY) |
1787 | snd_printdd("Write AC97 reg failed\n"); | 1789 | snd_printdd("Write AC97 reg failed\n"); |
1788 | } | 1790 | } |
1789 | 1791 | ||
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 809b233dd4a3..1ef58c51c213 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -1687,7 +1687,7 @@ static int snd_via8233_pcmdxs_volume_put(struct snd_kcontrol *kcontrol, | |||
1687 | return change; | 1687 | return change; |
1688 | } | 1688 | } |
1689 | 1689 | ||
1690 | static const DECLARE_TLV_DB_SCALE(db_scale_dxs, -9450, 150, 1); | 1690 | static const DECLARE_TLV_DB_SCALE(db_scale_dxs, -4650, 150, 1); |
1691 | 1691 | ||
1692 | static struct snd_kcontrol_new snd_via8233_pcmdxs_volume_control __devinitdata = { | 1692 | static struct snd_kcontrol_new snd_via8233_pcmdxs_volume_control __devinitdata = { |
1693 | .name = "PCM Playback Volume", | 1693 | .name = "PCM Playback Volume", |
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c index 01066c95580e..d057e6489643 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c | |||
@@ -240,7 +240,8 @@ static int pdacf_pcm_prepare(struct snd_pcm_substream *subs) | |||
240 | static struct snd_pcm_hardware pdacf_pcm_capture_hw = { | 240 | static struct snd_pcm_hardware pdacf_pcm_capture_hw = { |
241 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 241 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
242 | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME | | 242 | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME | |
243 | SNDRV_PCM_INFO_MMAP_VALID), | 243 | SNDRV_PCM_INFO_MMAP_VALID | |
244 | SNDRV_PCM_INFO_BATCH), | ||
244 | .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE | | 245 | .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE | |
245 | SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_3BE | | 246 | SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_3BE | |
246 | SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S32_BE, | 247 | SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S32_BE, |
diff --git a/sound/soc/au1x/dbdma2.c b/sound/soc/au1x/dbdma2.c index 30490a259148..594c6c5b7838 100644 --- a/sound/soc/au1x/dbdma2.c +++ b/sound/soc/au1x/dbdma2.c | |||
@@ -82,7 +82,7 @@ static struct au1xpsc_audio_dmadata *au1xpsc_audio_pcmdma[2]; | |||
82 | /* PCM hardware DMA capabilities - platform specific */ | 82 | /* PCM hardware DMA capabilities - platform specific */ |
83 | static const struct snd_pcm_hardware au1xpsc_pcm_hardware = { | 83 | static const struct snd_pcm_hardware au1xpsc_pcm_hardware = { |
84 | .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | | 84 | .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | |
85 | SNDRV_PCM_INFO_INTERLEAVED, | 85 | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BATCH, |
86 | .formats = AU1XPSC_PCM_FMTS, | 86 | .formats = AU1XPSC_PCM_FMTS, |
87 | .period_bytes_min = AU1XPSC_PERIOD_MIN_BYTES, | 87 | .period_bytes_min = AU1XPSC_PERIOD_MIN_BYTES, |
88 | .period_bytes_max = 4096 * 1024 - 1, | 88 | .period_bytes_max = 4096 * 1024 - 1, |
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 921b205de28a..df7c8c281d2f 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
@@ -836,6 +836,12 @@ static DECLARE_TLV_DB_SCALE(analog_tlv, -2400, 200, 0); | |||
836 | static DECLARE_TLV_DB_SCALE(output_tvl, -1200, 600, 1); | 836 | static DECLARE_TLV_DB_SCALE(output_tvl, -1200, 600, 1); |
837 | 837 | ||
838 | /* | 838 | /* |
839 | * Gain control for earpiece amplifier | ||
840 | * 0 dB to 12 dB in 6 dB steps (mute instead of -6) | ||
841 | */ | ||
842 | static DECLARE_TLV_DB_SCALE(output_ear_tvl, -600, 600, 1); | ||
843 | |||
844 | /* | ||
839 | * Capture gain after the ADCs | 845 | * Capture gain after the ADCs |
840 | * from 0 dB to 31 dB in 1 dB steps | 846 | * from 0 dB to 31 dB in 1 dB steps |
841 | */ | 847 | */ |
@@ -900,7 +906,7 @@ static const struct snd_kcontrol_new twl4030_snd_controls[] = { | |||
900 | 4, 3, 0, output_tvl), | 906 | 4, 3, 0, output_tvl), |
901 | 907 | ||
902 | SOC_SINGLE_TLV_TWL4030("Earpiece Playback Volume", | 908 | SOC_SINGLE_TLV_TWL4030("Earpiece Playback Volume", |
903 | TWL4030_REG_EAR_CTL, 4, 3, 0, output_tvl), | 909 | TWL4030_REG_EAR_CTL, 4, 3, 0, output_ear_tvl), |
904 | 910 | ||
905 | /* Common capture gain controls */ | 911 | /* Common capture gain controls */ |
906 | SOC_DOUBLE_R_TLV("TX1 Digital Capture Volume", | 912 | SOC_DOUBLE_R_TLV("TX1 Digital Capture Volume", |
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index 3b1d0993bed9..0275321ff8ab 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c | |||
@@ -968,7 +968,7 @@ static int wm8350_pcm_trigger(struct snd_pcm_substream *substream, | |||
968 | * required for LRC in master mode. The DACs or ADCs need a | 968 | * required for LRC in master mode. The DACs or ADCs need a |
969 | * valid audio path i.e. pin -> ADC or DAC -> pin before | 969 | * valid audio path i.e. pin -> ADC or DAC -> pin before |
970 | * the LRC will be enabled in master mode. */ | 970 | * the LRC will be enabled in master mode. */ |
971 | if (!master && cmd != SNDRV_PCM_TRIGGER_START) | 971 | if (!master || cmd != SNDRV_PCM_TRIGGER_START) |
972 | return 0; | 972 | return 0; |
973 | 973 | ||
974 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { | 974 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { |
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index c518c3e5aa3f..40cd274eb1ef 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -729,7 +729,7 @@ SND_SOC_DAPM_MIXER_E("INMIXL", WM8990_INTDRIVBITS, WM8990_INMIXL_PWR_BIT, 0, | |||
729 | inmixer_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), | 729 | inmixer_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), |
730 | 730 | ||
731 | /* AINLMUX */ | 731 | /* AINLMUX */ |
732 | SND_SOC_DAPM_MUX_E("AILNMUX", WM8990_INTDRIVBITS, WM8990_AINLMUX_PWR_BIT, 0, | 732 | SND_SOC_DAPM_MUX_E("AINLMUX", WM8990_INTDRIVBITS, WM8990_AINLMUX_PWR_BIT, 0, |
733 | &wm8990_dapm_ainlmux_controls, inmixer_event, | 733 | &wm8990_dapm_ainlmux_controls, inmixer_event, |
734 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), | 734 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), |
735 | 735 | ||
@@ -740,7 +740,7 @@ SND_SOC_DAPM_MIXER_E("INMIXR", WM8990_INTDRIVBITS, WM8990_INMIXR_PWR_BIT, 0, | |||
740 | inmixer_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), | 740 | inmixer_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), |
741 | 741 | ||
742 | /* AINRMUX */ | 742 | /* AINRMUX */ |
743 | SND_SOC_DAPM_MUX_E("AIRNMUX", WM8990_INTDRIVBITS, WM8990_AINRMUX_PWR_BIT, 0, | 743 | SND_SOC_DAPM_MUX_E("AINRMUX", WM8990_INTDRIVBITS, WM8990_AINRMUX_PWR_BIT, 0, |
744 | &wm8990_dapm_ainrmux_controls, inmixer_event, | 744 | &wm8990_dapm_ainrmux_controls, inmixer_event, |
745 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), | 745 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), |
746 | 746 | ||
@@ -848,40 +848,40 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
848 | {"LIN12 PGA", "LIN2 Switch", "LIN2"}, | 848 | {"LIN12 PGA", "LIN2 Switch", "LIN2"}, |
849 | /* LIN34 PGA */ | 849 | /* LIN34 PGA */ |
850 | {"LIN34 PGA", "LIN3 Switch", "LIN3"}, | 850 | {"LIN34 PGA", "LIN3 Switch", "LIN3"}, |
851 | {"LIN34 PGA", "LIN4 Switch", "LIN4"}, | 851 | {"LIN34 PGA", "LIN4 Switch", "LIN4/RXN"}, |
852 | /* INMIXL */ | 852 | /* INMIXL */ |
853 | {"INMIXL", "Record Left Volume", "LOMIX"}, | 853 | {"INMIXL", "Record Left Volume", "LOMIX"}, |
854 | {"INMIXL", "LIN2 Volume", "LIN2"}, | 854 | {"INMIXL", "LIN2 Volume", "LIN2"}, |
855 | {"INMIXL", "LINPGA12 Switch", "LIN12 PGA"}, | 855 | {"INMIXL", "LINPGA12 Switch", "LIN12 PGA"}, |
856 | {"INMIXL", "LINPGA34 Switch", "LIN34 PGA"}, | 856 | {"INMIXL", "LINPGA34 Switch", "LIN34 PGA"}, |
857 | /* AILNMUX */ | 857 | /* AINLMUX */ |
858 | {"AILNMUX", "INMIXL Mix", "INMIXL"}, | 858 | {"AINLMUX", "INMIXL Mix", "INMIXL"}, |
859 | {"AILNMUX", "DIFFINL Mix", "LIN12PGA"}, | 859 | {"AINLMUX", "DIFFINL Mix", "LIN12 PGA"}, |
860 | {"AILNMUX", "DIFFINL Mix", "LIN34PGA"}, | 860 | {"AINLMUX", "DIFFINL Mix", "LIN34 PGA"}, |
861 | {"AILNMUX", "RXVOICE Mix", "LIN4/RXN"}, | 861 | {"AINLMUX", "RXVOICE Mix", "LIN4/RXN"}, |
862 | {"AILNMUX", "RXVOICE Mix", "RIN4/RXP"}, | 862 | {"AINLMUX", "RXVOICE Mix", "RIN4/RXP"}, |
863 | /* ADC */ | 863 | /* ADC */ |
864 | {"Left ADC", NULL, "AILNMUX"}, | 864 | {"Left ADC", NULL, "AINLMUX"}, |
865 | 865 | ||
866 | /* RIN12 PGA */ | 866 | /* RIN12 PGA */ |
867 | {"RIN12 PGA", "RIN1 Switch", "RIN1"}, | 867 | {"RIN12 PGA", "RIN1 Switch", "RIN1"}, |
868 | {"RIN12 PGA", "RIN2 Switch", "RIN2"}, | 868 | {"RIN12 PGA", "RIN2 Switch", "RIN2"}, |
869 | /* RIN34 PGA */ | 869 | /* RIN34 PGA */ |
870 | {"RIN34 PGA", "RIN3 Switch", "RIN3"}, | 870 | {"RIN34 PGA", "RIN3 Switch", "RIN3"}, |
871 | {"RIN34 PGA", "RIN4 Switch", "RIN4"}, | 871 | {"RIN34 PGA", "RIN4 Switch", "RIN4/RXP"}, |
872 | /* INMIXL */ | 872 | /* INMIXL */ |
873 | {"INMIXR", "Record Right Volume", "ROMIX"}, | 873 | {"INMIXR", "Record Right Volume", "ROMIX"}, |
874 | {"INMIXR", "RIN2 Volume", "RIN2"}, | 874 | {"INMIXR", "RIN2 Volume", "RIN2"}, |
875 | {"INMIXR", "RINPGA12 Switch", "RIN12 PGA"}, | 875 | {"INMIXR", "RINPGA12 Switch", "RIN12 PGA"}, |
876 | {"INMIXR", "RINPGA34 Switch", "RIN34 PGA"}, | 876 | {"INMIXR", "RINPGA34 Switch", "RIN34 PGA"}, |
877 | /* AIRNMUX */ | 877 | /* AINRMUX */ |
878 | {"AIRNMUX", "INMIXR Mix", "INMIXR"}, | 878 | {"AINRMUX", "INMIXR Mix", "INMIXR"}, |
879 | {"AIRNMUX", "DIFFINR Mix", "RIN12PGA"}, | 879 | {"AINRMUX", "DIFFINR Mix", "RIN12 PGA"}, |
880 | {"AIRNMUX", "DIFFINR Mix", "RIN34PGA"}, | 880 | {"AINRMUX", "DIFFINR Mix", "RIN34 PGA"}, |
881 | {"AIRNMUX", "RXVOICE Mix", "RIN4/RXN"}, | 881 | {"AINRMUX", "RXVOICE Mix", "LIN4/RXN"}, |
882 | {"AIRNMUX", "RXVOICE Mix", "RIN4/RXP"}, | 882 | {"AINRMUX", "RXVOICE Mix", "RIN4/RXP"}, |
883 | /* ADC */ | 883 | /* ADC */ |
884 | {"Right ADC", NULL, "AIRNMUX"}, | 884 | {"Right ADC", NULL, "AINRMUX"}, |
885 | 885 | ||
886 | /* LOMIX */ | 886 | /* LOMIX */ |
887 | {"LOMIX", "LOMIX RIN3 Bypass Switch", "RIN3"}, | 887 | {"LOMIX", "LOMIX RIN3 Bypass Switch", "RIN3"}, |
@@ -922,7 +922,7 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
922 | {"LOPMIX", "LOPMIX Left Mixer PGA Switch", "LOPGA"}, | 922 | {"LOPMIX", "LOPMIX Left Mixer PGA Switch", "LOPGA"}, |
923 | 923 | ||
924 | /* OUT3MIX */ | 924 | /* OUT3MIX */ |
925 | {"OUT3MIX", "OUT3MIX LIN4/RXP Bypass Switch", "LIN4/RXP"}, | 925 | {"OUT3MIX", "OUT3MIX LIN4/RXP Bypass Switch", "LIN4/RXN"}, |
926 | {"OUT3MIX", "OUT3MIX Left Out PGA Switch", "LOPGA"}, | 926 | {"OUT3MIX", "OUT3MIX Left Out PGA Switch", "LOPGA"}, |
927 | 927 | ||
928 | /* OUT4MIX */ | 928 | /* OUT4MIX */ |
@@ -949,7 +949,7 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
949 | /* Output Pins */ | 949 | /* Output Pins */ |
950 | {"LON", NULL, "LONMIX"}, | 950 | {"LON", NULL, "LONMIX"}, |
951 | {"LOP", NULL, "LOPMIX"}, | 951 | {"LOP", NULL, "LOPMIX"}, |
952 | {"OUT", NULL, "OUT3MIX"}, | 952 | {"OUT3", NULL, "OUT3MIX"}, |
953 | {"LOUT", NULL, "LOUT PGA"}, | 953 | {"LOUT", NULL, "LOUT PGA"}, |
954 | {"SPKN", NULL, "SPKMIX"}, | 954 | {"SPKN", NULL, "SPKMIX"}, |
955 | {"ROUT", NULL, "ROUT PGA"}, | 955 | {"ROUT", NULL, "ROUT PGA"}, |
diff --git a/sound/soc/davinci/Kconfig b/sound/soc/davinci/Kconfig index bd7392c9657e..411a710be660 100644 --- a/sound/soc/davinci/Kconfig +++ b/sound/soc/davinci/Kconfig | |||
@@ -10,13 +10,14 @@ config SND_DAVINCI_SOC_I2S | |||
10 | tristate | 10 | tristate |
11 | 11 | ||
12 | config SND_DAVINCI_SOC_EVM | 12 | config SND_DAVINCI_SOC_EVM |
13 | tristate "SoC Audio support for DaVinci EVM" | 13 | tristate "SoC Audio support for DaVinci DM6446 or DM355 EVM" |
14 | depends on SND_DAVINCI_SOC && MACH_DAVINCI_EVM | 14 | depends on SND_DAVINCI_SOC |
15 | depends on MACH_DAVINCI_EVM || MACH_DAVINCI_DM355_EVM | ||
15 | select SND_DAVINCI_SOC_I2S | 16 | select SND_DAVINCI_SOC_I2S |
16 | select SND_SOC_TLV320AIC3X | 17 | select SND_SOC_TLV320AIC3X |
17 | help | 18 | help |
18 | Say Y if you want to add support for SoC audio on TI | 19 | Say Y if you want to add support for SoC audio on TI |
19 | DaVinci EVM platform. | 20 | DaVinci DM6446 or DM355 EVM platforms. |
20 | 21 | ||
21 | config SND_DAVINCI_SOC_SFFSDR | 22 | config SND_DAVINCI_SOC_SFFSDR |
22 | tristate "SoC Audio support for SFFSDR" | 23 | tristate "SoC Audio support for SFFSDR" |
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c index 9b90b347007c..58fd1cbedd88 100644 --- a/sound/soc/davinci/davinci-evm.c +++ b/sound/soc/davinci/davinci-evm.c | |||
@@ -20,7 +20,11 @@ | |||
20 | #include <sound/soc-dapm.h> | 20 | #include <sound/soc-dapm.h> |
21 | 21 | ||
22 | #include <asm/dma.h> | 22 | #include <asm/dma.h> |
23 | #include <mach/hardware.h> | 23 | #include <asm/mach-types.h> |
24 | |||
25 | #include <mach/asp.h> | ||
26 | #include <mach/edma.h> | ||
27 | #include <mach/mux.h> | ||
24 | 28 | ||
25 | #include "../codecs/tlv320aic3x.h" | 29 | #include "../codecs/tlv320aic3x.h" |
26 | #include "davinci-pcm.h" | 30 | #include "davinci-pcm.h" |
@@ -150,7 +154,7 @@ static struct snd_soc_card snd_soc_card_evm = { | |||
150 | 154 | ||
151 | /* evm audio private data */ | 155 | /* evm audio private data */ |
152 | static struct aic3x_setup_data evm_aic3x_setup = { | 156 | static struct aic3x_setup_data evm_aic3x_setup = { |
153 | .i2c_bus = 0, | 157 | .i2c_bus = 1, |
154 | .i2c_address = 0x1b, | 158 | .i2c_address = 0x1b, |
155 | }; | 159 | }; |
156 | 160 | ||
@@ -161,36 +165,73 @@ static struct snd_soc_device evm_snd_devdata = { | |||
161 | .codec_data = &evm_aic3x_setup, | 165 | .codec_data = &evm_aic3x_setup, |
162 | }; | 166 | }; |
163 | 167 | ||
168 | /* DM6446 EVM uses ASP0; line-out is a pair of RCA jacks */ | ||
164 | static struct resource evm_snd_resources[] = { | 169 | static struct resource evm_snd_resources[] = { |
165 | { | 170 | { |
166 | .start = DAVINCI_MCBSP_BASE, | 171 | .start = DAVINCI_ASP0_BASE, |
167 | .end = DAVINCI_MCBSP_BASE + SZ_8K - 1, | 172 | .end = DAVINCI_ASP0_BASE + SZ_8K - 1, |
168 | .flags = IORESOURCE_MEM, | 173 | .flags = IORESOURCE_MEM, |
169 | }, | 174 | }, |
170 | }; | 175 | }; |
171 | 176 | ||
172 | static struct evm_snd_platform_data evm_snd_data = { | 177 | static struct evm_snd_platform_data evm_snd_data = { |
173 | .tx_dma_ch = DM644X_DMACH_MCBSP_TX, | 178 | .tx_dma_ch = DAVINCI_DMA_ASP0_TX, |
174 | .rx_dma_ch = DM644X_DMACH_MCBSP_RX, | 179 | .rx_dma_ch = DAVINCI_DMA_ASP0_RX, |
180 | }; | ||
181 | |||
182 | /* DM335 EVM uses ASP1; line-out is a stereo mini-jack */ | ||
183 | static struct resource dm335evm_snd_resources[] = { | ||
184 | { | ||
185 | .start = DAVINCI_ASP1_BASE, | ||
186 | .end = DAVINCI_ASP1_BASE + SZ_8K - 1, | ||
187 | .flags = IORESOURCE_MEM, | ||
188 | }, | ||
189 | }; | ||
190 | |||
191 | static struct evm_snd_platform_data dm335evm_snd_data = { | ||
192 | .tx_dma_ch = DAVINCI_DMA_ASP1_TX, | ||
193 | .rx_dma_ch = DAVINCI_DMA_ASP1_RX, | ||
175 | }; | 194 | }; |
176 | 195 | ||
177 | static struct platform_device *evm_snd_device; | 196 | static struct platform_device *evm_snd_device; |
178 | 197 | ||
179 | static int __init evm_init(void) | 198 | static int __init evm_init(void) |
180 | { | 199 | { |
200 | struct resource *resources; | ||
201 | unsigned num_resources; | ||
202 | struct evm_snd_platform_data *data; | ||
203 | int index; | ||
181 | int ret; | 204 | int ret; |
182 | 205 | ||
183 | evm_snd_device = platform_device_alloc("soc-audio", 0); | 206 | if (machine_is_davinci_evm()) { |
207 | davinci_cfg_reg(DM644X_MCBSP); | ||
208 | |||
209 | resources = evm_snd_resources; | ||
210 | num_resources = ARRAY_SIZE(evm_snd_resources); | ||
211 | data = &evm_snd_data; | ||
212 | index = 0; | ||
213 | } else if (machine_is_davinci_dm355_evm()) { | ||
214 | /* we don't use ASP1 IRQs, or we'd need to mux them ... */ | ||
215 | davinci_cfg_reg(DM355_EVT8_ASP1_TX); | ||
216 | davinci_cfg_reg(DM355_EVT9_ASP1_RX); | ||
217 | |||
218 | resources = dm335evm_snd_resources; | ||
219 | num_resources = ARRAY_SIZE(dm335evm_snd_resources); | ||
220 | data = &dm335evm_snd_data; | ||
221 | index = 1; | ||
222 | } else | ||
223 | return -EINVAL; | ||
224 | |||
225 | evm_snd_device = platform_device_alloc("soc-audio", index); | ||
184 | if (!evm_snd_device) | 226 | if (!evm_snd_device) |
185 | return -ENOMEM; | 227 | return -ENOMEM; |
186 | 228 | ||
187 | platform_set_drvdata(evm_snd_device, &evm_snd_devdata); | 229 | platform_set_drvdata(evm_snd_device, &evm_snd_devdata); |
188 | evm_snd_devdata.dev = &evm_snd_device->dev; | 230 | evm_snd_devdata.dev = &evm_snd_device->dev; |
189 | platform_device_add_data(evm_snd_device, &evm_snd_data, | 231 | platform_device_add_data(evm_snd_device, data, sizeof(*data)); |
190 | sizeof(evm_snd_data)); | ||
191 | 232 | ||
192 | ret = platform_device_add_resources(evm_snd_device, evm_snd_resources, | 233 | ret = platform_device_add_resources(evm_snd_device, resources, |
193 | ARRAY_SIZE(evm_snd_resources)); | 234 | num_resources); |
194 | if (ret) { | 235 | if (ret) { |
195 | platform_device_put(evm_snd_device); | 236 | platform_device_put(evm_snd_device); |
196 | return ret; | 237 | return ret; |
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index ffdb9439d3d8..b1ea52fc83c7 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c | |||
@@ -24,6 +24,26 @@ | |||
24 | 24 | ||
25 | #include "davinci-pcm.h" | 25 | #include "davinci-pcm.h" |
26 | 26 | ||
27 | |||
28 | /* | ||
29 | * NOTE: terminology here is confusing. | ||
30 | * | ||
31 | * - This driver supports the "Audio Serial Port" (ASP), | ||
32 | * found on dm6446, dm355, and other DaVinci chips. | ||
33 | * | ||
34 | * - But it labels it a "Multi-channel Buffered Serial Port" | ||
35 | * (McBSP) as on older chips like the dm642 ... which was | ||
36 | * backward-compatible, possibly explaining that confusion. | ||
37 | * | ||
38 | * - OMAP chips have a controller called McBSP, which is | ||
39 | * incompatible with the DaVinci flavor of McBSP. | ||
40 | * | ||
41 | * - Newer DaVinci chips have a controller called McASP, | ||
42 | * incompatible with ASP and with either McBSP. | ||
43 | * | ||
44 | * In short: this uses ASP to implement I2S, not McBSP. | ||
45 | * And it won't be the only DaVinci implemention of I2S. | ||
46 | */ | ||
27 | #define DAVINCI_MCBSP_DRR_REG 0x00 | 47 | #define DAVINCI_MCBSP_DRR_REG 0x00 |
28 | #define DAVINCI_MCBSP_DXR_REG 0x04 | 48 | #define DAVINCI_MCBSP_DXR_REG 0x04 |
29 | #define DAVINCI_MCBSP_SPCR_REG 0x08 | 49 | #define DAVINCI_MCBSP_SPCR_REG 0x08 |
@@ -421,7 +441,7 @@ static int davinci_i2s_probe(struct platform_device *pdev, | |||
421 | { | 441 | { |
422 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 442 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
423 | struct snd_soc_card *card = socdev->card; | 443 | struct snd_soc_card *card = socdev->card; |
424 | struct snd_soc_dai *cpu_dai = card->dai_link[pdev->id].cpu_dai; | 444 | struct snd_soc_dai *cpu_dai = card->dai_link->cpu_dai; |
425 | struct davinci_mcbsp_dev *dev; | 445 | struct davinci_mcbsp_dev *dev; |
426 | struct resource *mem, *ioarea; | 446 | struct resource *mem, *ioarea; |
427 | struct evm_snd_platform_data *pdata; | 447 | struct evm_snd_platform_data *pdata; |
@@ -448,7 +468,7 @@ static int davinci_i2s_probe(struct platform_device *pdev, | |||
448 | 468 | ||
449 | cpu_dai->private_data = dev; | 469 | cpu_dai->private_data = dev; |
450 | 470 | ||
451 | dev->clk = clk_get(&pdev->dev, "McBSPCLK"); | 471 | dev->clk = clk_get(&pdev->dev, NULL); |
452 | if (IS_ERR(dev->clk)) { | 472 | if (IS_ERR(dev->clk)) { |
453 | ret = -ENODEV; | 473 | ret = -ENODEV; |
454 | goto err_free_mem; | 474 | goto err_free_mem; |
@@ -483,7 +503,7 @@ static void davinci_i2s_remove(struct platform_device *pdev, | |||
483 | { | 503 | { |
484 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 504 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
485 | struct snd_soc_card *card = socdev->card; | 505 | struct snd_soc_card *card = socdev->card; |
486 | struct snd_soc_dai *cpu_dai = card->dai_link[pdev->id].cpu_dai; | 506 | struct snd_soc_dai *cpu_dai = card->dai_link->cpu_dai; |
487 | struct davinci_mcbsp_dev *dev = cpu_dai->private_data; | 507 | struct davinci_mcbsp_dev *dev = cpu_dai->private_data; |
488 | struct resource *mem; | 508 | struct resource *mem; |
489 | 509 | ||
diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c index 7af3b5b3a53d..a05996588489 100644 --- a/sound/soc/davinci/davinci-pcm.c +++ b/sound/soc/davinci/davinci-pcm.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <sound/soc.h> | 22 | #include <sound/soc.h> |
23 | 23 | ||
24 | #include <asm/dma.h> | 24 | #include <asm/dma.h> |
25 | #include <mach/edma.h> | ||
25 | 26 | ||
26 | #include "davinci-pcm.h" | 27 | #include "davinci-pcm.h" |
27 | 28 | ||
@@ -51,7 +52,7 @@ struct davinci_runtime_data { | |||
51 | spinlock_t lock; | 52 | spinlock_t lock; |
52 | int period; /* current DMA period */ | 53 | int period; /* current DMA period */ |
53 | int master_lch; /* Master DMA channel */ | 54 | int master_lch; /* Master DMA channel */ |
54 | int slave_lch; /* Slave DMA channel */ | 55 | int slave_lch; /* linked parameter RAM reload slot */ |
55 | struct davinci_pcm_dma_params *params; /* DMA params */ | 56 | struct davinci_pcm_dma_params *params; /* DMA params */ |
56 | }; | 57 | }; |
57 | 58 | ||
@@ -90,18 +91,18 @@ static void davinci_pcm_enqueue_dma(struct snd_pcm_substream *substream) | |||
90 | dst_bidx = data_type; | 91 | dst_bidx = data_type; |
91 | } | 92 | } |
92 | 93 | ||
93 | davinci_set_dma_src_params(lch, src, INCR, W8BIT); | 94 | edma_set_src(lch, src, INCR, W8BIT); |
94 | davinci_set_dma_dest_params(lch, dst, INCR, W8BIT); | 95 | edma_set_dest(lch, dst, INCR, W8BIT); |
95 | davinci_set_dma_src_index(lch, src_bidx, 0); | 96 | edma_set_src_index(lch, src_bidx, 0); |
96 | davinci_set_dma_dest_index(lch, dst_bidx, 0); | 97 | edma_set_dest_index(lch, dst_bidx, 0); |
97 | davinci_set_dma_transfer_params(lch, data_type, count, 1, 0, ASYNC); | 98 | edma_set_transfer_params(lch, data_type, count, 1, 0, ASYNC); |
98 | 99 | ||
99 | prtd->period++; | 100 | prtd->period++; |
100 | if (unlikely(prtd->period >= runtime->periods)) | 101 | if (unlikely(prtd->period >= runtime->periods)) |
101 | prtd->period = 0; | 102 | prtd->period = 0; |
102 | } | 103 | } |
103 | 104 | ||
104 | static void davinci_pcm_dma_irq(int lch, u16 ch_status, void *data) | 105 | static void davinci_pcm_dma_irq(unsigned lch, u16 ch_status, void *data) |
105 | { | 106 | { |
106 | struct snd_pcm_substream *substream = data; | 107 | struct snd_pcm_substream *substream = data; |
107 | struct davinci_runtime_data *prtd = substream->runtime->private_data; | 108 | struct davinci_runtime_data *prtd = substream->runtime->private_data; |
@@ -125,7 +126,7 @@ static int davinci_pcm_dma_request(struct snd_pcm_substream *substream) | |||
125 | struct davinci_runtime_data *prtd = substream->runtime->private_data; | 126 | struct davinci_runtime_data *prtd = substream->runtime->private_data; |
126 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 127 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
127 | struct davinci_pcm_dma_params *dma_data = rtd->dai->cpu_dai->dma_data; | 128 | struct davinci_pcm_dma_params *dma_data = rtd->dai->cpu_dai->dma_data; |
128 | int tcc = TCC_ANY; | 129 | struct edmacc_param p_ram; |
129 | int ret; | 130 | int ret; |
130 | 131 | ||
131 | if (!dma_data) | 132 | if (!dma_data) |
@@ -134,22 +135,34 @@ static int davinci_pcm_dma_request(struct snd_pcm_substream *substream) | |||
134 | prtd->params = dma_data; | 135 | prtd->params = dma_data; |
135 | 136 | ||
136 | /* Request master DMA channel */ | 137 | /* Request master DMA channel */ |
137 | ret = davinci_request_dma(prtd->params->channel, prtd->params->name, | 138 | ret = edma_alloc_channel(prtd->params->channel, |
138 | davinci_pcm_dma_irq, substream, | 139 | davinci_pcm_dma_irq, substream, |
139 | &prtd->master_lch, &tcc, EVENTQ_0); | 140 | EVENTQ_0); |
140 | if (ret) | 141 | if (ret < 0) |
141 | return ret; | 142 | return ret; |
143 | prtd->master_lch = ret; | ||
142 | 144 | ||
143 | /* Request slave DMA channel */ | 145 | /* Request parameter RAM reload slot */ |
144 | ret = davinci_request_dma(PARAM_ANY, "Link", | 146 | ret = edma_alloc_slot(EDMA_SLOT_ANY); |
145 | NULL, NULL, &prtd->slave_lch, &tcc, EVENTQ_0); | 147 | if (ret < 0) { |
146 | if (ret) { | 148 | edma_free_channel(prtd->master_lch); |
147 | davinci_free_dma(prtd->master_lch); | ||
148 | return ret; | 149 | return ret; |
149 | } | 150 | } |
150 | 151 | prtd->slave_lch = ret; | |
151 | /* Link slave DMA channel in loopback */ | 152 | |
152 | davinci_dma_link_lch(prtd->slave_lch, prtd->slave_lch); | 153 | /* Issue transfer completion IRQ when the channel completes a |
154 | * transfer, then always reload from the same slot (by a kind | ||
155 | * of loopback link). The completion IRQ handler will update | ||
156 | * the reload slot with a new buffer. | ||
157 | * | ||
158 | * REVISIT save p_ram here after setting up everything except | ||
159 | * the buffer and its length (ccnt) ... use it as a template | ||
160 | * so davinci_pcm_enqueue_dma() takes less time in IRQ. | ||
161 | */ | ||
162 | edma_read_slot(prtd->slave_lch, &p_ram); | ||
163 | p_ram.opt |= TCINTEN | EDMA_TCC(prtd->master_lch); | ||
164 | p_ram.link_bcntrld = prtd->slave_lch << 5; | ||
165 | edma_write_slot(prtd->slave_lch, &p_ram); | ||
153 | 166 | ||
154 | return 0; | 167 | return 0; |
155 | } | 168 | } |
@@ -165,12 +178,12 @@ static int davinci_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | |||
165 | case SNDRV_PCM_TRIGGER_START: | 178 | case SNDRV_PCM_TRIGGER_START: |
166 | case SNDRV_PCM_TRIGGER_RESUME: | 179 | case SNDRV_PCM_TRIGGER_RESUME: |
167 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: | 180 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: |
168 | davinci_start_dma(prtd->master_lch); | 181 | edma_start(prtd->master_lch); |
169 | break; | 182 | break; |
170 | case SNDRV_PCM_TRIGGER_STOP: | 183 | case SNDRV_PCM_TRIGGER_STOP: |
171 | case SNDRV_PCM_TRIGGER_SUSPEND: | 184 | case SNDRV_PCM_TRIGGER_SUSPEND: |
172 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: | 185 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: |
173 | davinci_stop_dma(prtd->master_lch); | 186 | edma_stop(prtd->master_lch); |
174 | break; | 187 | break; |
175 | default: | 188 | default: |
176 | ret = -EINVAL; | 189 | ret = -EINVAL; |
@@ -185,14 +198,14 @@ static int davinci_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | |||
185 | static int davinci_pcm_prepare(struct snd_pcm_substream *substream) | 198 | static int davinci_pcm_prepare(struct snd_pcm_substream *substream) |
186 | { | 199 | { |
187 | struct davinci_runtime_data *prtd = substream->runtime->private_data; | 200 | struct davinci_runtime_data *prtd = substream->runtime->private_data; |
188 | struct paramentry_descriptor temp; | 201 | struct edmacc_param temp; |
189 | 202 | ||
190 | prtd->period = 0; | 203 | prtd->period = 0; |
191 | davinci_pcm_enqueue_dma(substream); | 204 | davinci_pcm_enqueue_dma(substream); |
192 | 205 | ||
193 | /* Get slave channel dma params for master channel startup */ | 206 | /* Copy self-linked parameter RAM entry into master channel */ |
194 | davinci_get_dma_params(prtd->slave_lch, &temp); | 207 | edma_read_slot(prtd->slave_lch, &temp); |
195 | davinci_set_dma_params(prtd->master_lch, &temp); | 208 | edma_write_slot(prtd->master_lch, &temp); |
196 | 209 | ||
197 | return 0; | 210 | return 0; |
198 | } | 211 | } |
@@ -208,7 +221,7 @@ davinci_pcm_pointer(struct snd_pcm_substream *substream) | |||
208 | 221 | ||
209 | spin_lock(&prtd->lock); | 222 | spin_lock(&prtd->lock); |
210 | 223 | ||
211 | davinci_dma_getposition(prtd->master_lch, &src, &dst); | 224 | edma_get_position(prtd->master_lch, &src, &dst); |
212 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 225 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
213 | count = src - runtime->dma_addr; | 226 | count = src - runtime->dma_addr; |
214 | else | 227 | else |
@@ -253,10 +266,10 @@ static int davinci_pcm_close(struct snd_pcm_substream *substream) | |||
253 | struct snd_pcm_runtime *runtime = substream->runtime; | 266 | struct snd_pcm_runtime *runtime = substream->runtime; |
254 | struct davinci_runtime_data *prtd = runtime->private_data; | 267 | struct davinci_runtime_data *prtd = runtime->private_data; |
255 | 268 | ||
256 | davinci_dma_unlink_lch(prtd->slave_lch, prtd->slave_lch); | 269 | edma_unlink(prtd->slave_lch); |
257 | 270 | ||
258 | davinci_free_dma(prtd->slave_lch); | 271 | edma_free_slot(prtd->slave_lch); |
259 | davinci_free_dma(prtd->master_lch); | 272 | edma_free_channel(prtd->master_lch); |
260 | 273 | ||
261 | kfree(prtd); | 274 | kfree(prtd); |
262 | 275 | ||
diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c index 3aa729df27b5..1111c710118a 100644 --- a/sound/soc/fsl/mpc5200_psc_i2s.c +++ b/sound/soc/fsl/mpc5200_psc_i2s.c | |||
@@ -504,7 +504,8 @@ static struct snd_soc_dai psc_i2s_dai_template = { | |||
504 | 504 | ||
505 | static const struct snd_pcm_hardware psc_i2s_pcm_hardware = { | 505 | static const struct snd_pcm_hardware psc_i2s_pcm_hardware = { |
506 | .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | | 506 | .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | |
507 | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER, | 507 | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
508 | SNDRV_PCM_INFO_BATCH, | ||
508 | .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_BE | | 509 | .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_BE | |
509 | SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S32_BE, | 510 | SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S32_BE, |
510 | .rate_min = 8000, | 511 | .rate_min = 8000, |
diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c index 0dad3a0bb920..baddb1242c71 100644 --- a/sound/soc/sh/dma-sh7760.c +++ b/sound/soc/sh/dma-sh7760.c | |||
@@ -103,7 +103,8 @@ static struct snd_pcm_hardware camelot_pcm_hardware = { | |||
103 | .info = (SNDRV_PCM_INFO_MMAP | | 103 | .info = (SNDRV_PCM_INFO_MMAP | |
104 | SNDRV_PCM_INFO_INTERLEAVED | | 104 | SNDRV_PCM_INFO_INTERLEAVED | |
105 | SNDRV_PCM_INFO_BLOCK_TRANSFER | | 105 | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
106 | SNDRV_PCM_INFO_MMAP_VALID), | 106 | SNDRV_PCM_INFO_MMAP_VALID | |
107 | SNDRV_PCM_INFO_BATCH), | ||
107 | .formats = DMABRG_FMTS, | 108 | .formats = DMABRG_FMTS, |
108 | .rates = DMABRG_RATES, | 109 | .rates = DMABRG_RATES, |
109 | .rate_min = 8000, | 110 | .rate_min = 8000, |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 99712f652d0d..1cd149b9ce69 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -954,6 +954,9 @@ static int soc_remove(struct platform_device *pdev) | |||
954 | struct snd_soc_platform *platform = card->platform; | 954 | struct snd_soc_platform *platform = card->platform; |
955 | struct snd_soc_codec_device *codec_dev = socdev->codec_dev; | 955 | struct snd_soc_codec_device *codec_dev = socdev->codec_dev; |
956 | 956 | ||
957 | if (!card->instantiated) | ||
958 | return 0; | ||
959 | |||
957 | run_delayed_work(&card->delayed_work); | 960 | run_delayed_work(&card->delayed_work); |
958 | 961 | ||
959 | if (platform->remove) | 962 | if (platform->remove) |
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index af95ff1e126c..1d2e51b3f918 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c | |||
@@ -1975,7 +1975,8 @@ static struct snd_pcm_hardware snd_dbri_pcm_hw = { | |||
1975 | .info = SNDRV_PCM_INFO_MMAP | | 1975 | .info = SNDRV_PCM_INFO_MMAP | |
1976 | SNDRV_PCM_INFO_INTERLEAVED | | 1976 | SNDRV_PCM_INFO_INTERLEAVED | |
1977 | SNDRV_PCM_INFO_BLOCK_TRANSFER | | 1977 | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
1978 | SNDRV_PCM_INFO_MMAP_VALID, | 1978 | SNDRV_PCM_INFO_MMAP_VALID | |
1979 | SNDRV_PCM_INFO_BATCH, | ||
1979 | .formats = SNDRV_PCM_FMTBIT_MU_LAW | | 1980 | .formats = SNDRV_PCM_FMTBIT_MU_LAW | |
1980 | SNDRV_PCM_FMTBIT_A_LAW | | 1981 | SNDRV_PCM_FMTBIT_A_LAW | |
1981 | SNDRV_PCM_FMTBIT_U8 | | 1982 | SNDRV_PCM_FMTBIT_U8 | |
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 823296d7d578..a6b88482637b 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c | |||
@@ -3347,7 +3347,7 @@ static int snd_usb_create_quirk(struct snd_usb_audio *chip, | |||
3347 | [QUIRK_MIDI_YAMAHA] = snd_usb_create_midi_interface, | 3347 | [QUIRK_MIDI_YAMAHA] = snd_usb_create_midi_interface, |
3348 | [QUIRK_MIDI_MIDIMAN] = snd_usb_create_midi_interface, | 3348 | [QUIRK_MIDI_MIDIMAN] = snd_usb_create_midi_interface, |
3349 | [QUIRK_MIDI_NOVATION] = snd_usb_create_midi_interface, | 3349 | [QUIRK_MIDI_NOVATION] = snd_usb_create_midi_interface, |
3350 | [QUIRK_MIDI_RAW] = snd_usb_create_midi_interface, | 3350 | [QUIRK_MIDI_FASTLANE] = snd_usb_create_midi_interface, |
3351 | [QUIRK_MIDI_EMAGIC] = snd_usb_create_midi_interface, | 3351 | [QUIRK_MIDI_EMAGIC] = snd_usb_create_midi_interface, |
3352 | [QUIRK_MIDI_CME] = snd_usb_create_midi_interface, | 3352 | [QUIRK_MIDI_CME] = snd_usb_create_midi_interface, |
3353 | [QUIRK_AUDIO_STANDARD_INTERFACE] = create_standard_audio_quirk, | 3353 | [QUIRK_AUDIO_STANDARD_INTERFACE] = create_standard_audio_quirk, |
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index 36e4f7a29adc..8e7f78941ba6 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h | |||
@@ -153,7 +153,7 @@ enum quirk_type { | |||
153 | QUIRK_MIDI_YAMAHA, | 153 | QUIRK_MIDI_YAMAHA, |
154 | QUIRK_MIDI_MIDIMAN, | 154 | QUIRK_MIDI_MIDIMAN, |
155 | QUIRK_MIDI_NOVATION, | 155 | QUIRK_MIDI_NOVATION, |
156 | QUIRK_MIDI_RAW, | 156 | QUIRK_MIDI_FASTLANE, |
157 | QUIRK_MIDI_EMAGIC, | 157 | QUIRK_MIDI_EMAGIC, |
158 | QUIRK_MIDI_CME, | 158 | QUIRK_MIDI_CME, |
159 | QUIRK_MIDI_US122L, | 159 | QUIRK_MIDI_US122L, |
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index 26bad373fe65..2fb35cc22a30 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c | |||
@@ -1778,8 +1778,18 @@ int snd_usb_create_midi_interface(struct snd_usb_audio* chip, | |||
1778 | umidi->usb_protocol_ops = &snd_usbmidi_novation_ops; | 1778 | umidi->usb_protocol_ops = &snd_usbmidi_novation_ops; |
1779 | err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); | 1779 | err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); |
1780 | break; | 1780 | break; |
1781 | case QUIRK_MIDI_RAW: | 1781 | case QUIRK_MIDI_FASTLANE: |
1782 | umidi->usb_protocol_ops = &snd_usbmidi_raw_ops; | 1782 | umidi->usb_protocol_ops = &snd_usbmidi_raw_ops; |
1783 | /* | ||
1784 | * Interface 1 contains isochronous endpoints, but with the same | ||
1785 | * numbers as in interface 0. Since it is interface 1 that the | ||
1786 | * USB core has most recently seen, these descriptors are now | ||
1787 | * associated with the endpoint numbers. This will foul up our | ||
1788 | * attempts to submit bulk/interrupt URBs to the endpoints in | ||
1789 | * interface 0, so we have to make sure that the USB core looks | ||
1790 | * again at interface 0 by calling usb_set_interface() on it. | ||
1791 | */ | ||
1792 | usb_set_interface(umidi->chip->dev, 0, 0); | ||
1783 | err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); | 1793 | err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); |
1784 | break; | 1794 | break; |
1785 | case QUIRK_MIDI_EMAGIC: | 1795 | case QUIRK_MIDI_EMAGIC: |
diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h index 647ef5029651..5d955aaad85f 100644 --- a/sound/usb/usbquirks.h +++ b/sound/usb/usbquirks.h | |||
@@ -1868,7 +1868,7 @@ YAMAHA_DEVICE(0x7010, "UB99"), | |||
1868 | .data = & (const struct snd_usb_audio_quirk[]) { | 1868 | .data = & (const struct snd_usb_audio_quirk[]) { |
1869 | { | 1869 | { |
1870 | .ifnum = 0, | 1870 | .ifnum = 0, |
1871 | .type = QUIRK_MIDI_RAW | 1871 | .type = QUIRK_MIDI_FASTLANE |
1872 | }, | 1872 | }, |
1873 | { | 1873 | { |
1874 | .ifnum = 1, | 1874 | .ifnum = 1, |
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c index 9a608fa85155..dd1ab6177840 100644 --- a/sound/usb/usx2y/usbusx2yaudio.c +++ b/sound/usb/usx2y/usbusx2yaudio.c | |||
@@ -870,7 +870,8 @@ static struct snd_pcm_hardware snd_usX2Y_2c = | |||
870 | { | 870 | { |
871 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 871 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
872 | SNDRV_PCM_INFO_BLOCK_TRANSFER | | 872 | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
873 | SNDRV_PCM_INFO_MMAP_VALID), | 873 | SNDRV_PCM_INFO_MMAP_VALID | |
874 | SNDRV_PCM_INFO_BATCH), | ||
874 | .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE, | 875 | .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE, |
875 | .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, | 876 | .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, |
876 | .rate_min = 44100, | 877 | .rate_min = 44100, |