Skip to content

Commit

Permalink
ALSA: hda - Add fixup-call in init callback
Browse files Browse the repository at this point in the history
In some cases, the fix-up is required in the init callback to be called
both at the first initialization and at the resume.  The new action type
ALC_FIXUP_ACT_INIT is used for this case.

So far, only ALC275_FIXUP_SONY_HWEQ uses this.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Jan 13, 2011
1 parent b5bfbc6 commit 5870112
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -1714,6 +1714,7 @@ enum {
enum {
ALC_FIXUP_ACT_PRE_PROBE,
ALC_FIXUP_ACT_PROBE,
ALC_FIXUP_ACT_INIT,
};

static void alc_apply_fixup(struct hda_codec *codec, int action)
Expand Down Expand Up @@ -3910,6 +3911,8 @@ static int alc_init(struct hda_codec *codec)
if (spec->init_hook)
spec->init_hook(codec);

alc_apply_fixup(codec, ALC_FIXUP_ACT_INIT);

hda_call_check_power_status(codec, 0x01);
return 0;
}
Expand Down Expand Up @@ -14871,7 +14874,7 @@ static void alc269_fixup_hweq(struct hda_codec *codec,
{
int coef;

if (action != ALC_FIXUP_ACT_PROBE)
if (action != ALC_FIXUP_ACT_INIT)
return;
coef = alc_read_coef_idx(codec, 0x1e);
alc_write_coef_idx(codec, 0x1e, coef | 0x80);
Expand Down

0 comments on commit 5870112

Please sign in to comment.