aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-04 09:09:42 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-12 02:43:38 -0500
commit2430d7b78ba161656a621279964421aa06e04b02 (patch)
tree8e5dff7d708cd43b707c999b39c12691fa29f055 /sound/pci/hda
parent196c17668056ed5226070d06878242c116dfece2 (diff)
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: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_generic.c8
-rw-r--r--sound/pci/hda/hda_generic.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index c8bf81230206..4e49c5e27704 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -2521,6 +2521,7 @@ static void parse_digital(struct hda_codec *codec)
2521 print_nid_path("digin", path); 2521 print_nid_path("digin", path);
2522 path->active = true; 2522 path->active = true;
2523 spec->dig_in_nid = dig_nid; 2523 spec->dig_in_nid = dig_nid;
2524 spec->digin_path = snd_hda_get_path_idx(codec, path);
2524 break; 2525 break;
2525 } 2526 }
2526 } 2527 }
@@ -3788,8 +3789,13 @@ static void init_digital(struct hda_codec *codec)
3788 spec->digout_paths[i]); 3789 spec->digout_paths[i]);
3789 } 3790 }
3790 pin = spec->autocfg.dig_in_pin; 3791 pin = spec->autocfg.dig_in_pin;
3791 if (pin) 3792 if (pin) {
3793 struct nid_path *path;
3792 snd_hda_set_pin_ctl_cache(codec, pin, PIN_IN); 3794 snd_hda_set_pin_ctl_cache(codec, pin, PIN_IN);
3795 path = snd_hda_get_path_from_idx(codec, spec->digin_path);
3796 if (path)
3797 snd_hda_activate_path(codec, path, path->active, false);
3798 }
3793} 3799}
3794 3800
3795/* clear unsol-event tags on unused pins; Conexant codecs seem to leave 3801/* clear unsol-event tags on unused pins; Conexant codecs seem to leave
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
index 71d409f5de87..ba8de12b7125 100644
--- a/sound/pci/hda/hda_generic.h
+++ b/sound/pci/hda/hda_generic.h
@@ -136,6 +136,7 @@ struct hda_gen_spec {
136 int speaker_paths[AUTO_CFG_MAX_OUTS]; 136 int speaker_paths[AUTO_CFG_MAX_OUTS];
137 int digout_paths[AUTO_CFG_MAX_OUTS]; 137 int digout_paths[AUTO_CFG_MAX_OUTS];
138 int loopback_paths[HDA_MAX_NUM_INPUTS]; 138 int loopback_paths[HDA_MAX_NUM_INPUTS];
139 int digin_path;
139 140
140 /* auto-mic stuff */ 141 /* auto-mic stuff */
141 int am_num_entries; 142 int am_num_entries;