diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-04-16 11:29:09 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 06:00:37 -0400 |
commit | 7943a8aba93ab439bdfbd9b92221720a4a4d8153 (patch) | |
tree | 41300c9f6b1980b7ea7a78892f65ea9c7f37467d /sound | |
parent | cb308f97aee2c816834240c8d5f7c98dd8aff157 (diff) |
[ALSA] hda - Avoid unexpected breakage with ALC889A hack
The last ALC889A hack may break on some devices with certain model presets
since patch_alc*() have different model tables. So, now it's handled in
the original patch_alc882() but fly to patch_alc883() in model=auto
appropriately.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index fb09e4429b27..732515dcc99d 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -2579,6 +2579,7 @@ static void alc_free(struct hda_codec *codec) | |||
2579 | kfree(spec->kctl_alloc); | 2579 | kfree(spec->kctl_alloc); |
2580 | } | 2580 | } |
2581 | kfree(spec); | 2581 | kfree(spec); |
2582 | codec->spec = NULL; /* to be sure */ | ||
2582 | } | 2583 | } |
2583 | 2584 | ||
2584 | /* | 2585 | /* |
@@ -6336,6 +6337,8 @@ static void alc882_auto_init(struct hda_codec *codec) | |||
6336 | alc_sku_automute(codec); | 6337 | alc_sku_automute(codec); |
6337 | } | 6338 | } |
6338 | 6339 | ||
6340 | static int patch_alc883(struct hda_codec *codec); /* called in patch_alc882() */ | ||
6341 | |||
6339 | static int patch_alc882(struct hda_codec *codec) | 6342 | static int patch_alc882(struct hda_codec *codec) |
6340 | { | 6343 | { |
6341 | struct alc_spec *spec; | 6344 | struct alc_spec *spec; |
@@ -6365,6 +6368,11 @@ static int patch_alc882(struct hda_codec *codec) | |||
6365 | board_config = ALC885_MBP3; | 6368 | board_config = ALC885_MBP3; |
6366 | break; | 6369 | break; |
6367 | default: | 6370 | default: |
6371 | /* ALC889A is handled better as ALC888-compatible */ | ||
6372 | if (codec->revision_id == 0x100103) { | ||
6373 | alc_free(codec); | ||
6374 | return patch_alc883(codec); | ||
6375 | } | ||
6368 | printk(KERN_INFO "hda_codec: Unknown model for ALC882, " | 6376 | printk(KERN_INFO "hda_codec: Unknown model for ALC882, " |
6369 | "trying auto-probe from BIOS...\n"); | 6377 | "trying auto-probe from BIOS...\n"); |
6370 | board_config = ALC882_AUTO; | 6378 | board_config = ALC882_AUTO; |
@@ -14043,7 +14051,7 @@ struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
14043 | { .id = 0x10ec0882, .name = "ALC882", .patch = patch_alc882 }, | 14051 | { .id = 0x10ec0882, .name = "ALC882", .patch = patch_alc882 }, |
14044 | { .id = 0x10ec0883, .name = "ALC883", .patch = patch_alc883 }, | 14052 | { .id = 0x10ec0883, .name = "ALC883", .patch = patch_alc883 }, |
14045 | { .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A", | 14053 | { .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A", |
14046 | .patch = patch_alc883 }, | 14054 | .patch = patch_alc882 }, /* should be patch_alc883() in future */ |
14047 | { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 }, | 14055 | { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 }, |
14048 | { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc883 }, | 14056 | { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc883 }, |
14049 | { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 }, | 14057 | { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 }, |