Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308014
b: refs/heads/master
c: adcc70b
h: refs/heads/master
v: v3
  • Loading branch information
Kailang Yang authored and Takashi Iwai committed May 25, 2012
1 parent 5a4f0af commit 91d6fb9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3509a03f4dcf7fedb8880180fed3f7f791ce5598
refs/heads/master: adcc70b249ca77c1197eb62b1645146721ba6e5b
38 changes: 33 additions & 5 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -2368,6 +2368,7 @@ static struct alc_codec_rename_table rename_tbl[] = {
{ 0x10ec0269, 0xffff, 0xa023, "ALC259" },
{ 0x10ec0269, 0xffff, 0x6023, "ALC281X" },
{ 0x10ec0269, 0x00f0, 0x0020, "ALC269VC" },
{ 0x10ec0269, 0x00f0, 0x0030, "ALC269VD" },
{ 0x10ec0887, 0x00f0, 0x0030, "ALC887-VD" },
{ 0x10ec0888, 0x00f0, 0x0030, "ALC888-VD" },
{ 0x10ec0888, 0xf0f0, 0x3020, "ALC886" },
Expand Down Expand Up @@ -5614,6 +5615,7 @@ enum {
ALC269_TYPE_ALC269VA,
ALC269_TYPE_ALC269VB,
ALC269_TYPE_ALC269VC,
ALC269_TYPE_ALC269VD,
};

/*
Expand All @@ -5625,8 +5627,21 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
static const hda_nid_t alc269_ssids[] = { 0, 0x1b, 0x14, 0x21 };
static const hda_nid_t alc269va_ssids[] = { 0x15, 0x1b, 0x14, 0 };
struct alc_spec *spec = codec->spec;
const hda_nid_t *ssids = spec->codec_variant == ALC269_TYPE_ALC269VA ?
alc269va_ssids : alc269_ssids;
const hda_nid_t *ssids;

switch (spec->codec_variant) {
case ALC269_TYPE_ALC269VA:
case ALC269_TYPE_ALC269VC:
ssids = alc269va_ssids;
break;
case ALC269_TYPE_ALC269VB:
case ALC269_TYPE_ALC269VD:
ssids = alc269_ssids;
break;
default:
ssids = alc269_ssids;
break;
}

return alc_parse_auto_config(codec, alc269_ignore, ssids);
}
Expand All @@ -5643,6 +5658,11 @@ static void alc269_toggle_power_output(struct hda_codec *codec, int power_up)

static void alc269_shutup(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;

if (spec->codec_variant != ALC269_TYPE_ALC269VB)
return;

if ((alc_get_coef0(codec) & 0x00ff) == 0x017)
alc269_toggle_power_output(codec, 0);
if ((alc_get_coef0(codec) & 0x00ff) == 0x018) {
Expand All @@ -5654,19 +5674,24 @@ static void alc269_shutup(struct hda_codec *codec)
#ifdef CONFIG_PM
static int alc269_resume(struct hda_codec *codec)
{
if ((alc_get_coef0(codec) & 0x00ff) == 0x018) {
struct alc_spec *spec = codec->spec;

if (spec->codec_variant == ALC269_TYPE_ALC269VB ||
(alc_get_coef0(codec) & 0x00ff) == 0x018) {
alc269_toggle_power_output(codec, 0);
msleep(150);
}

codec->patch_ops.init(codec);

if ((alc_get_coef0(codec) & 0x00ff) == 0x017) {
if (spec->codec_variant == ALC269_TYPE_ALC269VB ||
(alc_get_coef0(codec) & 0x00ff) == 0x017) {
alc269_toggle_power_output(codec, 1);
msleep(200);
}

if ((alc_get_coef0(codec) & 0x00ff) == 0x018)
if (spec->codec_variant == ALC269_TYPE_ALC269VB ||
(alc_get_coef0(codec) & 0x00ff) == 0x018)
alc269_toggle_power_output(codec, 1);

snd_hda_codec_resume_amp(codec);
Expand Down Expand Up @@ -6081,6 +6106,9 @@ static int patch_alc269(struct hda_codec *codec)
err = alc_codec_rename(codec, "ALC3202");
spec->codec_variant = ALC269_TYPE_ALC269VC;
break;
case 0x0030:
spec->codec_variant = ALC269_TYPE_ALC269VD;
break;
default:
alc_fix_pll_init(codec, 0x20, 0x04, 15);
}
Expand Down

0 comments on commit 91d6fb9

Please sign in to comment.