Dear All
arecord (MIC) is not working.
How can I enable MIC?
I'm using iMX6ULL14x14evk board and build SD image using bitbake core-image-sato.
Before bitbake core-image-sato, I added alsa-utils in conf/local.conf as below.
$ vi conf/local.conf
...
CORE_IMAGE_EXTRA_INSTALL += "\
alsa-utils"
After boot completed I checked aplay is working using "aplay my.wav".
But, I coundn't make arecord work.
I tried below command but loop-back sound not played.
root@imx6ull14x14evk:~# arecord -D hw:0,0 -f cd | aplay
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
In my guess MIC is not working. So, I tried another evk( I have two iMX6ULL evk boards). But, same as before, no loop-back.
Below is full build and test snippets.
Please let me know my missing.
[In Ubuntu Development Host PC]
$ repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-4.1-krogoth -m imx-4.1.15-2.0.3.xml
$ repo sync$ MACHINE=imx6ull14x14evk source fsl-setup-release.sh -b build
$ vi conf/local.conf
....
CORE_IMAGE_EXTRA_INSTALL += "alsa-utils"
$ bitbake core-image-sato
[After EVK boot completed]
root@imx6ull14x14evk:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: wm8960audio [wm8960-audio], device 0: HiFi wm8960-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: wm8960audio [wm8960-audio], device 1: HiFi-ASRC-FE (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0root@imx6ull14x14evk:~# arecord -D hw:0,0 -f cd | aplay
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
But, No Loop-Back Sound.
I tried below list aslo
Best Regards
Mannsik
Hello,
Please use section 28.5 (Unit Test) of i.MX Linux® Reference Manual (Rev. 0, 10/2016).
For i.MX 6UL EVK, there are two analog microphones, MAIN MIC and HP MIC.
MAIN MIC is connected to the RINPUT1 and RINPUT2 ports to support differential
microphone. HP MIC is connected to the LINPUT1 and LINPUT3 ports. To enable
the analog microphone, execute the following amixer commands:
• amixer cset name='Left Input Mixer Boost Switch' on
• amixer cset name='Left Boost Mixer LINPUT1 Switch' on
• amixer cset name='Left Boost Mixer LINPUT2 Switch' on
• amixer cset name='Left Boost Mixer LINPUT3 Switch' on
• amixer cset name='Right Input Mixer Boost Switch' on
• amixer cset name='Right Boost Mixer RINPUT1 Switch' on
• amixer cset name='Right Boost Mixer RINPUT2 Switch' on
• amixer cset name='Right Boost Mixer RINPUT3 Switch' off
• amixer cset name='ADC PCM Capture Volume' 220
By default, for HP MIC and MAIN MIC, only one channel has voice when recording
stereo WAV (Left Data = Left ADC; Right Data = Right ADC):
• amixer cset name='ADC Data Output Select' 0
When using HP MIC to support stereo, route the left ADC date to the right ADC
channel (Left Data = Left ADC; Right Data = Left ADC):
• amixer cset name='ADC Data Output Select' 1
When using MAIN MIC to support stereo, route the right ADC date to the left ADC
channel (Left Data = Right ADC; Right Data = Right ADC):
• amixer cset name='ADC Data Output Select' 2
The record feature can be tested by the following command:
• arecord [-Dplughw:0,0] -r 44100 -f S16_LE -c 2 -d 5 record.wav
More usages for aplay/arecord/amixer can be obtained by the following commands:
• aplay --h
• arecord --h
• amixer --h
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi there!
I manage to enable the ON BOARD MIC for i.MX6ULL EVK.
This sequence worked for me (as yuri solution), I post it as shell script:
#!/bin/bash
echo "Enabling on board MIC for i.MX6ULL EVK"
amixer cset name='Left Input Mixer Boost Switch' on
amixer cset name='Left Boost Mixer LINPUT1 Switch' on
amixer cset name='Left Boost Mixer LINPUT2 Switch' on
amixer cset name='Left Boost Mixer LINPUT3 Switch' on
amixer cset name='Right Input Mixer Boost Switch' on
amixer cset name='Right Boost Mixer RINPUT1 Switch' on
amixer cset name='Right Boost Mixer RINPUT2 Switch' on
amixer cset name='Right Boost Mixer RINPUT3 Switch' off
amixer cset name='ADC PCM Capture Volume' 220
amixer cset name='ADC Data Output Select' 0
just test it easily with :
arecord -f cd -d 10 record.wav
aplay record.wav
(I used this forum too many times to not help other people
See ya
Hate to come in the middle of things like this. I'm trying to use a mic on J1401, and not getting any sound. Tried turning off all of [LR]INPUT[123] except LINPUT3. It's been some time since doing this at the a[lsa]mixer level, and suspect that I'm missing something really obvious. How do I get HP_MIC to work?
Please help me, if you get working let me know How to do it.
Still I have no idea of how to get MIC working.
Hi Yuri
Thank you for your response.
But, with your suggestion of using amixer, I couldn't record voice over MIC.
First of all, I'm using iMX6ULL(double L) evk not iMX6UL.
I changed lot's of settings in alsamixer also, but, I couldn't record.
Is there any difference between --ULL and UL?
BR.
Mannsik
Hello,
Looking over the schematic - MIC options are the same for the 6ULL EVK and 6UL EVK.
Please try the demo image for 6ULL EVK.
i.MX 6 / i.MX 7 Series Software and Development Tool|NXP
Regards,
Yuri.