Commit 2430d7b7 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Initialize digital-input path properly

Call the path activation for the digital input pin properly, not only
setting the pin control.  Also add spec->digin_path for keeping the
path index.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 196c1766
...@@ -2521,6 +2521,7 @@ static void parse_digital(struct hda_codec *codec) ...@@ -2521,6 +2521,7 @@ static void parse_digital(struct hda_codec *codec)
print_nid_path("digin", path); print_nid_path("digin", path);
path->active = true; path->active = true;
spec->dig_in_nid = dig_nid; spec->dig_in_nid = dig_nid;
spec->digin_path = snd_hda_get_path_idx(codec, path);
break; break;
} }
} }
...@@ -3788,8 +3789,13 @@ static void init_digital(struct hda_codec *codec) ...@@ -3788,8 +3789,13 @@ static void init_digital(struct hda_codec *codec)
spec->digout_paths[i]); spec->digout_paths[i]);
} }
pin = spec->autocfg.dig_in_pin; pin = spec->autocfg.dig_in_pin;
if (pin) if (pin) {
struct nid_path *path;
snd_hda_set_pin_ctl_cache(codec, pin, PIN_IN); snd_hda_set_pin_ctl_cache(codec, pin, PIN_IN);
path = snd_hda_get_path_from_idx(codec, spec->digin_path);
if (path)
snd_hda_activate_path(codec, path, path->active, false);
}
} }
/* clear unsol-event tags on unused pins; Conexant codecs seem to leave /* clear unsol-event tags on unused pins; Conexant codecs seem to leave
......
...@@ -136,6 +136,7 @@ struct hda_gen_spec { ...@@ -136,6 +136,7 @@ struct hda_gen_spec {
int speaker_paths[AUTO_CFG_MAX_OUTS]; int speaker_paths[AUTO_CFG_MAX_OUTS];
int digout_paths[AUTO_CFG_MAX_OUTS]; int digout_paths[AUTO_CFG_MAX_OUTS];
int loopback_paths[HDA_MAX_NUM_INPUTS]; int loopback_paths[HDA_MAX_NUM_INPUTS];
int digin_path;
/* auto-mic stuff */ /* auto-mic stuff */
int am_num_entries; int am_num_entries;
......
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