diff options
author | Christian A. Ehrhardt <lk@c--e.de> | 2021-12-31 14:44:32 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2022-01-04 17:05:50 +0100 |
commit | 57f234248ff925d88caedf4019ec84e6ecb83909 (patch) | |
tree | 38ede6ea01367d735713640c441647d9dd0e9f20 /sound/pci/hda/patch_cs8409.c | |
parent | 8cd07657177006b67cc1610e4466cc75ad781c05 (diff) |
ALSA: hda/cs8409: Fix Jack detection after resume
The suspend code unconditionally sets ->hp_jack_in and ->mic_jack_in
to zero but without reporting this status change to the HDA core.
To compensate for this, always assume a status change on the
first unsol event after boot or resume.
Fixes: 424e531b47f8 ("ALSA: hda/cs8409: Ensure Type Detection is only run on startup when necessary")
Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
Link: https://lore.kernel.org/r/20211231134432.atwmuzeceqiklcoa@cae.in-ulm.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_cs8409.c')
-rw-r--r-- | sound/pci/hda/patch_cs8409.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_cs8409.c b/sound/pci/hda/patch_cs8409.c index 07eab788b145..9319ca879d01 100644 --- a/sound/pci/hda/patch_cs8409.c +++ b/sound/pci/hda/patch_cs8409.c @@ -636,7 +636,9 @@ static void cs42l42_run_jack_detect(struct sub_codec *cs42l42) static int cs42l42_handle_tip_sense(struct sub_codec *cs42l42, unsigned int reg_ts_status) { - int status_changed = 0; + int status_changed = cs42l42->force_status_change; + + cs42l42->force_status_change = 0; /* TIP_SENSE INSERT/REMOVE */ switch (reg_ts_status) { @@ -786,6 +788,7 @@ static void cs42l42_suspend(struct sub_codec *cs42l42) cs42l42->last_page = 0; cs42l42->hp_jack_in = 0; cs42l42->mic_jack_in = 0; + cs42l42->force_status_change = 1; /* Put CS42L42 into Reset */ gpio_data = snd_hda_codec_read(codec, CS8409_PIN_AFG, 0, AC_VERB_GET_GPIO_DATA, 0); |