]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
some .27 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Jul 2009 23:50:23 +0000 (16:50 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Jul 2009 23:50:23 +0000 (16:50 -0700)
queue-2.6.27/alsa-ca0106-fix-the-max-capture-buffer-size.patch [new file with mode: 0644]
queue-2.6.27/alsa-hda-fix-mute-control-with-some-alc262-models.patch [new file with mode: 0644]
queue-2.6.27/hid-hiddev-fix-lock-imbalance.patch [new file with mode: 0644]
queue-2.6.27/series

diff --git a/queue-2.6.27/alsa-ca0106-fix-the-max-capture-buffer-size.patch b/queue-2.6.27/alsa-ca0106-fix-the-max-capture-buffer-size.patch
new file mode 100644 (file)
index 0000000..46d94af
--- /dev/null
@@ -0,0 +1,37 @@
+From 34fdeb2d07102e07ecafe79dec170bd6733f2e56 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 20 Jul 2009 15:42:51 +0200
+Subject: ALSA: ca0106 - Fix the max capture buffer size
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 34fdeb2d07102e07ecafe79dec170bd6733f2e56 upstream.
+
+The capture buffer size with 64kB seems broken with CA0106.
+At least, either the update timing or the DMA position is wrong,
+and this screws up pulseaudio badly.
+
+This patch restricts the max buffer size less than that to make life
+a bit easier.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/pci/ca0106/ca0106_main.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/sound/pci/ca0106/ca0106_main.c
++++ b/sound/pci/ca0106/ca0106_main.c
+@@ -311,9 +311,9 @@ static struct snd_pcm_hardware snd_ca010
+       .rate_max =             192000,
+       .channels_min =         2,
+       .channels_max =         2,
+-      .buffer_bytes_max =     ((65536 - 64) * 8),
++      .buffer_bytes_max =     65536 - 128,
+       .period_bytes_min =     64,
+-      .period_bytes_max =     (65536 - 64),
++      .period_bytes_max =     32768 - 64,
+       .periods_min =          2,
+       .periods_max =          2,
+       .fifo_size =            0,
diff --git a/queue-2.6.27/alsa-hda-fix-mute-control-with-some-alc262-models.patch b/queue-2.6.27/alsa-hda-fix-mute-control-with-some-alc262-models.patch
new file mode 100644 (file)
index 0000000..36a6721
--- /dev/null
@@ -0,0 +1,86 @@
+From 8de56b7deb2534a586839eda52843c1dae680dc5 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Fri, 24 Jul 2009 16:51:47 +0200
+Subject: ALSA: hda - Fix mute control with some ALC262 models
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 8de56b7deb2534a586839eda52843c1dae680dc5 upstream.
+
+The master mute switch is wrongly implemented as checking the pointer
+instead of its value, thus it can be never muted.  This patch fixes
+the issue.
+
+Reference: Novell bnc#404873
+       https://bugzilla.novell.com/show_bug.cgi?id=404873
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/pci/hda/patch_realtek.c |   33 ++++++++++++++++-----------------
+ 1 file changed, 16 insertions(+), 17 deletions(-)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -9214,6 +9214,18 @@ static void alc262_lenovo_3000_unsol_eve
+       alc262_lenovo_3000_automute(codec, 1);
+ }
++static int amp_stereo_mute_update(struct hda_codec *codec, hda_nid_t nid,
++                                int dir, int idx, long *valp)
++{
++      int i, change = 0;
++
++      for (i = 0; i < 2; i++, valp++)
++              change |= snd_hda_codec_amp_update(codec, nid, i, dir, idx,
++                                                 HDA_AMP_MUTE,
++                                                 *valp ? 0 : HDA_AMP_MUTE);
++      return change;
++}
++
+ /* bind hp and internal speaker mute (with plug check) */
+ static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol,
+                                        struct snd_ctl_elem_value *ucontrol)
+@@ -9222,13 +9234,8 @@ static int alc262_fujitsu_master_sw_put(
+       long *valp = ucontrol->value.integer.value;
+       int change;
+-      change = snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
+-                                               HDA_AMP_MUTE,
+-                                               valp ? 0 : HDA_AMP_MUTE);
+-      change |= snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0,
+-                                               HDA_AMP_MUTE,
+-                                               valp ? 0 : HDA_AMP_MUTE);
+-
++      change = amp_stereo_mute_update(codec, 0x14, HDA_OUTPUT, 0, valp);
++      change |= amp_stereo_mute_update(codec, 0x1b, HDA_OUTPUT, 0, valp);
+       if (change)
+               alc262_fujitsu_automute(codec, 0);
+       return change;
+@@ -9265,10 +9272,7 @@ static int alc262_lenovo_3000_master_sw_
+       long *valp = ucontrol->value.integer.value;
+       int change;
+-      change = snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0,
+-                                               HDA_AMP_MUTE,
+-                                               valp ? 0 : HDA_AMP_MUTE);
+-
++      change = amp_stereo_mute_update(codec, 0x1b, HDA_OUTPUT, 0, valp);
+       if (change)
+               alc262_lenovo_3000_automute(codec, 0);
+       return change;
+@@ -10280,12 +10284,7 @@ static int alc268_acer_master_sw_put(str
+       long *valp = ucontrol->value.integer.value;
+       int change;
+-      change = snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0,
+-                                        HDA_AMP_MUTE,
+-                                        valp[0] ? 0 : HDA_AMP_MUTE);
+-      change |= snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0,
+-                                         HDA_AMP_MUTE,
+-                                         valp[1] ? 0 : HDA_AMP_MUTE);
++      change = amp_stereo_mute_update(codec, 0x14, HDA_OUTPUT, 0, valp);
+       if (change)
+               alc268_acer_automute(codec, 0);
+       return change;
diff --git a/queue-2.6.27/hid-hiddev-fix-lock-imbalance.patch b/queue-2.6.27/hid-hiddev-fix-lock-imbalance.patch
new file mode 100644 (file)
index 0000000..2ad1e49
--- /dev/null
@@ -0,0 +1,33 @@
+From 4859484b0957ddc7fe3e0fa349d98b0f1c7876bd Mon Sep 17 00:00:00 2001
+From: Jiri Slaby <jirislaby@gmail.com>
+Date: Fri, 19 Jun 2009 23:24:11 +0200
+Subject: HID: hiddev, fix lock imbalance
+
+From: Jiri Slaby <jirislaby@gmail.com>
+
+commit 4859484b0957ddc7fe3e0fa349d98b0f1c7876bd upstream.
+
+Add omitted BKL to one switch/case.
+
+Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hid/usbhid/hiddev.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/hid/usbhid/hiddev.c
++++ b/drivers/hid/usbhid/hiddev.c
+@@ -484,8 +484,10 @@ static noinline int hiddev_ioctl_usage(s
+                       goto goodreturn;
+               case HIDIOCGCOLLECTIONINDEX:
++                      i = field->usage[uref->usage_index].collection_index;
++                      unlock_kernel();
+                       kfree(uref_multi);
+-                      return field->usage[uref->usage_index].collection_index;
++                      return i;
+               case HIDIOCGUSAGES:
+                       for (i = 0; i < uref_multi->num_values; i++)
+                               uref_multi->values[i] =
index 5d9361e8561d70407861e897d1b9bc45f74edee0..a3872787c8e88aa74e33de7ac25eea19cc8a93bb 100644 (file)
@@ -9,3 +9,6 @@ usb-fix-uninitialised-variable-in-ti_do_download.patch
 usb-handle-zero-length-usbfs-submissions-correctly.patch
 usb-rndis-gadget-fix-issues-talking-from-pxa.patch
 usb-ti_usb_3410_5052-fix-duplicate-device-ids.patch
+alsa-ca0106-fix-the-max-capture-buffer-size.patch
+alsa-hda-fix-mute-control-with-some-alc262-models.patch
+hid-hiddev-fix-lock-imbalance.patch