fix mic detection for only mic insertion
This commit is contained in:
@@ -2442,7 +2442,7 @@ void mute_handler(chanend c_mic_det)
|
|||||||
|
|
||||||
// 如果开机时全拔出,发送mute
|
// 如果开机时全拔出,发送mute
|
||||||
|
|
||||||
if (((det_val & 0b1110) == 0b1110) || ((det_val & 0b1110) == 0b1010) || ((det_val & 0b1110) == 0b0010)) {
|
if (((det_val & 0b1110) == 0b1110) || ((det_val & 0b1110) == 0b1010) || ((det_val & 0b1110) == 0b0010) || ((det_val & 0b1110) == 0b1000)) {
|
||||||
// 有mic插入,恢复mic音量状态
|
// 有mic插入,恢复mic音量状态
|
||||||
c_mic_det <: (unsigned)MIC_DET_UNMUTE;
|
c_mic_det <: (unsigned)MIC_DET_UNMUTE;
|
||||||
debug_printf("mic stable -> unmute\n");
|
debug_printf("mic stable -> unmute\n");
|
||||||
@@ -2512,7 +2512,7 @@ void mute_handler(chanend c_mic_det)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (((det_val & 0b1110) == 0b1110) || ((det_val & 0b1110) == 0b1010) || ((det_val & 0b1110) == 0b0010)) {
|
if (((det_val & 0b1110) == 0b1110) || ((det_val & 0b1110) == 0b1010) || ((det_val & 0b1110) == 0b0010) || ((det_val & 0b1110) == 0b1000)) {
|
||||||
// 有mic插入,恢复mic音量状态
|
// 有mic插入,恢复mic音量状态
|
||||||
c_mic_det <: (unsigned)MIC_DET_UNMUTE;
|
c_mic_det <: (unsigned)MIC_DET_UNMUTE;
|
||||||
debug_printf("mic stable -> unmute\n");
|
debug_printf("mic stable -> unmute\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user