From 0f2980603d282805bc291af8e3c900e788835789 Mon Sep 17 00:00:00 2001 From: Kailang Yang Date: Thu, 21 Oct 2010 08:51:48 +0200 Subject: [PATCH] --- yaml --- r: 216729 b: refs/heads/master c: 693194f3b8af349a510604dffad9bdbbcf1c7db8 h: refs/heads/master i: 216727: 1db22dbe1a8a928041b3412c7a5be18cddaec04a v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_realtek.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index f6e10fec1866..8e3a9ac6002d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bf1b022588eba78c990fd58fd2471cd92c2c5683 +refs/heads/master: 693194f3b8af349a510604dffad9bdbbcf1c7db8 diff --git a/trunk/sound/pci/hda/patch_realtek.c b/trunk/sound/pci/hda/patch_realtek.c index 2363f1893e88..5f00589cb791 100644 --- a/trunk/sound/pci/hda/patch_realtek.c +++ b/trunk/sound/pci/hda/patch_realtek.c @@ -19309,6 +19309,7 @@ static int patch_alc662(struct hda_codec *codec) { struct alc_spec *spec; int err, board_config; + int coef; spec = kzalloc(sizeof(*spec), GFP_KERNEL); if (!spec) @@ -19320,12 +19321,15 @@ static int patch_alc662(struct hda_codec *codec) alc_fix_pll_init(codec, 0x20, 0x04, 15); - if (alc_read_coef_idx(codec, 0) == 0x8020) + coef = alc_read_coef_idx(codec, 0); + if (coef == 0x8020 || coef == 0x8011) alc_codec_rename(codec, "ALC661"); - else if ((alc_read_coef_idx(codec, 0) & (1 << 14)) && - codec->bus->pci->subsystem_vendor == 0x1025 && - spec->cdefine.platform_type == 1) + else if (coef & (1 << 14) && + codec->bus->pci->subsystem_vendor == 0x1025 && + spec->cdefine.platform_type == 1) alc_codec_rename(codec, "ALC272X"); + else if (coef == 0x4011) + alc_codec_rename(codec, "ALC656"); board_config = snd_hda_check_board_config(codec, ALC662_MODEL_LAST, alc662_models,