diff options
author | Hui Wang <hui.wang@canonical.com> | 2019-08-14 07:09:08 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-08-14 09:38:23 +0300 |
commit | 871b9066027702e6e6589da0e1edd3b7dede7205 (patch) | |
tree | 8234775a736ee5e4f918bc5dc5e6d9a57d93a529 /sound/pci/hda/patch_conexant.c | |
parent | 401714d9534aad8c24196b32600da683116bbe09 (diff) | |
download | linux-871b9066027702e6e6589da0e1edd3b7dede7205.tar.xz |
ALSA: hda - Add a generic reboot_notify
Make codec enter D3 before rebooting or poweroff can fix the noise
issue on some laptops. And in theory it is harmless for all codecs
to enter D3 before rebooting or poweroff, let us add a generic
reboot_notify, then realtek and conexant drivers can call this
function.
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 93a303676aea..14298ef45b21 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -166,11 +166,7 @@ static void cx_auto_reboot_notify(struct hda_codec *codec) /* 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_codec_set_power_to_all(codec, codec->core.afg, AC_PWRST_D3); - snd_hda_codec_write(codec, codec->core.afg, 0, - AC_VERB_SET_POWER_STATE, AC_PWRST_D3); - msleep(10); + snd_hda_gen_reboot_notify(codec); } static void cx_auto_free(struct hda_codec *codec) |