Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189967
b: refs/heads/master
c: 7fa90e8
h: refs/heads/master
i:
  189965: 37edd17
  189963: 725e232
  189959: 2512452
  189951: 771820f
v: v3
  • Loading branch information
Takashi Iwai committed Apr 12, 2010
1 parent daa3c07 commit 87ae10b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 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: 7f311a46916a3be00a1a8e3f1bdf461d08f1d263
refs/heads/master: 7fa90e873f520dad5ec58f47340996cda083e875
35 changes: 28 additions & 7 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -1390,22 +1390,31 @@ struct alc_fixup {

static void alc_pick_fixup(struct hda_codec *codec,
const struct snd_pci_quirk *quirk,
const struct alc_fixup *fix)
const struct alc_fixup *fix,
int pre_init)
{
const struct alc_pincfg *cfg;

quirk = snd_pci_quirk_lookup(codec->bus->pci, quirk);
if (!quirk)
return;

fix += quirk->value;
cfg = fix->pins;
if (cfg) {
if (pre_init && cfg) {
#ifdef CONFIG_SND_DEBUG_VERBOSE
snd_printdd(KERN_INFO "hda_codec: %s: Apply pincfg for %s\n",
codec->chip_name, quirk->name);
#endif
for (; cfg->nid; cfg++)
snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val);
}
if (fix->verbs)
if (!pre_init && fix->verbs) {
#ifdef CONFIG_SND_DEBUG_VERBOSE
snd_printdd(KERN_INFO "hda_codec: %s: Apply fix-verbs for %s\n",
codec->chip_name, quirk->name);
#endif
add_verb(codec->spec, fix->verbs);
}
}

static int alc_read_coef_idx(struct hda_codec *codec,
Expand Down Expand Up @@ -10439,7 +10448,8 @@ static int patch_alc882(struct hda_codec *codec)
board_config = ALC882_AUTO;
}

alc_pick_fixup(codec, alc882_fixup_tbl, alc882_fixups);
if (board_config == ALC882_AUTO)
alc_pick_fixup(codec, alc882_fixup_tbl, alc882_fixups, 1);

if (board_config == ALC882_AUTO) {
/* automatic parse from the BIOS config */
Expand Down Expand Up @@ -10512,6 +10522,9 @@ static int patch_alc882(struct hda_codec *codec)
set_capture_mixer(codec);
set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);

if (board_config == ALC882_AUTO)
alc_pick_fixup(codec, alc882_fixup_tbl, alc882_fixups, 0);

spec->vmaster_nid = 0x0c;

codec->patch_ops = alc_patch_ops;
Expand Down Expand Up @@ -15417,7 +15430,8 @@ static int patch_alc861(struct hda_codec *codec)
board_config = ALC861_AUTO;
}

alc_pick_fixup(codec, alc861_fixup_tbl, alc861_fixups);
if (board_config == ALC861_AUTO)
alc_pick_fixup(codec, alc861_fixup_tbl, alc861_fixups, 1);

if (board_config == ALC861_AUTO) {
/* automatic parse from the BIOS config */
Expand Down Expand Up @@ -15454,6 +15468,9 @@ static int patch_alc861(struct hda_codec *codec)

spec->vmaster_nid = 0x03;

if (board_config == ALC861_AUTO)
alc_pick_fixup(codec, alc861_fixup_tbl, alc861_fixups, 0);

codec->patch_ops = alc_patch_ops;
if (board_config == ALC861_AUTO) {
spec->init_hook = alc861_auto_init;
Expand Down Expand Up @@ -16388,7 +16405,8 @@ static int patch_alc861vd(struct hda_codec *codec)
board_config = ALC861VD_AUTO;
}

alc_pick_fixup(codec, alc861vd_fixup_tbl, alc861vd_fixups);
if (board_config == ALC861VD_AUTO)
alc_pick_fixup(codec, alc861vd_fixup_tbl, alc861vd_fixups, 1);

if (board_config == ALC861VD_AUTO) {
/* automatic parse from the BIOS config */
Expand Down Expand Up @@ -16436,6 +16454,9 @@ static int patch_alc861vd(struct hda_codec *codec)

spec->vmaster_nid = 0x02;

if (board_config == ALC861VD_AUTO)
alc_pick_fixup(codec, alc861vd_fixup_tbl, alc861vd_fixups, 0);

codec->patch_ops = alc_patch_ops;

if (board_config == ALC861VD_AUTO)
Expand Down

0 comments on commit 87ae10b

Please sign in to comment.