+ snd_assert(mix, return);
+
+ if (tumbler_detect_headphone(chip)) {
+ /* mute speaker */
+ check_mute(chip, &mix->hp_mute, 0, mix->auto_mute_notify,
+ chip->master_sw_ctl);
+ if (mix->anded_reset)
+ big_mdelay(10);
+ check_mute(chip, &mix->amp_mute, 1, mix->auto_mute_notify,
+ chip->speaker_sw_ctl);
+ mix->drc_enable = 0;
+ } else {
+ /* unmute speaker */
+ check_mute(chip, &mix->amp_mute, 0, mix->auto_mute_notify,
+ chip->speaker_sw_ctl);
+ if (mix->anded_reset)
+ big_mdelay(10);
+ check_mute(chip, &mix->hp_mute, 1, mix->auto_mute_notify,
+ chip->master_sw_ctl);
+ mix->drc_enable = 1;
+ }
+ if (mix->auto_mute_notify) {
+ snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE,
+ &chip->hp_detect_ctl->id);
+ snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE,
+ &chip->drc_sw_ctl->id);
+ }