]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 8 Nov 2011 16:27:30 +0000 (08:27 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 8 Nov 2011 16:27:30 +0000 (08:27 -0800)
queue-3.0/alsa-hda-add-support-for-92hd65-92hd66-family-of-codecs.patch [new file with mode: 0644]
queue-3.0/alsa-hda-disable-power-widget-control-for-idt-92hd83-93.patch [new file with mode: 0644]
queue-3.0/alsa-hda-realtek-skip-invalid-digital-out-pins.patch [new file with mode: 0644]
queue-3.0/alsa-ua101-fix-crash-when-unplugging.patch [new file with mode: 0644]
queue-3.0/series

diff --git a/queue-3.0/alsa-hda-add-support-for-92hd65-92hd66-family-of-codecs.patch b/queue-3.0/alsa-hda-add-support-for-92hd65-92hd66-family-of-codecs.patch
new file mode 100644 (file)
index 0000000..228e90f
--- /dev/null
@@ -0,0 +1,54 @@
+From ad5d8755116b431f0709c745ee17cb567a478d43 Mon Sep 17 00:00:00 2001
+From: Charles Chin <Charles.Chin@idt.com>
+Date: Wed, 2 Nov 2011 07:56:58 +0100
+Subject: ALSA: hda - Add support for 92HD65 / 92HD66 family of codecs
+
+From: Charles Chin <Charles.Chin@idt.com>
+
+commit ad5d8755116b431f0709c745ee17cb567a478d43 upstream.
+
+These codecs have SPDIF-in, which is new to the 92HD83xxx compatible
+families, so a bit of logic is added to support them.
+
+Signed-off-by: Charles Chin <Charles.Chin@idt.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/pci/hda/patch_sigmatel.c |   18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+--- a/sound/pci/hda/patch_sigmatel.c
++++ b/sound/pci/hda/patch_sigmatel.c
+@@ -5486,7 +5486,11 @@ again:
+       }
+ #endif        
+-      err = stac92xx_parse_auto_config(codec, 0x1d, 0);
++      /* 92HD65/66 series has S/PDIF-IN */
++      if (codec->vendor_id >= 0x111d76e8 && codec->vendor_id <= 0x111d76f3)
++              err = stac92xx_parse_auto_config(codec, 0x1d, 0x22);
++      else
++              err = stac92xx_parse_auto_config(codec, 0x1d, 0);
+       if (!err) {
+               if (spec->board_config < 0) {
+                       printk(KERN_WARNING "hda_codec: No auto-config is "
+@@ -6369,6 +6373,18 @@ static const struct hda_codec_preset snd
+       { .id = 0x111d76e3, .name = "92HD98BXX", .patch = patch_stac92hd83xxx},
+       { .id = 0x111d76e5, .name = "92HD99BXX", .patch = patch_stac92hd83xxx},
+       { .id = 0x111d76e7, .name = "92HD90BXX", .patch = patch_stac92hd83xxx},
++      { .id = 0x111d76e8, .name = "92HD66B1X5", .patch = patch_stac92hd83xxx},
++      { .id = 0x111d76e9, .name = "92HD66B2X5", .patch = patch_stac92hd83xxx},
++      { .id = 0x111d76ea, .name = "92HD66B3X5", .patch = patch_stac92hd83xxx},
++      { .id = 0x111d76eb, .name = "92HD66C1X5", .patch = patch_stac92hd83xxx},
++      { .id = 0x111d76ec, .name = "92HD66C2X5", .patch = patch_stac92hd83xxx},
++      { .id = 0x111d76ed, .name = "92HD66C3X5", .patch = patch_stac92hd83xxx},
++      { .id = 0x111d76ee, .name = "92HD66B1X3", .patch = patch_stac92hd83xxx},
++      { .id = 0x111d76ef, .name = "92HD66B2X3", .patch = patch_stac92hd83xxx},
++      { .id = 0x111d76f0, .name = "92HD66B3X3", .patch = patch_stac92hd83xxx},
++      { .id = 0x111d76f1, .name = "92HD66C1X3", .patch = patch_stac92hd83xxx},
++      { .id = 0x111d76f2, .name = "92HD66C2X3", .patch = patch_stac92hd83xxx},
++      { .id = 0x111d76f3, .name = "92HD66C3/65", .patch = patch_stac92hd83xxx},
+       {} /* terminator */
+ };
diff --git a/queue-3.0/alsa-hda-disable-power-widget-control-for-idt-92hd83-93.patch b/queue-3.0/alsa-hda-disable-power-widget-control-for-idt-92hd83-93.patch
new file mode 100644 (file)
index 0000000..2831391
--- /dev/null
@@ -0,0 +1,51 @@
+From 35c11777b906042eca9e6f1c03e464726c7faa07 Mon Sep 17 00:00:00 2001
+From: Charles Chin <Charles.Chin@idt.com>
+Date: Wed, 2 Nov 2011 07:53:30 +0100
+Subject: ALSA: hda - Disable power-widget control for IDT 92HD83/93
+ as default
+
+From: Charles Chin <Charles.Chin@idt.com>
+
+commit 35c11777b906042eca9e6f1c03e464726c7faa07 upstream.
+
+The power-widget control in patch_stac92hd83xxx() never worked properly,
+thus it's safer to turn it off as default for now.
+
+Signed-off-by: Charles Chin <Charles.Chin@idt.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/pci/hda/patch_sigmatel.c |   20 +-------------------
+ 1 file changed, 1 insertion(+), 19 deletions(-)
+
+--- a/sound/pci/hda/patch_sigmatel.c
++++ b/sound/pci/hda/patch_sigmatel.c
+@@ -5465,26 +5465,8 @@ again:
+               stac92xx_set_config_regs(codec,
+                               stac92hd83xxx_brd_tbl[spec->board_config]);
+-      switch (codec->vendor_id) {
+-      case 0x111d76d1:
+-      case 0x111d76d9:
+-      case 0x111d76df:
+-      case 0x111d76e5:
+-      case 0x111d7666:
+-      case 0x111d7667:
+-      case 0x111d7668:
+-      case 0x111d7669:
+-      case 0x111d76e3:
+-      case 0x111d7604:
+-      case 0x111d76d4:
+-      case 0x111d7605:
+-      case 0x111d76d5:
+-      case 0x111d76e7:
+-              if (spec->board_config == STAC_92HD83XXX_PWR_REF)
+-                      break;
++      if (spec->board_config != STAC_92HD83XXX_PWR_REF)
+               spec->num_pwrs = 0;
+-              break;
+-      }
+       codec->patch_ops = stac92xx_patch_ops;
diff --git a/queue-3.0/alsa-hda-realtek-skip-invalid-digital-out-pins.patch b/queue-3.0/alsa-hda-realtek-skip-invalid-digital-out-pins.patch
new file mode 100644 (file)
index 0000000..b14d404
--- /dev/null
@@ -0,0 +1,58 @@
+From 51e4152a969aa6d2306492ebf143932dcb535c9b Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Thu, 3 Nov 2011 16:54:06 +0100
+Subject: ALSA: hda/realtek - Skip invalid digital out pins
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 51e4152a969aa6d2306492ebf143932dcb535c9b upstream.
+
+Some BIOS report invalid pins as digital output pins.  The driver checks
+the connection but it doesn't do it fully correctly, and it leaves some
+undefined value as the audio-out widget, which makes the driver spewing
+warnings.  This patch fixes the issue.
+
+Reference: https://bugzilla.novell.com/show_bug.cgi?id=727348
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/pci/hda/patch_realtek.c |   12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -2088,25 +2088,27 @@ static void alc_auto_init_digital(struct
+ static void alc_auto_parse_digital(struct hda_codec *codec)
+ {
+       struct alc_spec *spec = codec->spec;
+-      int i, err;
++      int i, err, nums;
+       hda_nid_t dig_nid;
+       /* support multiple SPDIFs; the secondary is set up as a slave */
++      nums = 0;
+       for (i = 0; i < spec->autocfg.dig_outs; i++) {
+               err = snd_hda_get_connections(codec,
+                                             spec->autocfg.dig_out_pins[i],
+                                             &dig_nid, 1);
+-              if (err < 0)
++              if (err <= 0)
+                       continue;
+-              if (!i) {
++              if (!nums) {
+                       spec->multiout.dig_out_nid = dig_nid;
+                       spec->dig_out_type = spec->autocfg.dig_out_type[0];
+               } else {
+                       spec->multiout.slave_dig_outs = spec->slave_dig_outs;
+-                      if (i >= ARRAY_SIZE(spec->slave_dig_outs) - 1)
++                      if (nums >= ARRAY_SIZE(spec->slave_dig_outs) - 1)
+                               break;
+-                      spec->slave_dig_outs[i - 1] = dig_nid;
++                      spec->slave_dig_outs[nums - 1] = dig_nid;
+               }
++              nums++;
+       }
+       if (spec->autocfg.dig_in_pin) {
diff --git a/queue-3.0/alsa-ua101-fix-crash-when-unplugging.patch b/queue-3.0/alsa-ua101-fix-crash-when-unplugging.patch
new file mode 100644 (file)
index 0000000..8096bd5
--- /dev/null
@@ -0,0 +1,92 @@
+From 862a6244eb9f9f5123fe819454fcfcae0ee1f2f9 Mon Sep 17 00:00:00 2001
+From: Clemens Ladisch <clemens@ladisch.de>
+Date: Sat, 15 Oct 2011 23:19:25 +0200
+Subject: ALSA: ua101: fix crash when unplugging
+
+From: Clemens Ladisch <clemens@ladisch.de>
+
+commit 862a6244eb9f9f5123fe819454fcfcae0ee1f2f9 upstream.
+
+If the device is unplugged while running, it is possible for a PCM
+device to be closed after the disconnect callback has returned.  This
+means that kill_stream_urb() and disable_iso_interface() would try to
+access already-invalid or freed USB data structures.
+
+The function free_usb_related_resources() was intended to prevent this,
+but forgot to clear the affected variables.
+
+Reported-and-tested-by: Olivier Courtay <olivier@courtay.org>
+Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/usb/misc/ua101.c |   28 +++++++++++++++++++++-------
+ 1 file changed, 21 insertions(+), 7 deletions(-)
+
+--- a/sound/usb/misc/ua101.c
++++ b/sound/usb/misc/ua101.c
+@@ -459,7 +459,8 @@ static void kill_stream_urbs(struct ua10
+       unsigned int i;
+       for (i = 0; i < stream->queue_length; ++i)
+-              usb_kill_urb(&stream->urbs[i]->urb);
++              if (stream->urbs[i])
++                      usb_kill_urb(&stream->urbs[i]->urb);
+ }
+ static int enable_iso_interface(struct ua101 *ua, unsigned int intf_index)
+@@ -484,6 +485,9 @@ static void disable_iso_interface(struct
+ {
+       struct usb_host_interface *alts;
++      if (!ua->intf[intf_index])
++              return;
++
+       alts = ua->intf[intf_index]->cur_altsetting;
+       if (alts->desc.bAlternateSetting != 0) {
+               int err = usb_set_interface(ua->dev,
+@@ -1144,27 +1148,37 @@ static void free_stream_urbs(struct ua10
+ {
+       unsigned int i;
+-      for (i = 0; i < stream->queue_length; ++i)
++      for (i = 0; i < stream->queue_length; ++i) {
+               kfree(stream->urbs[i]);
++              stream->urbs[i] = NULL;
++      }
+ }
+ static void free_usb_related_resources(struct ua101 *ua,
+                                      struct usb_interface *interface)
+ {
+       unsigned int i;
++      struct usb_interface *intf;
++      mutex_lock(&ua->mutex);
+       free_stream_urbs(&ua->capture);
+       free_stream_urbs(&ua->playback);
++      mutex_unlock(&ua->mutex);
+       free_stream_buffers(ua, &ua->capture);
+       free_stream_buffers(ua, &ua->playback);
+-      for (i = 0; i < ARRAY_SIZE(ua->intf); ++i)
+-              if (ua->intf[i]) {
+-                      usb_set_intfdata(ua->intf[i], NULL);
+-                      if (ua->intf[i] != interface)
++      for (i = 0; i < ARRAY_SIZE(ua->intf); ++i) {
++              mutex_lock(&ua->mutex);
++              intf = ua->intf[i];
++              ua->intf[i] = NULL;
++              mutex_unlock(&ua->mutex);
++              if (intf) {
++                      usb_set_intfdata(intf, NULL);
++                      if (intf != interface)
+                               usb_driver_release_interface(&ua101_driver,
+-                                                           ua->intf[i]);
++                                                           intf);
+               }
++      }
+ }
+ static void ua101_card_free(struct snd_card *card)
index 6e1c79f06364961dd6317187450547c5b2177de5..d995d869d7669ddc7f1f77d15451607e0eabe59f 100644 (file)
@@ -192,3 +192,7 @@ s390-gup_huge_pmd-return-0-if-pte-changes.patch
 thp-share-get_huge_page_tail.patch
 bridge-leave-carrier-on-for-empty-bridge.patch
 net-unlock-sock-before-calling-sk_free.patch
+alsa-ua101-fix-crash-when-unplugging.patch
+alsa-hda-disable-power-widget-control-for-idt-92hd83-93.patch
+alsa-hda-add-support-for-92hd65-92hd66-family-of-codecs.patch
+alsa-hda-realtek-skip-invalid-digital-out-pins.patch