diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-24 15:35:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-24 15:35:48 -0400 |
commit | c6d13403a153794b58d084d97d6b410fc7106c79 (patch) | |
tree | 85e49f57f4d3327c986485f2e98426a350d6eebd /sound | |
parent | 14d4cc08832efb724e58944ba2ac22e2ca3143dc (diff) | |
parent | fb54a645b2739fb196446ffbbbe3f3589d117b55 (diff) |
Merge tag 'sound-3.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Here are a chunk of small fixes since rc1: two PCM core fixes, one is
a long-standing annoyance about lockdep and another is an ARM64 mmap
fix.
The rest are a HD-audio HDMI hotplug notification fix, a fix for
missing NULL termination in Realtek codec quirks and a few new
device/codec-specific quirks as usual"
* tag 'sound-3.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Add missing terminating entry to SND_HDA_PIN_QUIRK macro
ALSA: pcm: Fix false lockdep warnings
ALSA: hda - Fix inverted LED gpio setup for Lenovo Ideapad
ALSA: hda - hdmi: Fix missing ELD change event on plug/unplug
ALSA: usb-audio: Add support for Steinberg UR22 USB interface
ALSA: ALC283 codec - Avoid pop noise on headphones during suspend/resume
ALSA: pcm: use the same dma mmap codepath both for arm and arm64
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/pcm_native.c | 14 | ||||
-rw-r--r-- | sound/pci/hda/hda_local.h | 4 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 15 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 7 | ||||
-rw-r--r-- | sound/usb/quirks-table.h | 30 |
5 files changed, 52 insertions, 18 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index bfe1cf6b492f..166d59cdc86b 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -781,16 +781,15 @@ static int snd_pcm_action_group(struct action_ops *ops, | |||
781 | { | 781 | { |
782 | struct snd_pcm_substream *s = NULL; | 782 | struct snd_pcm_substream *s = NULL; |
783 | struct snd_pcm_substream *s1; | 783 | struct snd_pcm_substream *s1; |
784 | int res = 0; | 784 | int res = 0, depth = 1; |
785 | 785 | ||
786 | snd_pcm_group_for_each_entry(s, substream) { | 786 | snd_pcm_group_for_each_entry(s, substream) { |
787 | if (do_lock && s != substream) { | 787 | if (do_lock && s != substream) { |
788 | if (s->pcm->nonatomic) | 788 | if (s->pcm->nonatomic) |
789 | mutex_lock_nested(&s->self_group.mutex, | 789 | mutex_lock_nested(&s->self_group.mutex, depth); |
790 | SINGLE_DEPTH_NESTING); | ||
791 | else | 790 | else |
792 | spin_lock_nested(&s->self_group.lock, | 791 | spin_lock_nested(&s->self_group.lock, depth); |
793 | SINGLE_DEPTH_NESTING); | 792 | depth++; |
794 | } | 793 | } |
795 | res = ops->pre_action(s, state); | 794 | res = ops->pre_action(s, state); |
796 | if (res < 0) | 795 | if (res < 0) |
@@ -906,8 +905,7 @@ static int snd_pcm_action_lock_mutex(struct action_ops *ops, | |||
906 | down_read(&snd_pcm_link_rwsem); | 905 | down_read(&snd_pcm_link_rwsem); |
907 | if (snd_pcm_stream_linked(substream)) { | 906 | if (snd_pcm_stream_linked(substream)) { |
908 | mutex_lock(&substream->group->mutex); | 907 | mutex_lock(&substream->group->mutex); |
909 | mutex_lock_nested(&substream->self_group.mutex, | 908 | mutex_lock(&substream->self_group.mutex); |
910 | SINGLE_DEPTH_NESTING); | ||
911 | res = snd_pcm_action_group(ops, substream, state, 1); | 909 | res = snd_pcm_action_group(ops, substream, state, 1); |
912 | mutex_unlock(&substream->self_group.mutex); | 910 | mutex_unlock(&substream->self_group.mutex); |
913 | mutex_unlock(&substream->group->mutex); | 911 | mutex_unlock(&substream->group->mutex); |
@@ -3311,7 +3309,7 @@ static const struct vm_operations_struct snd_pcm_vm_ops_data_fault = { | |||
3311 | 3309 | ||
3312 | #ifndef ARCH_HAS_DMA_MMAP_COHERENT | 3310 | #ifndef ARCH_HAS_DMA_MMAP_COHERENT |
3313 | /* This should be defined / handled globally! */ | 3311 | /* This should be defined / handled globally! */ |
3314 | #ifdef CONFIG_ARM | 3312 | #if defined(CONFIG_ARM) || defined(CONFIG_ARM64) |
3315 | #define ARCH_HAS_DMA_MMAP_COHERENT | 3313 | #define ARCH_HAS_DMA_MMAP_COHERENT |
3316 | #endif | 3314 | #endif |
3317 | #endif | 3315 | #endif |
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 7eb44e78e141..62658f2f8c9f 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -419,7 +419,7 @@ struct snd_hda_pin_quirk { | |||
419 | .subvendor = _subvendor,\ | 419 | .subvendor = _subvendor,\ |
420 | .name = _name,\ | 420 | .name = _name,\ |
421 | .value = _value,\ | 421 | .value = _value,\ |
422 | .pins = (const struct hda_pintbl[]) { _pins } \ | 422 | .pins = (const struct hda_pintbl[]) { _pins, {0, 0}} \ |
423 | } | 423 | } |
424 | #else | 424 | #else |
425 | 425 | ||
@@ -427,7 +427,7 @@ struct snd_hda_pin_quirk { | |||
427 | { .codec = _codec,\ | 427 | { .codec = _codec,\ |
428 | .subvendor = _subvendor,\ | 428 | .subvendor = _subvendor,\ |
429 | .value = _value,\ | 429 | .value = _value,\ |
430 | .pins = (const struct hda_pintbl[]) { _pins } \ | 430 | .pins = (const struct hda_pintbl[]) { _pins, {0, 0}} \ |
431 | } | 431 | } |
432 | 432 | ||
433 | #endif | 433 | #endif |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 39862e98551c..9dc9cf8c90e9 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -1583,19 +1583,22 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll) | |||
1583 | } | 1583 | } |
1584 | } | 1584 | } |
1585 | 1585 | ||
1586 | if (pin_eld->eld_valid && !eld->eld_valid) { | 1586 | if (pin_eld->eld_valid != eld->eld_valid) |
1587 | update_eld = true; | ||
1588 | eld_changed = true; | 1587 | eld_changed = true; |
1589 | } | 1588 | |
1589 | if (pin_eld->eld_valid && !eld->eld_valid) | ||
1590 | update_eld = true; | ||
1591 | |||
1590 | if (update_eld) { | 1592 | if (update_eld) { |
1591 | bool old_eld_valid = pin_eld->eld_valid; | 1593 | bool old_eld_valid = pin_eld->eld_valid; |
1592 | pin_eld->eld_valid = eld->eld_valid; | 1594 | pin_eld->eld_valid = eld->eld_valid; |
1593 | eld_changed = pin_eld->eld_size != eld->eld_size || | 1595 | if (pin_eld->eld_size != eld->eld_size || |
1594 | memcmp(pin_eld->eld_buffer, eld->eld_buffer, | 1596 | memcmp(pin_eld->eld_buffer, eld->eld_buffer, |
1595 | eld->eld_size) != 0; | 1597 | eld->eld_size) != 0) { |
1596 | if (eld_changed) | ||
1597 | memcpy(pin_eld->eld_buffer, eld->eld_buffer, | 1598 | memcpy(pin_eld->eld_buffer, eld->eld_buffer, |
1598 | eld->eld_size); | 1599 | eld->eld_size); |
1600 | eld_changed = true; | ||
1601 | } | ||
1599 | pin_eld->eld_size = eld->eld_size; | 1602 | pin_eld->eld_size = eld->eld_size; |
1600 | pin_eld->info = eld->info; | 1603 | pin_eld->info = eld->info; |
1601 | 1604 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index bc86c36b4bfa..34b7bdb510c7 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -2884,6 +2884,9 @@ static void alc283_shutup(struct hda_codec *codec) | |||
2884 | 2884 | ||
2885 | alc_write_coef_idx(codec, 0x43, 0x9004); | 2885 | alc_write_coef_idx(codec, 0x43, 0x9004); |
2886 | 2886 | ||
2887 | /*depop hp during suspend*/ | ||
2888 | alc_write_coef_idx(codec, 0x06, 0x2100); | ||
2889 | |||
2887 | snd_hda_codec_write(codec, hp_pin, 0, | 2890 | snd_hda_codec_write(codec, hp_pin, 0, |
2888 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); | 2891 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); |
2889 | 2892 | ||
@@ -5610,9 +5613,9 @@ static void alc662_led_gpio1_mute_hook(void *private_data, int enabled) | |||
5610 | unsigned int oldval = spec->gpio_led; | 5613 | unsigned int oldval = spec->gpio_led; |
5611 | 5614 | ||
5612 | if (enabled) | 5615 | if (enabled) |
5613 | spec->gpio_led &= ~0x01; | ||
5614 | else | ||
5615 | spec->gpio_led |= 0x01; | 5616 | spec->gpio_led |= 0x01; |
5617 | else | ||
5618 | spec->gpio_led &= ~0x01; | ||
5616 | if (spec->gpio_led != oldval) | 5619 | if (spec->gpio_led != oldval) |
5617 | snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, | 5620 | snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, |
5618 | spec->gpio_led); | 5621 | spec->gpio_led); |
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h index 223c47b33ba3..c657752a420c 100644 --- a/sound/usb/quirks-table.h +++ b/sound/usb/quirks-table.h | |||
@@ -385,6 +385,36 @@ YAMAHA_DEVICE(0x105d, NULL), | |||
385 | } | 385 | } |
386 | }, | 386 | }, |
387 | { | 387 | { |
388 | USB_DEVICE(0x0499, 0x1509), | ||
389 | .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { | ||
390 | /* .vendor_name = "Yamaha", */ | ||
391 | /* .product_name = "Steinberg UR22", */ | ||
392 | .ifnum = QUIRK_ANY_INTERFACE, | ||
393 | .type = QUIRK_COMPOSITE, | ||
394 | .data = (const struct snd_usb_audio_quirk[]) { | ||
395 | { | ||
396 | .ifnum = 1, | ||
397 | .type = QUIRK_AUDIO_STANDARD_INTERFACE | ||
398 | }, | ||
399 | { | ||
400 | .ifnum = 2, | ||
401 | .type = QUIRK_AUDIO_STANDARD_INTERFACE | ||
402 | }, | ||
403 | { | ||
404 | .ifnum = 3, | ||
405 | .type = QUIRK_MIDI_YAMAHA | ||
406 | }, | ||
407 | { | ||
408 | .ifnum = 4, | ||
409 | .type = QUIRK_IGNORE_INTERFACE | ||
410 | }, | ||
411 | { | ||
412 | .ifnum = -1 | ||
413 | } | ||
414 | } | ||
415 | } | ||
416 | }, | ||
417 | { | ||
388 | USB_DEVICE(0x0499, 0x150a), | 418 | USB_DEVICE(0x0499, 0x150a), |
389 | .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { | 419 | .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { |
390 | /* .vendor_name = "Yamaha", */ | 420 | /* .vendor_name = "Yamaha", */ |