]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.1 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 8 Nov 2011 16:34:36 +0000 (08:34 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 8 Nov 2011 16:34:36 +0000 (08:34 -0800)
added patches:
alsa-hda-add-support-for-92hd65-92hd66-family-of-codecs.patch
alsa-hda-disable-power-widget-control-for-idt-92hd83-93.patch
alsa-hda-fix-a-regression-for-dma-position-check-with-ca0110.patch
alsa-hda-fix-silent-output-regression-with-alc861.patch
alsa-hda-realtek-don-t-create-alt-stream-for-capture-when-unnecessary.patch
alsa-hda-realtek-skip-invalid-digital-out-pins.patch
alsa-ua101-fix-crash-when-unplugging.patch

queue-3.1/alsa-hda-add-support-for-92hd65-92hd66-family-of-codecs.patch [new file with mode: 0644]
queue-3.1/alsa-hda-disable-power-widget-control-for-idt-92hd83-93.patch [new file with mode: 0644]
queue-3.1/alsa-hda-fix-a-regression-for-dma-position-check-with-ca0110.patch [new file with mode: 0644]
queue-3.1/alsa-hda-fix-silent-output-regression-with-alc861.patch [new file with mode: 0644]
queue-3.1/alsa-hda-realtek-don-t-create-alt-stream-for-capture-when-unnecessary.patch [new file with mode: 0644]
queue-3.1/alsa-hda-realtek-skip-invalid-digital-out-pins.patch [new file with mode: 0644]
queue-3.1/alsa-ua101-fix-crash-when-unplugging.patch [new file with mode: 0644]
queue-3.1/series

diff --git a/queue-3.1/alsa-hda-add-support-for-92hd65-92hd66-family-of-codecs.patch b/queue-3.1/alsa-hda-add-support-for-92hd65-92hd66-family-of-codecs.patch
new file mode 100644 (file)
index 0000000..84fa301
--- /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
+@@ -5653,7 +5653,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 "
+@@ -6543,6 +6547,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.1/alsa-hda-disable-power-widget-control-for-idt-92hd83-93.patch b/queue-3.1/alsa-hda-disable-power-widget-control-for-idt-92hd83-93.patch
new file mode 100644 (file)
index 0000000..13b64f0
--- /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
+@@ -5625,26 +5625,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.1/alsa-hda-fix-a-regression-for-dma-position-check-with-ca0110.patch b/queue-3.1/alsa-hda-fix-a-regression-for-dma-position-check-with-ca0110.patch
new file mode 100644 (file)
index 0000000..3a7f6b6
--- /dev/null
@@ -0,0 +1,39 @@
+From 69f9ba9b0cad67bc03f0a096f7f274de795ca844 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Sun, 6 Nov 2011 13:49:13 +0100
+Subject: ALSA: hda - Fix a regression for DMA-position check with CA0110
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 69f9ba9b0cad67bc03f0a096f7f274de795ca844 upstream.
+
+The regression-fix in 3.1 for the check of DMA-position validity caused
+yet another regression for CA0110.  As usual, this hardware seems working
+only with LPIB properly.  Adding the appropriate driver-caps bit to force
+LPIB fixes the problem.
+
+Reported-and-tested-by: Andres Freund <andres@anarazel.de>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/pci/hda/hda_intel.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/sound/pci/hda/hda_intel.c
++++ b/sound/pci/hda/hda_intel.c
+@@ -2912,12 +2912,12 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids)
+         .class = PCI_CLASS_MULTIMEDIA_HD_AUDIO << 8,
+         .class_mask = 0xffffff,
+         .driver_data = AZX_DRIVER_CTX | AZX_DCAPS_CTX_WORKAROUND |
+-        AZX_DCAPS_RIRB_PRE_DELAY },
++        AZX_DCAPS_RIRB_PRE_DELAY | AZX_DCAPS_POSFIX_LPIB },
+ #else
+       /* this entry seems still valid -- i.e. without emu20kx chip */
+       { PCI_DEVICE(0x1102, 0x0009),
+         .driver_data = AZX_DRIVER_CTX | AZX_DCAPS_CTX_WORKAROUND |
+-        AZX_DCAPS_RIRB_PRE_DELAY },
++        AZX_DCAPS_RIRB_PRE_DELAY | AZX_DCAPS_POSFIX_LPIB },
+ #endif
+       /* Vortex86MX */
+       { PCI_DEVICE(0x17f3, 0x3010), .driver_data = AZX_DRIVER_GENERIC },
diff --git a/queue-3.1/alsa-hda-fix-silent-output-regression-with-alc861.patch b/queue-3.1/alsa-hda-fix-silent-output-regression-with-alc861.patch
new file mode 100644 (file)
index 0000000..a2630a3
--- /dev/null
@@ -0,0 +1,39 @@
+From 43dea228a3ba5463392281535dfb3d3fe56f4c2c Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Sun, 6 Nov 2011 11:25:34 +0100
+Subject: ALSA: hda - Fix silent output regression with ALC861
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 43dea228a3ba5463392281535dfb3d3fe56f4c2c upstream.
+
+The 3.1 kernel has a regression for ALC861 codec where no sound output
+is heard with the default setup.  It's because the amps in DACs aren't
+properly unmuted while the output mixers are assigned only to pins.
+
+This patch fixes the missing initialization of DACs when no mixer is
+assigned to them.
+
+Tested-by: Andrea Iob <andrea_iob@yahoo.it>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/pci/hda/patch_realtek.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -3077,6 +3077,12 @@ static void alc_auto_set_output_and_unmu
+       if (nid)
+               snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE,
+                                   AMP_OUT_ZERO);
++
++      /* unmute DAC if it's not assigned to a mixer */
++      nid = alc_look_for_out_mute_nid(codec, pin, dac);
++      if (nid == mix && nid_has_mute(codec, dac, HDA_OUTPUT))
++              snd_hda_codec_write(codec, dac, 0, AC_VERB_SET_AMP_GAIN_MUTE,
++                                  AMP_OUT_ZERO);
+ }
+ static void alc_auto_init_multi_out(struct hda_codec *codec)
diff --git a/queue-3.1/alsa-hda-realtek-don-t-create-alt-stream-for-capture-when-unnecessary.patch b/queue-3.1/alsa-hda-realtek-don-t-create-alt-stream-for-capture-when-unnecessary.patch
new file mode 100644 (file)
index 0000000..0a7633a
--- /dev/null
@@ -0,0 +1,57 @@
+From 1fa1757366783fb52e6e85c2d735db49b818d382 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Wed, 2 Nov 2011 21:30:51 +0100
+Subject: ALSA: hda/realtek - Don't create alt-stream for capture when unnecessary
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 1fa1757366783fb52e6e85c2d735db49b818d382 upstream.
+
+When the driver finds multiple ADCs, it tries to create an alternative
+capture PCM stream.  However, these secondary ADCs might be useless or
+in uncontrolled paths in some cases, e.g. when auto-mic or dynamic
+ADC-switching is enabled.  Also, when only a single capture source is
+available, the multi-streams don't make sense, too.
+
+With this patch, the driver checks such condition and skips the alt
+stream appropriately.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/pci/hda/patch_realtek.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -2232,6 +2232,7 @@ static int alc_build_pcms(struct hda_cod
+       struct alc_spec *spec = codec->spec;
+       struct hda_pcm *info = spec->pcm_rec;
+       const struct hda_pcm_stream *p;
++      bool have_multi_adcs;
+       int i;
+       codec->num_pcms = 1;
+@@ -2310,8 +2311,11 @@ static int alc_build_pcms(struct hda_cod
+       /* If the use of more than one ADC is requested for the current
+        * model, configure a second analog capture-only PCM.
+        */
++      have_multi_adcs = (spec->num_adc_nids > 1) &&
++              !spec->dyn_adc_switch && !spec->auto_mic &&
++              (!spec->input_mux || spec->input_mux->num_items > 1);
+       /* Additional Analaog capture for index #2 */
+-      if (spec->alt_dac_nid || spec->num_adc_nids > 1) {
++      if (spec->alt_dac_nid || have_multi_adcs) {
+               codec->num_pcms = 3;
+               info = spec->pcm_rec + 2;
+               info->name = spec->stream_name_analog;
+@@ -2327,7 +2331,7 @@ static int alc_build_pcms(struct hda_cod
+                               alc_pcm_null_stream;
+                       info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = 0;
+               }
+-              if (spec->num_adc_nids > 1) {
++              if (have_multi_adcs) {
+                       p = spec->stream_analog_alt_capture;
+                       if (!p)
+                               p = &alc_pcm_analog_alt_capture;
diff --git a/queue-3.1/alsa-hda-realtek-skip-invalid-digital-out-pins.patch b/queue-3.1/alsa-hda-realtek-skip-invalid-digital-out-pins.patch
new file mode 100644 (file)
index 0000000..ee9e75e
--- /dev/null
@@ -0,0 +1,60 @@
+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
+@@ -1566,27 +1566,29 @@ 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++) {
+               hda_nid_t conn[4];
+               err = snd_hda_get_connections(codec,
+                                             spec->autocfg.dig_out_pins[i],
+                                             conn, ARRAY_SIZE(conn));
+-              if (err < 0)
++              if (err <= 0)
+                       continue;
+               dig_nid = conn[0]; /* assume the first element is audio-out */
+-              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.1/alsa-ua101-fix-crash-when-unplugging.patch b/queue-3.1/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 a6b8e3c0e4b9d52015c2833c47a2e9dbc23394bf..06010f3e4176c01464fefd4fab9aa95f5f754acb 100644 (file)
@@ -186,3 +186,10 @@ s390-gup_huge_pmd-return-0-if-pte-changes.patch
 sparc-gup_pte_range-support-thp-based-tail-recounting.patch
 thp-share-get_huge_page_tail.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-don-t-create-alt-stream-for-capture-when-unnecessary.patch
+alsa-hda-realtek-skip-invalid-digital-out-pins.patch
+alsa-hda-fix-silent-output-regression-with-alc861.patch
+alsa-hda-fix-a-regression-for-dma-position-check-with-ca0110.patch