From 9fcb80da1a73c059289f2fcf1f5638cad29eace5 Mon Sep 17 00:00:00 2001 From: Kailang Yang Date: Mon, 17 Oct 2011 16:02:42 +0200 Subject: [PATCH] --- yaml --- r: 270391 b: refs/heads/master c: 801f49d3b84c18f66afb54532b54894b1b2afe2d h: refs/heads/master i: 270389: ff838f2112f442b0b978efc4effd5f1b36c1b5b2 270387: 9228cd9405c70e3b308372fba9d53af88734c244 270383: 687e79cf45cff67984b1f9941672f806f717733d v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_realtek.c | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 9fd8180c720a..238d2f3cd265 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 20ca0c350d4dd901277089bfcf7ce8652addd1d0 +refs/heads/master: 801f49d3b84c18f66afb54532b54894b1b2afe2d diff --git a/trunk/sound/pci/hda/patch_realtek.c b/trunk/sound/pci/hda/patch_realtek.c index b4938ccdb940..e78f36a528ca 100644 --- a/trunk/sound/pci/hda/patch_realtek.c +++ b/trunk/sound/pci/hda/patch_realtek.c @@ -5671,7 +5671,11 @@ static int patch_alc662(struct hda_codec *codec) static int patch_alc888(struct hda_codec *codec) { - if ((alc_read_coef_idx(codec, 0) & 0x00f0)==0x0030){ + int coef; + + coef = alc_read_coef_idx(codec, 0); + /* For ALC887-VD ALC888S-VD */ + if ((coef & 0x00f0) == 0x0030) { kfree(codec->chip_name); if (codec->vendor_id == 0x10ec0887) codec->chip_name = kstrdup("ALC887-VD", GFP_KERNEL); @@ -5683,6 +5687,18 @@ static int patch_alc888(struct hda_codec *codec) } return patch_alc662(codec); } + + /* For ALC888S-VC */ + if (codec->vendor_id == 0x10ec0888) { + if ((coef & 0xf0f0) == 0x3020) { + kfree(codec->chip_name); + codec->chip_name = kstrdup("ALC886", GFP_KERNEL); + if (!codec->chip_name) { + alc_free(codec); + return -ENOMEM; + } + } + } return patch_alc882(codec); }