Page 1 of 1

NanoPi M4 microphone input

Posted: Thu Nov 08, 2018 1:21 am
by mark03
Can anyone confirm if the analog microphone input is functional on the NanoPi M4? I mean with plain ALSA and the latest kernel from either FriendlyElec, or Armbian, or anything else. Can you go into alsamixer and turn it on and does it actually work? I need to know this before I buy...

Thanks,
Mark

Re: NanoPi M4 microphone input

Posted: Thu Nov 08, 2018 12:28 pm
by NicoD
I don't think any os uses alsamixer.
It should all be pulseaudio instead.

I've tried the 3.5mm plug with a stereo microphone in Armbian Bionic and it didn't work there.
With the Lubuntu's you could have more luck.

I've tried usb audio adapters and these all work.

Re: NanoPi M4 microphone input

Posted: Thu Nov 08, 2018 4:02 pm
by mark03
Thanks NicoD. I watched your video review of the M4 yesterday; it was super helpful!

If mic recording works through pulseaudio, that would be fine; I'm just more familiar with plain ALSA.

Looking at the schematic, there are actually two microphone inputs connected to the codec chip. The 3.5mm plug is a TRRRS (five conductors) which has stereo out as well as mono mic in. I'm not sure if that is a standard "pinout", but even if it is, I would guess that a plug-in mic is unlikely to work unless it is a set of stereo earbuds with a mic in the cord, like a cellphone accessory. From the wiring it looks like it may be compatible with a TRRS (four conductor) plug as well.

There is another microphone input next to the 3.5mm jack, which is just a pair of holes at standard 0.1" spacing, so you have to solder a connector or wire the mic directly to that one.

I can see that all of these are connected to the codec in a reasonable way. I just worry that the supplied drivers may not have been written to configure the codec registers correctly for recording. It's the kind of thing which often gets missed because few people use it.

If you have the basic ALSA utilities on the board, could you dump the output of "arecord -l"? That would tell us if the software believes that it has a microphone input. If it doesn't list any capture devices, the mic definitely won't work; if it lists some, it might work :)

Re: NanoPi M4 microphone input

Posted: Thu Nov 08, 2018 10:44 pm
by NicoD
mark03 wrote:
There is another microphone input next to the 3.5mm jack, which is just a pair of holes at standard 0.1" spacing, so you have to solder a connector or wire the mic directly to that one.


I think they were planning to add a mic there. There's one on the T3+, only works in the FriendlyElec images.

What do you need it for? You could always use a cheap usb microphone like these.
https://www.aliexpress.com/item/Overfly-Super-Mini-USB-2-0-Microphone-Portable-Studio-Speech-Mic-Audio-Adapter-Driver-Free-for/32835259347.html?spm=2114.search0104.3.53.41ab537eHymfZL&ws_ab_test=searchweb0_0,searchweb201602_1_10065_10068_319_317_10696_5728811_10084_453_454_10083_10618_10304_10307_10820_10821_537_10302_536_10843_5733211_328_5733311_10059_10884_5733411_10887_5730011_100031_5731011_321_322_10103_5733611_5733111_5733511,searchweb201603_55,ppcSwitch_0&algo_expid=ff0bbe6e-52a8-4938-956a-843d976667d7-10&algo_pvid=ff0bbe6e-52a8-4938-956a-843d976667d7

I've got many usb audio adapters with audio out + in, they all work on it.
I've also got a presonus usb audiobox to record music. I also use it to record the sound of my video's. Works on all my sbc's without any installation.

I don't have my M4 here right now, when I've got time I'll check that out. PulseAudio does detect there's audio in and audio out on the board. But it's not working in Armbian. Guess not either in Lubuntu then.
Greetings.