Power & Source of Big Ideas

Recording Audio on NanoPi A64?

Moderators: chensy, FATechsupport

Hi,

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

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 42 on 15 Jul 2016, 01:04

Users browsing this forum: No registered users and 1 guest