Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299378
b: refs/heads/master
c: 118cb4a
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Apr 19, 2012
1 parent 17c18cd commit e01c35e
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 5 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: f2ec52d4c3698c995c89c579c34d818eab589d8b
refs/heads/master: 118cb4a408e1c4021ac85d6c05da66bb6f57e556
49 changes: 45 additions & 4 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,13 @@ enum {
ALC_FIXUP_ACT_BUILD,
};

static void alc_apply_pincfgs(struct hda_codec *codec,
const struct alc_pincfg *cfg)
{
for (; cfg->nid; cfg++)
snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val);
}

static void alc_apply_fixup(struct hda_codec *codec, int action)
{
struct alc_spec *spec = codec->spec;
Expand Down Expand Up @@ -1478,9 +1485,7 @@ static void alc_apply_fixup(struct hda_codec *codec, int action)
snd_printdd(KERN_INFO "hda_codec: %s: "
"Apply pincfg for %s\n",
codec->chip_name, modelname);
for (; cfg->nid; cfg++)
snd_hda_codec_set_pincfg(codec, cfg->nid,
cfg->val);
alc_apply_pincfgs(codec, cfg);
break;
case ALC_FIXUP_VERBS:
if (action != ALC_FIXUP_ACT_PROBE || !fix->v.verbs)
Expand Down Expand Up @@ -4861,6 +4866,7 @@ enum {
ALC260_FIXUP_GPIO1_TOGGLE,
ALC260_FIXUP_REPLACER,
ALC260_FIXUP_HP_B1900,
ALC260_FIXUP_KN1,
};

static void alc260_gpio1_automute(struct hda_codec *codec)
Expand Down Expand Up @@ -4888,6 +4894,36 @@ static void alc260_fixup_gpio1_toggle(struct hda_codec *codec,
}
}

static void alc260_fixup_kn1(struct hda_codec *codec,
const struct alc_fixup *fix, int action)
{
struct alc_spec *spec = codec->spec;
static const struct alc_pincfg pincfgs[] = {
{ 0x0f, 0x02214000 }, /* HP/speaker */
{ 0x12, 0x90a60160 }, /* int mic */
{ 0x13, 0x02a19000 }, /* ext mic */
{ 0x18, 0x01446000 }, /* SPDIF out */
/* disable bogus I/O pins */
{ 0x10, 0x411111f0 },
{ 0x11, 0x411111f0 },
{ 0x14, 0x411111f0 },
{ 0x15, 0x411111f0 },
{ 0x16, 0x411111f0 },
{ 0x17, 0x411111f0 },
{ 0x19, 0x411111f0 },
{ }
};

switch (action) {
case ALC_FIXUP_ACT_PRE_PROBE:
alc_apply_pincfgs(codec, pincfgs);
break;
case ALC_FIXUP_ACT_PROBE:
spec->init_amp = ALC_INIT_NONE;
break;
}
}

static const struct alc_fixup alc260_fixups[] = {
[ALC260_FIXUP_HP_DC5750] = {
.type = ALC_FIXUP_PINS,
Expand Down Expand Up @@ -4938,7 +4974,11 @@ static const struct alc_fixup alc260_fixups[] = {
.v.func = alc260_fixup_gpio1_toggle,
.chained = true,
.chain_id = ALC260_FIXUP_COEF,
}
},
[ALC260_FIXUP_KN1] = {
.type = ALC_FIXUP_FUNC,
.v.func = alc260_fixup_kn1,
},
};

static const struct snd_pci_quirk alc260_fixup_tbl[] = {
Expand All @@ -4948,6 +4988,7 @@ static const struct snd_pci_quirk alc260_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750),
SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900),
SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1),
SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1),
SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_FIXUP_REPLACER),
SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF),
{}
Expand Down

0 comments on commit e01c35e

Please sign in to comment.