]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Mar 2015 12:17:34 +0000 (13:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Mar 2015 12:17:34 +0000 (13:17 +0100)
added patches:
alsa-control-add-sanity-checks-for-user-ctl-id-name-string.patch
alsa-hda-add-workaround-for-macbook-air-5-2-built-in-mic.patch
alsa-hda-don-t-access-stereo-amps-for-mono-channel-widgets.patch
alsa-hda-fix-built-in-mic-on-compaq-presario-cq60.patch
alsa-hda-fix-regression-of-hd-audio-controller-fallback-modes.patch
alsa-hda-set-single_adc_amp-flag-for-cs420x-codecs.patch
alsa-snd-usb-add-quirks-for-roland-ua-22.patch

queue-3.19/alsa-control-add-sanity-checks-for-user-ctl-id-name-string.patch [new file with mode: 0644]
queue-3.19/alsa-hda-add-workaround-for-macbook-air-5-2-built-in-mic.patch [new file with mode: 0644]
queue-3.19/alsa-hda-don-t-access-stereo-amps-for-mono-channel-widgets.patch [new file with mode: 0644]
queue-3.19/alsa-hda-fix-built-in-mic-on-compaq-presario-cq60.patch [new file with mode: 0644]
queue-3.19/alsa-hda-fix-regression-of-hd-audio-controller-fallback-modes.patch [new file with mode: 0644]
queue-3.19/alsa-hda-set-single_adc_amp-flag-for-cs420x-codecs.patch [new file with mode: 0644]
queue-3.19/alsa-snd-usb-add-quirks-for-roland-ua-22.patch [new file with mode: 0644]
queue-3.19/series

diff --git a/queue-3.19/alsa-control-add-sanity-checks-for-user-ctl-id-name-string.patch b/queue-3.19/alsa-control-add-sanity-checks-for-user-ctl-id-name-string.patch
new file mode 100644 (file)
index 0000000..212fb62
--- /dev/null
@@ -0,0 +1,33 @@
+From be3bb8236db2d0fcd705062ae2e2a9d75131222f Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Wed, 11 Mar 2015 18:12:49 +0100
+Subject: ALSA: control: Add sanity checks for user ctl id name string
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit be3bb8236db2d0fcd705062ae2e2a9d75131222f upstream.
+
+There was no check about the id string of user control elements, so we
+accepted even a control element with an empty string, which is
+obviously bogus.  This patch adds more sanity checks of id strings.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/core/control.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/sound/core/control.c
++++ b/sound/core/control.c
+@@ -1168,6 +1168,10 @@ static int snd_ctl_elem_add(struct snd_c
+       if (info->count < 1)
+               return -EINVAL;
++      if (!*info->id.name)
++              return -EINVAL;
++      if (strnlen(info->id.name, sizeof(info->id.name)) >= sizeof(info->id.name))
++              return -EINVAL;
+       access = info->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE :
+               (info->access & (SNDRV_CTL_ELEM_ACCESS_READWRITE|
+                                SNDRV_CTL_ELEM_ACCESS_INACTIVE|
diff --git a/queue-3.19/alsa-hda-add-workaround-for-macbook-air-5-2-built-in-mic.patch b/queue-3.19/alsa-hda-add-workaround-for-macbook-air-5-2-built-in-mic.patch
new file mode 100644 (file)
index 0000000..cf623b5
--- /dev/null
@@ -0,0 +1,32 @@
+From 2ddee91abe9cc34ddb6294ee14702b46ae07d460 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Thu, 12 Mar 2015 20:47:15 +0100
+Subject: ALSA: hda - Add workaround for MacBook Air 5,2 built-in mic
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 2ddee91abe9cc34ddb6294ee14702b46ae07d460 upstream.
+
+MacBook Air 5,2 has the same problem as MacBook Pro 8,1 where the
+built-in mic records only the right channel.  Apply the same
+workaround as MBP8,1 to spread the mono channel via a Cirrus codec
+vendor-specific COEF setup.
+
+Reported-and-tested-by: Vasil Zlatanov <vasil.zlatanov@gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_cirrus.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_cirrus.c
++++ b/sound/pci/hda/patch_cirrus.c
+@@ -393,6 +393,7 @@ static const struct snd_pci_quirk cs420x
+       SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81),
+       SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122),
+       SND_PCI_QUIRK(0x106b, 0x2800, "MacBookPro 10,1", CS420X_MBP101),
++      SND_PCI_QUIRK(0x106b, 0x5600, "MacBookAir 5,2", CS420X_MBP81),
+       SND_PCI_QUIRK(0x106b, 0x5b00, "MacBookAir 4,2", CS420X_MBA42),
+       SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE),
+       {} /* terminator */
diff --git a/queue-3.19/alsa-hda-don-t-access-stereo-amps-for-mono-channel-widgets.patch b/queue-3.19/alsa-hda-don-t-access-stereo-amps-for-mono-channel-widgets.patch
new file mode 100644 (file)
index 0000000..f58c186
--- /dev/null
@@ -0,0 +1,87 @@
+From ef403edb75580a3ec5d155f5de82155f0419c621 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Thu, 12 Mar 2015 08:30:11 +0100
+Subject: ALSA: hda - Don't access stereo amps for mono channel widgets
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit ef403edb75580a3ec5d155f5de82155f0419c621 upstream.
+
+The current HDA generic parser initializes / modifies the amp values
+always in stereo, but this seems causing the problem on ALC3229 codec
+that has a few mono channel widgets: namely, these mono widgets react
+to actions for both channels equally.
+
+In the driver code, we do care the mono channel and create a control
+only for the left channel (as defined in HD-audio spec) for such a
+node.  When the control is updated, only the left channel value is
+changed.  However, in the resume, the right channel value is also
+restored from the initial value we took as stereo, and this overwrites
+the left channel value.  This ends up being the silent output as the
+right channel has been never touched and remains muted.
+
+This patch covers the places where unconditional stereo amp accesses
+are done and converts to the conditional accesses.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94581
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/hda_generic.c |   30 ++++++++++++++++++++++--------
+ 1 file changed, 22 insertions(+), 8 deletions(-)
+
+--- a/sound/pci/hda/hda_generic.c
++++ b/sound/pci/hda/hda_generic.c
+@@ -692,7 +692,23 @@ static void init_amp(struct hda_codec *c
+ {
+       unsigned int caps = query_amp_caps(codec, nid, dir);
+       int val = get_amp_val_to_activate(codec, nid, dir, caps, false);
+-      snd_hda_codec_amp_init_stereo(codec, nid, dir, idx, 0xff, val);
++
++      if (get_wcaps(codec, nid) & AC_WCAP_STEREO)
++              snd_hda_codec_amp_init_stereo(codec, nid, dir, idx, 0xff, val);
++      else
++              snd_hda_codec_amp_init(codec, nid, 0, dir, idx, 0xff, val);
++}
++
++/* update the amp, doing in stereo or mono depending on NID */
++static int update_amp(struct hda_codec *codec, hda_nid_t nid, int dir, int idx,
++                    unsigned int mask, unsigned int val)
++{
++      if (get_wcaps(codec, nid) & AC_WCAP_STEREO)
++              return snd_hda_codec_amp_stereo(codec, nid, dir, idx,
++                                              mask, val);
++      else
++              return snd_hda_codec_amp_update(codec, nid, 0, dir, idx,
++                                              mask, val);
+ }
+ /* calculate amp value mask we can modify;
+@@ -732,7 +748,7 @@ static void activate_amp(struct hda_code
+               return;
+       val &= mask;
+-      snd_hda_codec_amp_stereo(codec, nid, dir, idx, mask, val);
++      update_amp(codec, nid, dir, idx, mask, val);
+ }
+ static void activate_amp_out(struct hda_codec *codec, struct nid_path *path,
+@@ -4424,13 +4440,11 @@ static void mute_all_mixer_nid(struct hd
+       has_amp = nid_has_mute(codec, mix, HDA_INPUT);
+       for (i = 0; i < nums; i++) {
+               if (has_amp)
+-                      snd_hda_codec_amp_stereo(codec, mix,
+-                                               HDA_INPUT, i,
+-                                               0xff, HDA_AMP_MUTE);
++                      update_amp(codec, mix, HDA_INPUT, i,
++                                 0xff, HDA_AMP_MUTE);
+               else if (nid_has_volume(codec, conn[i], HDA_OUTPUT))
+-                      snd_hda_codec_amp_stereo(codec, conn[i],
+-                                               HDA_OUTPUT, 0,
+-                                               0xff, HDA_AMP_MUTE);
++                      update_amp(codec, conn[i], HDA_OUTPUT, 0,
++                                 0xff, HDA_AMP_MUTE);
+       }
+ }
diff --git a/queue-3.19/alsa-hda-fix-built-in-mic-on-compaq-presario-cq60.patch b/queue-3.19/alsa-hda-fix-built-in-mic-on-compaq-presario-cq60.patch
new file mode 100644 (file)
index 0000000..349800b
--- /dev/null
@@ -0,0 +1,55 @@
+From ddb6ca75b5671b8fbf1909bc588c449ee74b34f9 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Wed, 11 Mar 2015 16:05:19 +0100
+Subject: ALSA: hda - Fix built-in mic on Compaq Presario CQ60
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit ddb6ca75b5671b8fbf1909bc588c449ee74b34f9 upstream.
+
+Compaq Presario CQ60 laptop with CX20561 gives a wrong pin for the
+built-in mic NID 0x17 instead of NID 0x1d, and it results in the
+non-working mic.  This patch just remaps the pin correctly via fixup.
+
+Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=920604
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_conexant.c |   11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/sound/pci/hda/patch_conexant.c
++++ b/sound/pci/hda/patch_conexant.c
+@@ -223,6 +223,7 @@ enum {
+       CXT_PINCFG_LENOVO_TP410,
+       CXT_PINCFG_LEMOTE_A1004,
+       CXT_PINCFG_LEMOTE_A1205,
++      CXT_PINCFG_COMPAQ_CQ60,
+       CXT_FIXUP_STEREO_DMIC,
+       CXT_FIXUP_INC_MIC_BOOST,
+       CXT_FIXUP_HEADPHONE_MIC_PIN,
+@@ -660,6 +661,15 @@ static const struct hda_fixup cxt_fixups
+               .type = HDA_FIXUP_PINS,
+               .v.pins = cxt_pincfg_lemote,
+       },
++      [CXT_PINCFG_COMPAQ_CQ60] = {
++              .type = HDA_FIXUP_PINS,
++              .v.pins = (const struct hda_pintbl[]) {
++                      /* 0x17 was falsely set up as a mic, it should 0x1d */
++                      { 0x17, 0x400001f0 },
++                      { 0x1d, 0x97a70120 },
++                      { }
++              }
++      },
+       [CXT_FIXUP_STEREO_DMIC] = {
+               .type = HDA_FIXUP_FUNC,
+               .v.func = cxt_fixup_stereo_dmic,
+@@ -769,6 +779,7 @@ static const struct hda_model_fixup cxt5
+ };
+ static const struct snd_pci_quirk cxt5051_fixups[] = {
++      SND_PCI_QUIRK(0x103c, 0x360b, "Compaq CQ60", CXT_PINCFG_COMPAQ_CQ60),
+       SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200),
+       {}
+ };
diff --git a/queue-3.19/alsa-hda-fix-regression-of-hd-audio-controller-fallback-modes.patch b/queue-3.19/alsa-hda-fix-regression-of-hd-audio-controller-fallback-modes.patch
new file mode 100644 (file)
index 0000000..e5ecb57
--- /dev/null
@@ -0,0 +1,50 @@
+From a1f3f1ca66bd12c339b17a0c2ef93a093f90a277 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Sun, 8 Mar 2015 18:29:50 +0100
+Subject: ALSA: hda - Fix regression of HD-audio controller fallback modes
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit a1f3f1ca66bd12c339b17a0c2ef93a093f90a277 upstream.
+
+The commit [63e51fd708f5: ALSA: hda - Don't take unresponsive D3
+transition too serious] introduced a conditional fallback behavior to
+the HD-audio controller depending on the flag set.  However, it
+introduced a silly bug, too, that the flag was evaluated in a reverse
+way.  This resulted in a regression of HD-audio controller driver
+where it can't go to the fallback mode at communication errors.
+
+Unfortunately (or fortunately?) this didn't come up until recently
+because the affected code path is an error handling that happens only
+on an unstable hardware chip.  Most of recent chips work stably, thus
+they didn't hit this problem.  Now, we've got a regression report with
+a VIA chip, and this seems indeed requiring the fallback to the
+polling mode, and finally the bug was revealed.
+
+The fix is a oneliner to remove the wrong logical NOT in the check.
+(Lesson learned - be careful about double negation.)
+
+The bug should be backported to stable, but the patch won't be
+applicable to 3.13 or earlier because of the code splits.  The stable
+fix patches for earlier kernels will be posted later manually.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94021
+Fixes: 63e51fd708f5 ('ALSA: hda - Don't take unresponsive D3 transition too serious')
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/hda_controller.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/pci/hda/hda_controller.c
++++ b/sound/pci/hda/hda_controller.c
+@@ -1160,7 +1160,7 @@ static unsigned int azx_rirb_get_respons
+               }
+       }
+-      if (!bus->no_response_fallback)
++      if (bus->no_response_fallback)
+               return -1;
+       if (!chip->polling_mode && chip->poll_count < 2) {
diff --git a/queue-3.19/alsa-hda-set-single_adc_amp-flag-for-cs420x-codecs.patch b/queue-3.19/alsa-hda-set-single_adc_amp-flag-for-cs420x-codecs.patch
new file mode 100644 (file)
index 0000000..88f7855
--- /dev/null
@@ -0,0 +1,34 @@
+From bad994f5b4ab57eec8d56c180edca00505c3eeb2 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Thu, 12 Mar 2015 20:28:04 +0100
+Subject: ALSA: hda - Set single_adc_amp flag for CS420x codecs
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit bad994f5b4ab57eec8d56c180edca00505c3eeb2 upstream.
+
+CS420x codecs seem to deal only the single amps of ADC nodes even
+though the nodes receive multiple inputs.  This leads to the
+inconsistent amp value after S3/S4 resume, for example.
+
+The fix is just to set codec->single_adc_amp flag.  Then the driver
+handles these ADC amps as if single connections.
+
+Reported-and-tested-by: Vasil Zlatanov <vasil.zlatanov@gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_cirrus.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_cirrus.c
++++ b/sound/pci/hda/patch_cirrus.c
+@@ -584,6 +584,7 @@ static int patch_cs420x(struct hda_codec
+               return -ENOMEM;
+       spec->gen.automute_hook = cs_automute;
++      codec->single_adc_amp = 1;
+       snd_hda_pick_fixup(codec, cs420x_models, cs420x_fixup_tbl,
+                          cs420x_fixups);
diff --git a/queue-3.19/alsa-snd-usb-add-quirks-for-roland-ua-22.patch b/queue-3.19/alsa-snd-usb-add-quirks-for-roland-ua-22.patch
new file mode 100644 (file)
index 0000000..af8d7d4
--- /dev/null
@@ -0,0 +1,66 @@
+From fcdcd1dec6d2c7b718385ec743ae5a9a233edad4 Mon Sep 17 00:00:00 2001
+From: Daniel Mack <daniel@zonque.org>
+Date: Thu, 12 Mar 2015 09:41:32 +0100
+Subject: ALSA: snd-usb: add quirks for Roland UA-22
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Daniel Mack <daniel@zonque.org>
+
+commit fcdcd1dec6d2c7b718385ec743ae5a9a233edad4 upstream.
+
+The device complies to the UAC1 standard but hides that fact with
+proprietary descriptors. The autodetect quirk for Roland devices
+catches the audio interface but misses the MIDI part, so a specific
+quirk is needed.
+
+Signed-off-by: Daniel Mack <daniel@zonque.org>
+Reported-by: Rafa Lafuente <rafalafuente@gmail.com>
+Tested-by: RaphaĆ«l Doursenaud <raphael@doursenaud.fr>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/quirks-table.h |   30 ++++++++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+
+--- a/sound/usb/quirks-table.h
++++ b/sound/usb/quirks-table.h
+@@ -1773,6 +1773,36 @@ YAMAHA_DEVICE(0x7010, "UB99"),
+               }
+       }
+ },
++{
++      USB_DEVICE(0x0582, 0x0159),
++      .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
++              /* .vendor_name = "Roland", */
++              /* .product_name = "UA-22", */
++              .ifnum = QUIRK_ANY_INTERFACE,
++              .type = QUIRK_COMPOSITE,
++              .data = (const struct snd_usb_audio_quirk[]) {
++                      {
++                              .ifnum = 0,
++                              .type = QUIRK_AUDIO_STANDARD_INTERFACE
++                      },
++                      {
++                              .ifnum = 1,
++                              .type = QUIRK_AUDIO_STANDARD_INTERFACE
++                      },
++                      {
++                              .ifnum = 2,
++                              .type = QUIRK_MIDI_FIXED_ENDPOINT,
++                              .data = & (const struct snd_usb_midi_endpoint_info) {
++                                      .out_cables = 0x0001,
++                                      .in_cables = 0x0001
++                              }
++                      },
++                      {
++                              .ifnum = -1
++                      }
++              }
++      }
++},
+ /* this catches most recent vendor-specific Roland devices */
+ {
+       .match_flags = USB_DEVICE_ID_MATCH_VENDOR |
index 555445eb786515f51df40f7c736c0118d31c9a93..05dc2af75832dedcb7ee7103caff3e19a6e52757 100644 (file)
@@ -60,3 +60,10 @@ s390-pci-fix-possible-information-leak-in-mmio-syscall.patch
 spi-atmel-fix-interrupt-setup-for-pdc-transfers.patch
 spi-dw-mid-avoid-potential-null-dereference.patch
 spi-pl022-fix-race-in-giveback-leading-to-driver-lock-up.patch
+alsa-snd-usb-add-quirks-for-roland-ua-22.patch
+alsa-control-add-sanity-checks-for-user-ctl-id-name-string.patch
+alsa-hda-fix-built-in-mic-on-compaq-presario-cq60.patch
+alsa-hda-don-t-access-stereo-amps-for-mono-channel-widgets.patch
+alsa-hda-set-single_adc_amp-flag-for-cs420x-codecs.patch
+alsa-hda-add-workaround-for-macbook-air-5-2-built-in-mic.patch
+alsa-hda-fix-regression-of-hd-audio-controller-fallback-modes.patch