Power & Source of Big Ideas

Recording Audio on NanoPi A64?

Moderators: chensy, FATechsupport


Has anyone been able to record audio from the microphone input in 3.5" jack? If so, how?

I have tried

arecord -f cd -d 5 test.wav

This command records total silence so that the wav files is all zeros apart from the wav-header. This defaults to device hw:0,0. Other subdevices hw:0,1 hw:0,2 hw:0,3 give this error :

arecord -D hw:0,1 -f S16 test.wav
arecord: pcm_read:2031: read error: Invalid argument

There are 113 controls in "amixer contents", but I have tried to switch all of them "on". I tried both in Ubuntu Mate and Ubuntu Core, official images for the NanoPi A64. I have tried on two different NanoPi A64s so that this is unlikely hardware fault.

According to this schematic, the microphone input should be there :
http://wiki.friendlyarm.com/wiki/images ... ematic.pdf

arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC codec-aif1-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: audiocodec [audiocodec], device 1: bb Voice codec-aif2-1 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: audiocodec [audiocodec], device 2: bb-bt-clk codec-aif2-2 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: audiocodec [audiocodec], device 3: bt Voice codec-aif3-3 []
Subdevices: 1/1
Subdevice #0: subdevice #0
Found an answer to this by myself. In the alsamixer I needed to umute (press m, so that the symbol on the input becomes OO) all AIF1 AD0.....through AIF1 AD1. Then MIC2 SRC needs to be MIC2 for 3.5mm jack mic input.

I tested quite many mixer settings, I believe this made the difference. Then just

arecord -f cd -d 5 test.wav
Nice to hear it should work, but I think there are some steps missing because I can't reproduce this. It still records dead air unless I also enable "RADC input Mixer MIC2 boost" and any other playback setting that even mentioned MIC2, along with setting proper levels for anything called mic or line in, but that just ends up recording static.

The earbuds I'm using play audio just fine, so it's just recording that doesn't seem to work out of the box.

Did you use a proper microphone or a pair of earbuds/headphones with a mic built in?
Hi guys,

I am trying to record audio now but with no success . Any suggestions would be really appreciated.

(already tried the above suggestions)


Who is online

In total there are 0 users online :: 0 registered, 0 hidden and 0 guests (based on users active over the past 5 minutes)
Most users ever online was 102 on Mon Oct 08, 2018 12:42 pm

Users browsing this forum: No registered users and 0 guests