Commit acf26c0c authored by Ulrich Dangel's avatar Ulrich Dangel Committed by Takashi Iwai

ALSA: hda - cxt5051 report jack state

Signed-off-by: default avatarUlrich Dangel <uli@spamt.net>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent bc7a166d
...@@ -1713,6 +1713,7 @@ static void cxt5051_hp_automute(struct hda_codec *codec) ...@@ -1713,6 +1713,7 @@ static void cxt5051_hp_automute(struct hda_codec *codec)
static void cxt5051_hp_unsol_event(struct hda_codec *codec, static void cxt5051_hp_unsol_event(struct hda_codec *codec,
unsigned int res) unsigned int res)
{ {
int nid = (res & AC_UNSOL_RES_SUBTAG) >> 20;
switch (res >> 26) { switch (res >> 26) {
case CONEXANT_HP_EVENT: case CONEXANT_HP_EVENT:
cxt5051_hp_automute(codec); cxt5051_hp_automute(codec);
...@@ -1724,6 +1725,7 @@ static void cxt5051_hp_unsol_event(struct hda_codec *codec, ...@@ -1724,6 +1725,7 @@ static void cxt5051_hp_unsol_event(struct hda_codec *codec,
cxt5051_portc_automic(codec); cxt5051_portc_automic(codec);
break; break;
} }
conexant_report_jack(codec, nid);
} }
static struct snd_kcontrol_new cxt5051_mixers[] = { static struct snd_kcontrol_new cxt5051_mixers[] = {
...@@ -1798,6 +1800,7 @@ static struct hda_verb cxt5051_init_verbs[] = { ...@@ -1798,6 +1800,7 @@ static struct hda_verb cxt5051_init_verbs[] = {
static int cxt5051_init(struct hda_codec *codec) static int cxt5051_init(struct hda_codec *codec)
{ {
conexant_init(codec); conexant_init(codec);
conexant_init_jacks(codec);
if (codec->patch_ops.unsol_event) { if (codec->patch_ops.unsol_event) {
cxt5051_hp_automute(codec); cxt5051_hp_automute(codec);
cxt5051_portb_automic(codec); cxt5051_portb_automic(codec);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment