Commit c6d13403 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 14d4cc08 fb54a645
...@@ -781,16 +781,15 @@ static int snd_pcm_action_group(struct action_ops *ops, ...@@ -781,16 +781,15 @@ static int snd_pcm_action_group(struct action_ops *ops,
{ {
struct snd_pcm_substream *s = NULL; struct snd_pcm_substream *s = NULL;
struct snd_pcm_substream *s1; struct snd_pcm_substream *s1;
int res = 0; int res = 0, depth = 1;
snd_pcm_group_for_each_entry(s, substream) { snd_pcm_group_for_each_entry(s, substream) {
if (do_lock && s != substream) { if (do_lock && s != substream) {
if (s->pcm->nonatomic) if (s->pcm->nonatomic)
mutex_lock_nested(&s->self_group.mutex, mutex_lock_nested(&s->self_group.mutex, depth);
SINGLE_DEPTH_NESTING);
else else
spin_lock_nested(&s->self_group.lock, spin_lock_nested(&s->self_group.lock, depth);
SINGLE_DEPTH_NESTING); depth++;
} }
res = ops->pre_action(s, state); res = ops->pre_action(s, state);
if (res < 0) if (res < 0)
...@@ -906,8 +905,7 @@ static int snd_pcm_action_lock_mutex(struct action_ops *ops, ...@@ -906,8 +905,7 @@ static int snd_pcm_action_lock_mutex(struct action_ops *ops,
down_read(&snd_pcm_link_rwsem); down_read(&snd_pcm_link_rwsem);
if (snd_pcm_stream_linked(substream)) { if (snd_pcm_stream_linked(substream)) {
mutex_lock(&substream->group->mutex); mutex_lock(&substream->group->mutex);
mutex_lock_nested(&substream->self_group.mutex, mutex_lock(&substream->self_group.mutex);
SINGLE_DEPTH_NESTING);
res = snd_pcm_action_group(ops, substream, state, 1); res = snd_pcm_action_group(ops, substream, state, 1);
mutex_unlock(&substream->self_group.mutex); mutex_unlock(&substream->self_group.mutex);
mutex_unlock(&substream->group->mutex); mutex_unlock(&substream->group->mutex);
...@@ -3311,7 +3309,7 @@ static const struct vm_operations_struct snd_pcm_vm_ops_data_fault = { ...@@ -3311,7 +3309,7 @@ static const struct vm_operations_struct snd_pcm_vm_ops_data_fault = {
#ifndef ARCH_HAS_DMA_MMAP_COHERENT #ifndef ARCH_HAS_DMA_MMAP_COHERENT
/* This should be defined / handled globally! */ /* This should be defined / handled globally! */
#ifdef CONFIG_ARM #if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
#define ARCH_HAS_DMA_MMAP_COHERENT #define ARCH_HAS_DMA_MMAP_COHERENT
#endif #endif
#endif #endif
......
...@@ -419,7 +419,7 @@ struct snd_hda_pin_quirk { ...@@ -419,7 +419,7 @@ struct snd_hda_pin_quirk {
.subvendor = _subvendor,\ .subvendor = _subvendor,\
.name = _name,\ .name = _name,\
.value = _value,\ .value = _value,\
.pins = (const struct hda_pintbl[]) { _pins } \ .pins = (const struct hda_pintbl[]) { _pins, {0, 0}} \
} }
#else #else
...@@ -427,7 +427,7 @@ struct snd_hda_pin_quirk { ...@@ -427,7 +427,7 @@ struct snd_hda_pin_quirk {
{ .codec = _codec,\ { .codec = _codec,\
.subvendor = _subvendor,\ .subvendor = _subvendor,\
.value = _value,\ .value = _value,\
.pins = (const struct hda_pintbl[]) { _pins } \ .pins = (const struct hda_pintbl[]) { _pins, {0, 0}} \
} }
#endif #endif
......
...@@ -1583,19 +1583,22 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll) ...@@ -1583,19 +1583,22 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
} }
} }
if (pin_eld->eld_valid && !eld->eld_valid) { if (pin_eld->eld_valid != eld->eld_valid)
update_eld = true;
eld_changed = true; eld_changed = true;
}
if (pin_eld->eld_valid && !eld->eld_valid)
update_eld = true;
if (update_eld) { if (update_eld) {
bool old_eld_valid = pin_eld->eld_valid; bool old_eld_valid = pin_eld->eld_valid;
pin_eld->eld_valid = eld->eld_valid; pin_eld->eld_valid = eld->eld_valid;
eld_changed = pin_eld->eld_size != eld->eld_size || if (pin_eld->eld_size != eld->eld_size ||
memcmp(pin_eld->eld_buffer, eld->eld_buffer, memcmp(pin_eld->eld_buffer, eld->eld_buffer,
eld->eld_size) != 0; eld->eld_size) != 0) {
if (eld_changed)
memcpy(pin_eld->eld_buffer, eld->eld_buffer, memcpy(pin_eld->eld_buffer, eld->eld_buffer,
eld->eld_size); eld->eld_size);
eld_changed = true;
}
pin_eld->eld_size = eld->eld_size; pin_eld->eld_size = eld->eld_size;
pin_eld->info = eld->info; pin_eld->info = eld->info;
......
...@@ -2884,6 +2884,9 @@ static void alc283_shutup(struct hda_codec *codec) ...@@ -2884,6 +2884,9 @@ static void alc283_shutup(struct hda_codec *codec)
alc_write_coef_idx(codec, 0x43, 0x9004); alc_write_coef_idx(codec, 0x43, 0x9004);
/*depop hp during suspend*/
alc_write_coef_idx(codec, 0x06, 0x2100);
snd_hda_codec_write(codec, hp_pin, 0, snd_hda_codec_write(codec, hp_pin, 0,
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
...@@ -5610,9 +5613,9 @@ static void alc662_led_gpio1_mute_hook(void *private_data, int enabled) ...@@ -5610,9 +5613,9 @@ static void alc662_led_gpio1_mute_hook(void *private_data, int enabled)
unsigned int oldval = spec->gpio_led; unsigned int oldval = spec->gpio_led;
if (enabled) if (enabled)
spec->gpio_led &= ~0x01;
else
spec->gpio_led |= 0x01; spec->gpio_led |= 0x01;
else
spec->gpio_led &= ~0x01;
if (spec->gpio_led != oldval) if (spec->gpio_led != oldval)
snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
spec->gpio_led); spec->gpio_led);
......
...@@ -384,6 +384,36 @@ YAMAHA_DEVICE(0x105d, NULL), ...@@ -384,6 +384,36 @@ YAMAHA_DEVICE(0x105d, NULL),
} }
} }
}, },
{
USB_DEVICE(0x0499, 0x1509),
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
/* .vendor_name = "Yamaha", */
/* .product_name = "Steinberg UR22", */
.ifnum = QUIRK_ANY_INTERFACE,
.type = QUIRK_COMPOSITE,
.data = (const struct snd_usb_audio_quirk[]) {
{
.ifnum = 1,
.type = QUIRK_AUDIO_STANDARD_INTERFACE
},
{
.ifnum = 2,
.type = QUIRK_AUDIO_STANDARD_INTERFACE
},
{
.ifnum = 3,
.type = QUIRK_MIDI_YAMAHA
},
{
.ifnum = 4,
.type = QUIRK_IGNORE_INTERFACE
},
{
.ifnum = -1
}
}
}
},
{ {
USB_DEVICE(0x0499, 0x150a), USB_DEVICE(0x0499, 0x150a),
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment