Loading sound/pci/hda/patch_via.c +10 −14 Original line number Original line Diff line number Diff line Loading @@ -531,8 +531,7 @@ static void init_output_pin(struct hda_codec *codec, hda_nid_t pin, } } static void via_auto_init_output(struct hda_codec *codec, static void via_auto_init_output(struct hda_codec *codec, struct nid_path *path, int pin_type, struct nid_path *path, int pin_type) bool force) { { unsigned int caps; unsigned int caps; hda_nid_t pin; hda_nid_t pin; Loading @@ -549,7 +548,7 @@ static void via_auto_init_output(struct hda_codec *codec, snd_hda_codec_write(codec, pin, 0, AC_VERB_SET_AMP_GAIN_MUTE, snd_hda_codec_write(codec, pin, 0, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE | val); AMP_OUT_MUTE | val); } } activate_output_path(codec, path, true, force); activate_output_path(codec, path, true, true); /* force on */ } } static void via_auto_init_multi_out(struct hda_codec *codec) static void via_auto_init_multi_out(struct hda_codec *codec) Loading @@ -562,7 +561,7 @@ static void via_auto_init_multi_out(struct hda_codec *codec) path = &spec->out_path[i]; path = &spec->out_path[i]; if (!i && spec->aamix_mode && spec->out_mix_path.depth) if (!i && spec->aamix_mode && spec->out_mix_path.depth) path = &spec->out_mix_path; path = &spec->out_mix_path; via_auto_init_output(codec, path, PIN_OUT, true); via_auto_init_output(codec, path, PIN_OUT); } } } } Loading Loading @@ -592,16 +591,16 @@ static void via_auto_init_hp_out(struct hda_codec *codec) struct via_spec *spec = codec->spec; struct via_spec *spec = codec->spec; if (!spec->hp_path.depth) { if (!spec->hp_path.depth) { via_auto_init_output(codec, &spec->hp_mix_path, PIN_HP, true); via_auto_init_output(codec, &spec->hp_mix_path, PIN_HP); return; return; } } deactivate_hp_paths(codec); deactivate_hp_paths(codec); if (spec->hp_independent_mode) if (spec->hp_independent_mode) via_auto_init_output(codec, &spec->hp_indep_path, PIN_HP, true); via_auto_init_output(codec, &spec->hp_indep_path, PIN_HP); else if (spec->aamix_mode) else if (spec->aamix_mode) via_auto_init_output(codec, &spec->hp_mix_path, PIN_HP, true); via_auto_init_output(codec, &spec->hp_mix_path, PIN_HP); else else via_auto_init_output(codec, &spec->hp_path, PIN_HP, true); via_auto_init_output(codec, &spec->hp_path, PIN_HP); } } static void via_auto_init_speaker_out(struct hda_codec *codec) static void via_auto_init_speaker_out(struct hda_codec *codec) Loading @@ -611,19 +610,16 @@ static void via_auto_init_speaker_out(struct hda_codec *codec) if (!spec->autocfg.speaker_outs) if (!spec->autocfg.speaker_outs) return; return; if (!spec->speaker_path.depth) { if (!spec->speaker_path.depth) { via_auto_init_output(codec, &spec->speaker_mix_path, PIN_OUT, via_auto_init_output(codec, &spec->speaker_mix_path, PIN_OUT); true); return; return; } } if (!spec->aamix_mode) { if (!spec->aamix_mode) { activate_output_path(codec, &spec->speaker_mix_path, activate_output_path(codec, &spec->speaker_mix_path, false, false); false, false); via_auto_init_output(codec, &spec->speaker_path, PIN_OUT, via_auto_init_output(codec, &spec->speaker_path, PIN_OUT); true); } else { } else { activate_output_path(codec, &spec->speaker_path, false, false); activate_output_path(codec, &spec->speaker_path, false, false); via_auto_init_output(codec, &spec->speaker_mix_path, PIN_OUT, via_auto_init_output(codec, &spec->speaker_mix_path, PIN_OUT); true); } } } } Loading Loading
sound/pci/hda/patch_via.c +10 −14 Original line number Original line Diff line number Diff line Loading @@ -531,8 +531,7 @@ static void init_output_pin(struct hda_codec *codec, hda_nid_t pin, } } static void via_auto_init_output(struct hda_codec *codec, static void via_auto_init_output(struct hda_codec *codec, struct nid_path *path, int pin_type, struct nid_path *path, int pin_type) bool force) { { unsigned int caps; unsigned int caps; hda_nid_t pin; hda_nid_t pin; Loading @@ -549,7 +548,7 @@ static void via_auto_init_output(struct hda_codec *codec, snd_hda_codec_write(codec, pin, 0, AC_VERB_SET_AMP_GAIN_MUTE, snd_hda_codec_write(codec, pin, 0, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE | val); AMP_OUT_MUTE | val); } } activate_output_path(codec, path, true, force); activate_output_path(codec, path, true, true); /* force on */ } } static void via_auto_init_multi_out(struct hda_codec *codec) static void via_auto_init_multi_out(struct hda_codec *codec) Loading @@ -562,7 +561,7 @@ static void via_auto_init_multi_out(struct hda_codec *codec) path = &spec->out_path[i]; path = &spec->out_path[i]; if (!i && spec->aamix_mode && spec->out_mix_path.depth) if (!i && spec->aamix_mode && spec->out_mix_path.depth) path = &spec->out_mix_path; path = &spec->out_mix_path; via_auto_init_output(codec, path, PIN_OUT, true); via_auto_init_output(codec, path, PIN_OUT); } } } } Loading Loading @@ -592,16 +591,16 @@ static void via_auto_init_hp_out(struct hda_codec *codec) struct via_spec *spec = codec->spec; struct via_spec *spec = codec->spec; if (!spec->hp_path.depth) { if (!spec->hp_path.depth) { via_auto_init_output(codec, &spec->hp_mix_path, PIN_HP, true); via_auto_init_output(codec, &spec->hp_mix_path, PIN_HP); return; return; } } deactivate_hp_paths(codec); deactivate_hp_paths(codec); if (spec->hp_independent_mode) if (spec->hp_independent_mode) via_auto_init_output(codec, &spec->hp_indep_path, PIN_HP, true); via_auto_init_output(codec, &spec->hp_indep_path, PIN_HP); else if (spec->aamix_mode) else if (spec->aamix_mode) via_auto_init_output(codec, &spec->hp_mix_path, PIN_HP, true); via_auto_init_output(codec, &spec->hp_mix_path, PIN_HP); else else via_auto_init_output(codec, &spec->hp_path, PIN_HP, true); via_auto_init_output(codec, &spec->hp_path, PIN_HP); } } static void via_auto_init_speaker_out(struct hda_codec *codec) static void via_auto_init_speaker_out(struct hda_codec *codec) Loading @@ -611,19 +610,16 @@ static void via_auto_init_speaker_out(struct hda_codec *codec) if (!spec->autocfg.speaker_outs) if (!spec->autocfg.speaker_outs) return; return; if (!spec->speaker_path.depth) { if (!spec->speaker_path.depth) { via_auto_init_output(codec, &spec->speaker_mix_path, PIN_OUT, via_auto_init_output(codec, &spec->speaker_mix_path, PIN_OUT); true); return; return; } } if (!spec->aamix_mode) { if (!spec->aamix_mode) { activate_output_path(codec, &spec->speaker_mix_path, activate_output_path(codec, &spec->speaker_mix_path, false, false); false, false); via_auto_init_output(codec, &spec->speaker_path, PIN_OUT, via_auto_init_output(codec, &spec->speaker_path, PIN_OUT); true); } else { } else { activate_output_path(codec, &spec->speaker_path, false, false); activate_output_path(codec, &spec->speaker_path, false, false); via_auto_init_output(codec, &spec->speaker_mix_path, PIN_OUT, via_auto_init_output(codec, &spec->speaker_mix_path, PIN_OUT); true); } } } } Loading