]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 May 2012 23:39:39 +0000 (16:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 May 2012 23:39:39 +0000 (16:39 -0700)
added patches:
alsa-echoaudio-remove-incorrect-part-of-assertion.patch
alsa-hda-lessen-cpu-usage-when-waiting-for-chip-to-respond.patch

queue-3.0/alsa-echoaudio-remove-incorrect-part-of-assertion.patch [new file with mode: 0644]
queue-3.0/alsa-hda-lessen-cpu-usage-when-waiting-for-chip-to-respond.patch [new file with mode: 0644]
queue-3.0/series

diff --git a/queue-3.0/alsa-echoaudio-remove-incorrect-part-of-assertion.patch b/queue-3.0/alsa-echoaudio-remove-incorrect-part-of-assertion.patch
new file mode 100644 (file)
index 0000000..9d17e16
--- /dev/null
@@ -0,0 +1,44 @@
+From c914f55f7cdfafe9d7d5b248751902c7ab57691e Mon Sep 17 00:00:00 2001
+From: Mark Hills <mark@pogo.org.uk>
+Date: Mon, 30 Apr 2012 19:39:22 +0100
+Subject: ALSA: echoaudio: Remove incorrect part of assertion
+
+From: Mark Hills <mark@pogo.org.uk>
+
+commit c914f55f7cdfafe9d7d5b248751902c7ab57691e upstream.
+
+This assertion seems to imply that chip->dsp_code_to_load is a pointer.
+It's actually an integer handle on the actual firmware, and 0 has no
+special meaning.
+
+The assertion prevents initialisation of a Darla20 card, but would also
+affect other models. It seems it was introduced in commit dd7b254d.
+
+ALSA sound/pci/echoaudio/echoaudio.c:2061 Echoaudio driver starting...
+ALSA sound/pci/echoaudio/echoaudio.c:1969 chip=ebe4e000
+ALSA sound/pci/echoaudio/echoaudio.c:2007 pci=ed568000 irq=19 subdev=0010 Init hardware...
+ALSA sound/pci/echoaudio/darla20_dsp.c:36 init_hw() - Darla20
+------------[ cut here ]------------
+WARNING: at sound/pci/echoaudio/echoaudio_dsp.c:478 init_hw+0x1d1/0x86c [snd_darla20]()
+Hardware name: Dell DM051
+BUG? (!chip->dsp_code_to_load || !chip->comm_page)
+
+Signed-off-by: Mark Hills <mark@pogo.org.uk>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/echoaudio/echoaudio_dsp.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/pci/echoaudio/echoaudio_dsp.c
++++ b/sound/pci/echoaudio/echoaudio_dsp.c
+@@ -475,7 +475,7 @@ static int load_firmware(struct echoaudi
+       const struct firmware *fw;
+       int box_type, err;
+-      if (snd_BUG_ON(!chip->dsp_code_to_load || !chip->comm_page))
++      if (snd_BUG_ON(!chip->comm_page))
+               return -EPERM;
+       /* See if the ASIC is present and working - only if the DSP is already loaded */
diff --git a/queue-3.0/alsa-hda-lessen-cpu-usage-when-waiting-for-chip-to-respond.patch b/queue-3.0/alsa-hda-lessen-cpu-usage-when-waiting-for-chip-to-respond.patch
new file mode 100644 (file)
index 0000000..5fdf4a5
--- /dev/null
@@ -0,0 +1,53 @@
+From 32cf4023e689ad5b3a81a749d8cc99d7f184cb99 Mon Sep 17 00:00:00 2001
+From: David Henningsson <david.henningsson@canonical.com>
+Date: Fri, 4 May 2012 11:05:55 +0200
+Subject: ALSA: HDA: Lessen CPU usage when waiting for chip to respond
+
+From: David Henningsson <david.henningsson@canonical.com>
+
+commit 32cf4023e689ad5b3a81a749d8cc99d7f184cb99 upstream.
+
+When an IRQ for some reason gets lost, we wait up to a second using
+udelay, which is CPU intensive. This patch improves the situation by
+waiting about 30 ms in the CPU intensive mode, then stepping down to
+using msleep(2) instead. In essence, we trade some granularity in
+exchange for less CPU consumption when the waiting time is a bit longer.
+
+As a result, PulseAudio should no longer be killed by the kernel
+for taking up to much RT-prio CPU time. At least not for *this* reason.
+
+Signed-off-by: David Henningsson <david.henningsson@canonical.com>
+Tested-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/hda_intel.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/sound/pci/hda/hda_intel.c
++++ b/sound/pci/hda/hda_intel.c
+@@ -702,11 +702,13 @@ static unsigned int azx_rirb_get_respons
+ {
+       struct azx *chip = bus->private_data;
+       unsigned long timeout;
++      unsigned long loopcounter;
+       int do_poll = 0;
+  again:
+       timeout = jiffies + msecs_to_jiffies(1000);
+-      for (;;) {
++
++      for (loopcounter = 0;; loopcounter++) {
+               if (chip->polling_mode || do_poll) {
+                       spin_lock_irq(&chip->reg_lock);
+                       azx_update_rirb(chip);
+@@ -722,7 +724,7 @@ static unsigned int azx_rirb_get_respons
+               }
+               if (time_after(jiffies, timeout))
+                       break;
+-              if (bus->needs_damn_long_delay)
++              if (bus->needs_damn_long_delay || loopcounter > 3000)
+                       msleep(2); /* temporary workaround */
+               else {
+                       udelay(10);
index ebef67824bdefdfa34b17069d40a82103902e464..c7c4c26dfa9ee9a5e4485eabbec54a70d8f5a1b7 100644 (file)
@@ -18,3 +18,5 @@ tg3-avoid-panic-from-reserved-statblk-field-access.patch
 sungem-fix-wakeonlan.patch
 tcp-change-tcp_adv_win_scale-and-tcp_rmem.patch
 sony-laptop-enable-keyboard-backlight-by-default.patch
+alsa-echoaudio-remove-incorrect-part-of-assertion.patch
+alsa-hda-lessen-cpu-usage-when-waiting-for-chip-to-respond.patch