ALSA: hda - Call snd_hda_jack_report_sync() generically in hda_codec.c

Instead of calling the jack sync in the init callback of each codec,
call it generically at initialization and resume.  By calling it at
the last of resume sequence, a possible race between the jack sync and
the unsol event enablement in the current code will be closed, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai
2012-08-22 16:40:24 +02:00
parent f993348746
commit 8a5354140a
7 changed files with 2 additions and 10 deletions

View File

@@ -1193,7 +1193,6 @@ static int cs_init(struct hda_codec *codec)
init_output(codec);
init_input(codec);
init_digital(codec);
snd_hda_jack_report_sync(codec);
return 0;
}
@@ -1643,7 +1642,6 @@ static int cs421x_init(struct hda_codec *codec)
init_output(codec);
init_input(codec);
init_cs421x_digital(codec);
snd_hda_jack_report_sync(codec);
return 0;
}