diff options
author | Kailang Yang <kailang@realtek.com> | 2010-10-21 02:51:48 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-10-21 02:51:48 -0400 |
commit | 693194f3b8af349a510604dffad9bdbbcf1c7db8 (patch) | |
tree | b37aff2e741d873a7cf4097696e033df800e6789 /sound | |
parent | bf1b022588eba78c990fd58fd2471cd92c2c5683 (diff) |
ALSA: hda - Fix codec rename rules for ALC662-compatible codecs
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 2363f1893e88..5f00589cb791 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -19309,6 +19309,7 @@ static int patch_alc662(struct hda_codec *codec) | |||
19309 | { | 19309 | { |
19310 | struct alc_spec *spec; | 19310 | struct alc_spec *spec; |
19311 | int err, board_config; | 19311 | int err, board_config; |
19312 | int coef; | ||
19312 | 19313 | ||
19313 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); | 19314 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); |
19314 | if (!spec) | 19315 | if (!spec) |
@@ -19320,12 +19321,15 @@ static int patch_alc662(struct hda_codec *codec) | |||
19320 | 19321 | ||
19321 | alc_fix_pll_init(codec, 0x20, 0x04, 15); | 19322 | alc_fix_pll_init(codec, 0x20, 0x04, 15); |
19322 | 19323 | ||
19323 | if (alc_read_coef_idx(codec, 0) == 0x8020) | 19324 | coef = alc_read_coef_idx(codec, 0); |
19325 | if (coef == 0x8020 || coef == 0x8011) | ||
19324 | alc_codec_rename(codec, "ALC661"); | 19326 | alc_codec_rename(codec, "ALC661"); |
19325 | else if ((alc_read_coef_idx(codec, 0) & (1 << 14)) && | 19327 | else if (coef & (1 << 14) && |
19326 | codec->bus->pci->subsystem_vendor == 0x1025 && | 19328 | codec->bus->pci->subsystem_vendor == 0x1025 && |
19327 | spec->cdefine.platform_type == 1) | 19329 | spec->cdefine.platform_type == 1) |
19328 | alc_codec_rename(codec, "ALC272X"); | 19330 | alc_codec_rename(codec, "ALC272X"); |
19331 | else if (coef == 0x4011) | ||
19332 | alc_codec_rename(codec, "ALC656"); | ||
19329 | 19333 | ||
19330 | board_config = snd_hda_check_board_config(codec, ALC662_MODEL_LAST, | 19334 | board_config = snd_hda_check_board_config(codec, ALC662_MODEL_LAST, |
19331 | alc662_models, | 19335 | alc662_models, |