diff options
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index d111258c6f45..0515137a75b0 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -177,30 +177,37 @@ static int cx_auto_init(struct hda_codec *codec) return 0; } -static void cx_auto_reboot_notify(struct hda_codec *codec) +static void cx_auto_shutdown(struct hda_codec *codec) { struct conexant_spec *spec = codec->spec; /* Turn the problematic codec into D3 to avoid spurious noises from the internal speaker during (and after) reboot */ cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, false); - snd_hda_gen_reboot_notify(codec); } static void cx_auto_free(struct hda_codec *codec) { - cx_auto_reboot_notify(codec); + cx_auto_shutdown(codec); snd_hda_gen_free(codec); } +#ifdef CONFIG_PM +static int cx_auto_suspend(struct hda_codec *codec) +{ + cx_auto_shutdown(codec); + return 0; +} +#endif + static const struct hda_codec_ops cx_auto_patch_ops = { .build_controls = snd_hda_gen_build_controls, .build_pcms = snd_hda_gen_build_pcms, .init = cx_auto_init, - .reboot_notify = cx_auto_reboot_notify, .free = cx_auto_free, .unsol_event = snd_hda_jack_unsol_event, #ifdef CONFIG_PM + .suspend = cx_auto_suspend, .check_power_status = snd_hda_gen_check_power_status, #endif }; |