How to disable VIM4 on board digital Microphone

@goenjoy
I have a VIM4 and VIM3 device.
But I find this VIM4 have a on board digital Microphone.
But VIM3 not have a on board digital Microphone.
How to disable VIM4 on board digital Microphone ?

@Jack_Wu How to correctly configure audio data transfer from i2s to Android apps? - #7 by goenjoy

@goenjoy
Thanks.
But I check below web. I need to repo source code then moidfy some source code setting.

Could you provide the VIM4 image without digital MIC output in below web address or other
dl.khadas.com - Index of /products/vim4/firmware/android/

@Jack_Wu I can provide you with a library replacement, but from which port do you need MIC input?

@goenjoy
ok. I need disable VIM4 on board digital MIC input.
I will insert USB type of webcam to VIM4. This webcam can input MIC and Camera.

@Jack_Wu I specifically took a USB camera with MIC and verified that there was no problem. It is not necessary to disable the digital MIC. Try to me verify the OK recording APK.
From the LOG, it appears that the MIC path of the USB camera has been correctly opened.

audio_hw_primary: pcm_open: flag = 10000000, card = 1, device = 0

VIM4:/ # cat proc/asound/cards
 0 [AMLAUGESOUND   ]: AML-AUGESOUND - AML-AUGESOUND
                      AML-AUGESOUND
 1 [Webcam         ]: USB-Audio - C505e HD Webcam
                      C505e HD Webcam at usb-xhci-hcd.0.auto-1.2, high speed
VIM4:/ #
VIM4:/ # logcat -c
VIM4:/ # logcat -s audio_hw_primary
--------- beginning of main
--------- beginning of kernel
12-27 09:00:10.735   400   477 I audio_hw_primary: ++[adev_set_audio_port_config:9539] audio_port id:2, role:SINK, type:DEVICE
12-27 09:00:10.735   400   477 I audio_hw_primary: patch found mix->dev patch id:1, sink id:2, patchset:0xe6906040
12-27 09:00:10.735   400   477 I audio_hw_primary:  - set sink device[0x2](outport:SPEAKER): volume_Mb[-550], gain[0.530885]
12-27 09:00:10.735   400   477 I audio_hw_primary:  - now the sink gains are:
12-27 09:00:10.735   400   477 I audio_hw_primary:      - OUTPORT_SPEAKER->gain[0.530885]
12-27 09:00:10.735   400   477 I audio_hw_primary:      - OUTPORT_HDMI_ARC->gain[1.000000]
12-27 09:00:10.735   400   477 I audio_hw_primary:      - OUTPORT_HEADPHONE->gain[1.000000]
12-27 09:00:10.735   400   477 I audio_hw_primary:      - OUTPORT_HDMI->gain[1.000000]
12-27 09:00:10.736   400   477 I audio_hw_primary:      - OUTPORT_ANLG_DOCK_HEADSET->gain[1.000000]
12-27 09:00:10.736   400   477 I audio_hw_primary:      - active outport is: SPEAKER
12-27 09:00:10.738   400  2442 I audio_hw_primary: ++++[usecase_change_validate_l:7666],continuous:0 dev masks:0,out masks:0,out usecase:PCM_NORMAL,aml_out:0xe88c4de0
12-27 09:00:10.739   400  2442 I audio_hw_primary: [usecase_change_validate_l:7712],1 process_buffer_write
12-27 09:00:10.739   400  2442 I audio_hw_primary: ----[usecase_change_validate_l:7741], continuous:0 dev masks:0x1, out masks:0x1, out usecase:PCM_NORMAL
12-27 09:00:10.739   400  2442 I audio_hw_primary: process_buffer_write(), standby to unstandby
12-27 09:00:10.741   400  2442 I audio_hw_primary: hw_write, aml_out 0xe88c4de0 alsa open output_format 0x1
12-27 09:00:10.741   400  2442 I audio_hw_primary:
12-27 09:00:10.741   400  2442 I audio_hw_primary: +aml_alsa_output_open stream 0xe88c4de0,device 0
12-27 09:00:10.742   400  2442 I audio_hw_primary: aml_alsa_output_open pcm 0x0
12-27 09:00:10.742   400  2442 I audio_hw_primary: aml_alsa_output_open, audio open card(0), device(1)
12-27 09:00:10.742   400  2442 I audio_hw_primary: ALSA open configs: channels 8 format 1 period_count 6 period_size 512 rate 48000
12-27 09:00:10.742   400  2442 I audio_hw_primary: ALSA open configs: threshold start 0 stop 0 silence 0 silence_size 0 avail_min 0
12-27 09:00:10.742   400  2442 I audio_hw_primary: pcm_open: flag = 0, card = 0, device = 1
12-27 09:00:10.807   400  2442 I audio_hw_primary: -aml_alsa_output_open, audio out(0xe88c4de0) device(0) refs(1) is_normal_pcm 1, handle 0xe8881a50
12-27 09:00:10.807   400  2442 I audio_hw_primary:
12-27 09:00:10.807   400  2442 I audio_hw_primary: +aml_alsa_output_open, adev->pcm_handle[0] 0xe8881a50
12-27 09:00:10.829   400   477 I audio_hw_primary: pcm_open: flag = 10000000, card = 1, device = 0
12-27 09:00:10.835   400   477 I audio_hw_primary: pcm_open: flag = 10000000, card = 1, device = 0
12-27 09:00:10.836   400   477 I audio_hw_primary: pcm_open: flag = 10000008, card = 1, device = 0
12-27 09:00:10.864   400  5317 I audio_hw_primary: pcm_open: flag = 10000008, card = 1, device = 0
12-27 09:00:10.946   400  2442 I audio_hw_primary: aml_alsa_output_write alsa_running_status[0xe88c4de0] change from 0 to 1
^C

@goenjoy
ok.
Very thanks for your help.

1 Like