aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_generic.c')
-rw-r--r--sound/pci/hda/hda_generic.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 3d2597b7037b..ac0db1679f09 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -844,8 +844,16 @@ static hda_nid_t path_power_update(struct hda_codec *codec,
844 snd_hda_codec_write(codec, nid, 0, 844 snd_hda_codec_write(codec, nid, 0,
845 AC_VERB_SET_POWER_STATE, state); 845 AC_VERB_SET_POWER_STATE, state);
846 changed = nid; 846 changed = nid;
847 /* all known codecs seem to be capable to handl
848 * widgets state even in D3, so far.
849 * if any new codecs need to restore the widget
850 * states after D0 transition, call the function
851 * below.
852 */
853#if 0 /* disabled */
847 if (state == AC_PWRST_D0) 854 if (state == AC_PWRST_D0)
848 snd_hdac_regmap_sync_node(&codec->core, nid); 855 snd_hdac_regmap_sync_node(&codec->core, nid);
856#endif
849 } 857 }
850 } 858 }
851 return changed; 859 return changed;
@@ -3259,7 +3267,8 @@ static int create_input_ctls(struct hda_codec *codec)
3259 val = PIN_IN; 3267 val = PIN_IN;
3260 if (cfg->inputs[i].type == AUTO_PIN_MIC) 3268 if (cfg->inputs[i].type == AUTO_PIN_MIC)
3261 val |= snd_hda_get_default_vref(codec, pin); 3269 val |= snd_hda_get_default_vref(codec, pin);
3262 if (pin != spec->hp_mic_pin) 3270 if (pin != spec->hp_mic_pin &&
3271 !snd_hda_codec_get_pin_target(codec, pin))
3263 set_pin_target(codec, pin, val, false); 3272 set_pin_target(codec, pin, val, false);
3264 3273
3265 if (mixer) { 3274 if (mixer) {
@@ -4917,9 +4926,12 @@ int snd_hda_gen_parse_auto_config(struct hda_codec *codec,
4917 dig_only: 4926 dig_only:
4918 parse_digital(codec); 4927 parse_digital(codec);
4919 4928
4920 if (spec->power_down_unused || codec->power_save_node) 4929 if (spec->power_down_unused || codec->power_save_node) {
4921 if (!codec->power_filter) 4930 if (!codec->power_filter)
4922 codec->power_filter = snd_hda_gen_path_power_filter; 4931 codec->power_filter = snd_hda_gen_path_power_filter;
4932 if (!codec->patch_ops.stream_pm)
4933 codec->patch_ops.stream_pm = snd_hda_gen_stream_pm;
4934 }
4923 4935
4924 if (!spec->no_analog && spec->beep_nid) { 4936 if (!spec->no_analog && spec->beep_nid) {
4925 err = snd_hda_attach_beep_device(codec, spec->beep_nid); 4937 err = snd_hda_attach_beep_device(codec, spec->beep_nid);