From: Greg Kroah-Hartman Date: Mon, 14 May 2012 23:39:39 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.0.32~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c7a62921aabaca43ec4ea7590d12a6b0832dea2;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: alsa-echoaudio-remove-incorrect-part-of-assertion.patch alsa-hda-lessen-cpu-usage-when-waiting-for-chip-to-respond.patch --- 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 index 00000000000..9d17e16cb22 --- /dev/null +++ b/queue-3.0/alsa-echoaudio-remove-incorrect-part-of-assertion.patch @@ -0,0 +1,44 @@ +From c914f55f7cdfafe9d7d5b248751902c7ab57691e Mon Sep 17 00:00:00 2001 +From: Mark Hills +Date: Mon, 30 Apr 2012 19:39:22 +0100 +Subject: ALSA: echoaudio: Remove incorrect part of assertion + +From: Mark Hills + +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 +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..5fdf4a5e5b4 --- /dev/null +++ b/queue-3.0/alsa-hda-lessen-cpu-usage-when-waiting-for-chip-to-respond.patch @@ -0,0 +1,53 @@ +From 32cf4023e689ad5b3a81a749d8cc99d7f184cb99 Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Fri, 4 May 2012 11:05:55 +0200 +Subject: ALSA: HDA: Lessen CPU usage when waiting for chip to respond + +From: David Henningsson + +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 +Tested-by: Arun Raghavan +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + 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); diff --git a/queue-3.0/series b/queue-3.0/series index ebef67824bd..c7c4c26dfa9 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -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