sound fixes for 3.18-rc2

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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUSgjCAAoJEGwxgFQ9KSmklGAP/iPygJ0Pm6j2osKxBAxUXTu4
 daLgoRJAC5+eHi2U4PLpNI6EzB6rhIAmbvm4CVMs3XmYKIptabVfTtsUpOshQsU+
 WYkZQ8WFHZf4ZtM8OgSbC3NVTmdJe5N98NBM+XY9ow6h9RXM3ZV1m1TAgVYMARn0
 Ue4wtWiD3fsJcm50nV11n8hjKF+BfwB94K/b5dAstFxUwe20FRvYpphptDWsPP4u
 NoMi10L7DLLujF3qNyY12+6XGv1ECL6jUX0jEdx76bG3jS/JOxrLyavA0+rx8dcm
 iOa4EgfTq3eYM9smdVdVTCJ+suG6pBuDg24xLn5dwCR8S/rUYU6EXfaPDKYqVYTa
 /O3lKtYIFbWONEnGhULEX1lV87ZbzZHaQP4Cr/QlH3D4AwLdpLqdv9/jDs3i/+S9
 GVozlbl/IffhxCuLPriNGdDZFZmo4eRPBzywOLiooVgR5LHdUSSufgDvzU858BTL
 L08BOs2DjeWFVb4cuBnzsWGS4QSCX/01EM0ftEAgX2SdseibtHNBze9ntHR/c1be
 ieijRu0jQMa4VNWSjmIOzR9fFKy7Bw1mN7EEl0a2t43IXc7gpog5jezMZEhMs2bA
 NW3j65d+Vd3UUWAzfwMuNJ776lCg30r0hzpnGr54frhfjYbe0Rrs5hHOQkW9kcJv
 E+LzcPoWfoT61wpH39dz
 =VrJV
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2014-10-24 12:35:48 -07:00
commit c6d13403a1
5 changed files with 52 additions and 18 deletions

View File

@ -781,16 +781,15 @@ static int snd_pcm_action_group(struct action_ops *ops,
{
struct snd_pcm_substream *s = NULL;
struct snd_pcm_substream *s1;
int res = 0;
int res = 0, depth = 1;
snd_pcm_group_for_each_entry(s, substream) {
if (do_lock && s != substream) {
if (s->pcm->nonatomic)
mutex_lock_nested(&s->self_group.mutex,
SINGLE_DEPTH_NESTING);
mutex_lock_nested(&s->self_group.mutex, depth);
else
spin_lock_nested(&s->self_group.lock,
SINGLE_DEPTH_NESTING);
spin_lock_nested(&s->self_group.lock, depth);
depth++;
}
res = ops->pre_action(s, state);
if (res < 0)
@ -906,8 +905,7 @@ static int snd_pcm_action_lock_mutex(struct action_ops *ops,
down_read(&snd_pcm_link_rwsem);
if (snd_pcm_stream_linked(substream)) {
mutex_lock(&substream->group->mutex);
mutex_lock_nested(&substream->self_group.mutex,
SINGLE_DEPTH_NESTING);
mutex_lock(&substream->self_group.mutex);
res = snd_pcm_action_group(ops, substream, state, 1);
mutex_unlock(&substream->self_group.mutex);
mutex_unlock(&substream->group->mutex);
@ -3311,7 +3309,7 @@ static const struct vm_operations_struct snd_pcm_vm_ops_data_fault = {
#ifndef ARCH_HAS_DMA_MMAP_COHERENT
/* This should be defined / handled globally! */
#ifdef CONFIG_ARM
#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
#define ARCH_HAS_DMA_MMAP_COHERENT
#endif
#endif

View File

@ -419,7 +419,7 @@ struct snd_hda_pin_quirk {
.subvendor = _subvendor,\
.name = _name,\
.value = _value,\
.pins = (const struct hda_pintbl[]) { _pins } \
.pins = (const struct hda_pintbl[]) { _pins, {0, 0}} \
}
#else
@ -427,7 +427,7 @@ struct snd_hda_pin_quirk {
{ .codec = _codec,\
.subvendor = _subvendor,\
.value = _value,\
.pins = (const struct hda_pintbl[]) { _pins } \
.pins = (const struct hda_pintbl[]) { _pins, {0, 0}} \
}
#endif

View File

@ -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) {
update_eld = true;
if (pin_eld->eld_valid != eld->eld_valid)
eld_changed = true;
}
if (pin_eld->eld_valid && !eld->eld_valid)
update_eld = true;
if (update_eld) {
bool old_eld_valid = pin_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,
eld->eld_size) != 0;
if (eld_changed)
eld->eld_size) != 0) {
memcpy(pin_eld->eld_buffer, eld->eld_buffer,
eld->eld_size);
eld_changed = true;
}
pin_eld->eld_size = eld->eld_size;
pin_eld->info = eld->info;

View File

@ -2884,6 +2884,9 @@ static void alc283_shutup(struct hda_codec *codec)
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,
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)
unsigned int oldval = spec->gpio_led;
if (enabled)
spec->gpio_led &= ~0x01;
else
spec->gpio_led |= 0x01;
else
spec->gpio_led &= ~0x01;
if (spec->gpio_led != oldval)
snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
spec->gpio_led);

View File

@ -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),
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {