Commit 01e0f137 authored by Kailang Yang's avatar Kailang Yang Committed by Takashi Iwai

ALSA: hda - Fixed ALC887-VD initial error

ALC887-VD is like ALC888-VD. It can not be initialized as ALC882.
Signed-off-by: default avatarKailang Yang <kailang@realtek.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 1beded5d
......@@ -19420,6 +19420,9 @@ static int patch_alc888(struct hda_codec *codec)
{
if ((alc_read_coef_idx(codec, 0) & 0x00f0)==0x0030){
kfree(codec->chip_name);
if (codec->vendor_id == 0x10ec0887)
codec->chip_name = kstrdup("ALC887-VD", GFP_KERNEL);
else
codec->chip_name = kstrdup("ALC888-VD", GFP_KERNEL);
if (!codec->chip_name) {
alc_free(codec);
......@@ -19910,7 +19913,7 @@ static struct hda_codec_preset snd_hda_preset_realtek[] = {
{ .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A",
.patch = patch_alc882 },
{ .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 },
{ .id = 0x10ec0887, .name = "ALC887", .patch = patch_alc882 },
{ .id = 0x10ec0887, .name = "ALC887", .patch = patch_alc888 },
{ .id = 0x10ec0888, .rev = 0x100101, .name = "ALC1200",
.patch = patch_alc882 },
{ .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc888 },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment