diff options
author | Jaroslav Kysela <perex@perex.cz> | 2009-07-10 06:27:31 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-07-10 06:55:49 -0400 |
commit | 9d30937accf2c01e8b0bd59787409a7348cbbcb7 (patch) | |
tree | 6ee1c5a8e9487ca8f56d015e64dbb9cfd3ca0001 /sound | |
parent | 005b10769c05fb16db70f7689ffb5ba17e3fc324 (diff) |
ALSA: hda_intel: more strict alc880_parse_auto_config dig_nid checking
On some IbexPeak systems with ALC889A errors like "azx_get_response
timeout, switching to polling mode: last cmd=0xaf9f000b" are produced,
because non-existent codec #10 is wrongly accessed.
The problem is that snd_hda_get_connections() returns out-of-range result
for NID 0x1c (something like 0xf8f9 or 0xffff).
This patch adds a check to alc880_parse_auto_config() to avoid using
of this out-of-range NIDs. A better fix maybe to improve
snd_hda_get_connections() routine to check for valid NID ranges if
NIDs are expected as result.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index bbb9b42e2604..7e99763ca527 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4505,6 +4505,12 @@ static int alc880_parse_auto_config(struct hda_codec *codec) | |||
4505 | &dig_nid, 1); | 4505 | &dig_nid, 1); |
4506 | if (err < 0) | 4506 | if (err < 0) |
4507 | continue; | 4507 | continue; |
4508 | if (dig_nid > 0x7f) { | ||
4509 | printk(KERN_ERR "alc880_auto: invalid dig_nid " | ||
4510 | "connection 0x%x for NID 0x%x\n", dig_nid, | ||
4511 | spec->autocfg.dig_out_pins[i]); | ||
4512 | continue; | ||
4513 | } | ||
4508 | if (!i) | 4514 | if (!i) |
4509 | spec->multiout.dig_out_nid = dig_nid; | 4515 | spec->multiout.dig_out_nid = dig_nid; |
4510 | else { | 4516 | else { |