ALSA: hda - Add missing initialization of aamix paths
authorTakashi Iwai <tiwai@suse.de>
Tue, 3 Dec 2013 09:51:37 +0000 (10:51 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 16 Dec 2013 09:56:20 +0000 (10:56 +0100)
The loopback mixing paths aren't initialized correctly at init
callback.  Mostly this is harmless as codecs usually set the mute
state as default, but we still should make sure.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

sound/pci/hda/hda_generic.c

index aea8e4d..c5371b2 100644 (file)
@@ -5185,6 +5185,23 @@ static void init_multi_io(struct hda_codec *codec)
        }
 }
 
+static void init_aamix_paths(struct hda_codec *codec)
+{
+       struct hda_gen_spec *spec = codec->spec;
+
+       if (!spec->have_aamix_ctl)
+               return;
+       update_aamix_paths(codec, spec->aamix_mode, spec->out_paths[0],
+                          spec->aamix_out_paths[0],
+                          spec->autocfg.line_out_type);
+       update_aamix_paths(codec, spec->aamix_mode, spec->hp_paths[0],
+                          spec->aamix_out_paths[1],
+                          AUTO_PIN_HP_OUT);
+       update_aamix_paths(codec, spec->aamix_mode, spec->speaker_paths[0],
+                          spec->aamix_out_paths[2],
+                          AUTO_PIN_SPEAKER_OUT);
+}
+
 /* set up input pins and loopback paths */
 static void init_analog_input(struct hda_codec *codec)
 {
@@ -5287,6 +5304,7 @@ int snd_hda_gen_init(struct hda_codec *codec)
        init_multi_out(codec);
        init_extra_out(codec);
        init_multi_io(codec);
+       init_aamix_paths(codec);
        init_analog_input(codec);
        init_input_src(codec);
        init_digital(codec);