mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
sound: fixed microphone detect crash error
PD#161229: sound: fixed microphone detect crash error Change-Id: If84c694275c68761a0844bcb3dcae797f2b9a4fd Signed-off-by: Peipeng Zhao <peipeng.zhao@amlogic.com>
This commit is contained in:
committed by
Jianxin Pan
parent
f4b2f0c279
commit
c81b97049f
@@ -237,15 +237,15 @@ static void jack_work_func(struct work_struct *work)
|
||||
card_data->mic_detect_flag = flag;
|
||||
|
||||
if (flag) {
|
||||
extcon_set_state_sync(audio_extcon_headphone,
|
||||
extcon_set_state_sync(audio_extcon_microphone,
|
||||
EXTCON_JACK_MICROPHONE, 1);
|
||||
snd_soc_jack_report(&card_data->hp_jack.jack,
|
||||
status, SND_JACK_HEADPHONE);
|
||||
snd_soc_jack_report(&card_data->mic_jack.jack,
|
||||
status, SND_JACK_MICROPHONE);
|
||||
} else {
|
||||
extcon_set_state_sync(audio_extcon_headphone,
|
||||
extcon_set_state_sync(audio_extcon_microphone,
|
||||
EXTCON_JACK_MICROPHONE, 0);
|
||||
snd_soc_jack_report(&card_data->hp_jack.jack, 0,
|
||||
SND_JACK_HEADPHONE);
|
||||
snd_soc_jack_report(&card_data->mic_jack.jack,
|
||||
0, SND_JACK_MICROPHONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user