add some alsa patches from linux-next to make intel hda suck less
X220 tested. svn path=/dists/trunk/linux-2.6/; revision=17807
This commit is contained in:
parent
c500ba7642
commit
189fbb5cd4
|
@ -14,6 +14,9 @@ linux-2.6 (3.0.0~rc6-1~experimental.1) UNRELEASED; urgency=low
|
|||
* [thinkpad]: Add KEY_MICMUTE and enable it on Lenovo X220.
|
||||
* [m68k]: resources: Add lookup_resource().
|
||||
* m68k/atari: Reserve some ST-RAM early on for device buffer use.
|
||||
* ALSA: hda - Handle -1 as invalid position, too
|
||||
* ALSA: hda - Judge playback stream from stream id in azx_via_get_position()
|
||||
* ALSA: HDMI - fix ELD monitor name length
|
||||
|
||||
[ Ben Hutchings ]
|
||||
* [x86] Enable SCSI_ISCI as module
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
From f5b2d0ef631bb0647ae8ed1752d2127b8fb6da70 Mon Sep 17 00:00:00 2001
|
||||
From: Wu Fengguang <fengguang.wu@intel.com>
|
||||
Date: Wed, 29 Jun 2011 14:26:07 +0800
|
||||
Subject: [PATCH] ALSA: HDMI - fix ELD monitor name length
|
||||
|
||||
I noticed that the last character of the ELD monitor name is lost,
|
||||
this fixes the issue.
|
||||
|
||||
This fix should be confirming to the HDA spec, and works together with
|
||||
the DRM part of the ELD patch.
|
||||
|
||||
The HDA spec does not mention that Monitor_Name_String is an '\0'
|
||||
ending string, and it allows NML to be 1, which is only valid when MNL
|
||||
does not count the possible ending '\0'.
|
||||
|
||||
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/hda_eld.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
|
||||
index b05f7be..e3e8531 100644
|
||||
--- a/sound/pci/hda/hda_eld.c
|
||||
+++ b/sound/pci/hda/hda_eld.c
|
||||
@@ -294,7 +294,7 @@ static int hdmi_update_eld(struct hdmi_eld *e,
|
||||
snd_printd(KERN_INFO "HDMI: out of range MNL %d\n", mnl);
|
||||
goto out_fail;
|
||||
} else
|
||||
- strlcpy(e->monitor_name, buf + ELD_FIXED_BYTES, mnl);
|
||||
+ strlcpy(e->monitor_name, buf + ELD_FIXED_BYTES, mnl + 1);
|
||||
|
||||
for (i = 0; i < e->sad_count; i++) {
|
||||
if (ELD_FIXED_BYTES + mnl + 3 * (i + 1) > size) {
|
||||
--
|
||||
1.7.2.5
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
From a810364a0424c297242c6c66071a42f7675a5568 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Tue, 7 Jun 2011 12:23:23 +0200
|
||||
Subject: [PATCH] ALSA: hda - Handle -1 as invalid position, too
|
||||
|
||||
When reading from the position-buffer results in -1, handle as it's
|
||||
invalid and falls back to LPIB mode as well as 0.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/hda_intel.c | 21 +++++++++++----------
|
||||
1 files changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
|
||||
index 966f401..45cd02f 100644
|
||||
--- a/sound/pci/hda/hda_intel.c
|
||||
+++ b/sound/pci/hda/hda_intel.c
|
||||
@@ -1930,6 +1930,17 @@ static unsigned int azx_get_position(struct azx *chip,
|
||||
default:
|
||||
/* use the position buffer */
|
||||
pos = le32_to_cpu(*azx_dev->posbuf);
|
||||
+ if (chip->position_fix[stream] == POS_FIX_AUTO) {
|
||||
+ if (!pos || pos == (u32)-1) {
|
||||
+ printk(KERN_WARNING
|
||||
+ "hda-intel: Invalid position buffer, "
|
||||
+ "using LPIB read method instead.\n");
|
||||
+ chip->position_fix[stream] = POS_FIX_LPIB;
|
||||
+ pos = azx_sd_readl(azx_dev, SD_LPIB);
|
||||
+ } else
|
||||
+ chip->position_fix[stream] = POS_FIX_POSBUF;
|
||||
+ }
|
||||
+ break;
|
||||
}
|
||||
|
||||
if (pos >= azx_dev->bufsize)
|
||||
@@ -1967,16 +1978,6 @@ static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev)
|
||||
|
||||
stream = azx_dev->substream->stream;
|
||||
pos = azx_get_position(chip, azx_dev);
|
||||
- if (chip->position_fix[stream] == POS_FIX_AUTO) {
|
||||
- if (!pos) {
|
||||
- printk(KERN_WARNING
|
||||
- "hda-intel: Invalid position buffer, "
|
||||
- "using LPIB read method instead.\n");
|
||||
- chip->position_fix[stream] = POS_FIX_LPIB;
|
||||
- pos = azx_get_position(chip, azx_dev);
|
||||
- } else
|
||||
- chip->position_fix[stream] = POS_FIX_POSBUF;
|
||||
- }
|
||||
|
||||
if (WARN_ONCE(!azx_dev->period_bytes,
|
||||
"hda-intel: zero azx_dev->period_bytes"))
|
||||
--
|
||||
1.7.2.5
|
||||
|
29
debian/patches/bugfix/all/ALSA-hda-Judge-playback-stream-from-stream-id-in-azx.patch
vendored
Normal file
29
debian/patches/bugfix/all/ALSA-hda-Judge-playback-stream-from-stream-id-in-azx.patch
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
From b4a655e81d4d1d12abc92d29dfb7550e66a08799 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Tue, 7 Jun 2011 12:26:56 +0200
|
||||
Subject: [PATCH] ALSA: hda - Judge playback stream from stream id in azx_via_get_position()
|
||||
|
||||
Instead of checking the azx_dev index with a fixed number (4), check
|
||||
the stream direction of the assigned substream.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/hda_intel.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
|
||||
index 45cd02f..5f2d05a 100644
|
||||
--- a/sound/pci/hda/hda_intel.c
|
||||
+++ b/sound/pci/hda/hda_intel.c
|
||||
@@ -1866,7 +1866,7 @@ static unsigned int azx_via_get_position(struct azx *chip,
|
||||
unsigned int fifo_size;
|
||||
|
||||
link_pos = azx_sd_readl(azx_dev, SD_LPIB);
|
||||
- if (azx_dev->index >= 4) {
|
||||
+ if (azx_dev->substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
|
||||
/* Playback, no problem using link position */
|
||||
return link_pos;
|
||||
}
|
||||
--
|
||||
1.7.2.5
|
||||
|
|
@ -48,4 +48,6 @@
|
|||
+ bugfix/all/Add-KEY_MICMUTE-and-enable-it-on-Lenovo-X220.patch
|
||||
+ bugfix/all/resources-Add-lookup_resource.patch
|
||||
+ bugfix/all/m68k-atari-Reserve-some-ST-RAM-early-on-for-device-b.patch
|
||||
|
||||
+ bugfix/all/ALSA-hda-Handle-1-as-invalid-position-too.patch
|
||||
+ bugfix/all/ALSA-hda-Judge-playback-stream-from-stream-id-in-azx.patch
|
||||
+ bugfix/all/ALSA-HDMI-fix-ELD-monitor-name-length.patch
|
||||
|
|
Loading…
Reference in New Issue