Power & Source of Big Ideas

Analog audio on Nanopi neo air not working

Moderators: chensy, FATechsupport

Hello,

I have a problem with the analog audio on the nanopi neo air board.
I plugged a passive speaker on LR & GND pins (PCB v1.1)

i tried (with no "-D" or with "plughw:1")
speaker-test -t wav -c 2


no sound ...

my aplay -L

root@NanoPi-NEO-Air:/home/pi# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=Pcm5102a
Pcm5102a,
Default Audio Device
dmix:CARD=Pcm5102a,DEV=0
Pcm5102a,
Direct sample mixing device
dsnoop:CARD=Pcm5102a,DEV=0
Pcm5102a,
Direct sample snooping device
hw:CARD=Pcm5102a,DEV=0
Pcm5102a,
Direct hardware device without any conversions
plughw:CARD=Pcm5102a,DEV=0
Pcm5102a,
Hardware device with all software conversions
sysdefault:CARD=sndhdmi
sndhdmi,
Default Audio Device
dmix:CARD=sndhdmi,DEV=0
sndhdmi,
Direct sample mixing device
dsnoop:CARD=sndhdmi,DEV=0
sndhdmi,
Direct sample snooping device
hw:CARD=sndhdmi,DEV=0
sndhdmi,
Direct hardware device without any conversions
plughw:CARD=sndhdmi,DEV=0
sndhdmi,
Hardware device with all software conversions

root@NanoPi-NEO-Air:/home/pi# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Pcm5102a [Pcm5102a], device 0: Playback pcm5102a-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0


Pcm5102a are correctly selected on npi-config
I use the nanopi-neo-air_FriendlyCore-Xenial_3.4.39_20171102 image

Do you have an idea ?
Sorry, this won't help directly, but I'm using successfully analog audio on nanopi neo air (mic and left/right speaker) on yocto distribution built from kernel 4.11.

To be complete/honest, I had to apply this patch to Linux kernel sources https://github.com/friendlyarm/linux/pull/2 for proper audio driver initialization. And finally you can find my complete alsa mixer setup at https://github.com/auto3000/pedalpi-dev ... s.bbappend

Code: Select all

amixer set DAC Playback 59
amixer set 'Line Out' Playback 28
Please ignore my previous message, I'm using the onboard audio codec of the nanopi neo air. You are looking to use the Pcm5102a over a nanopi neo air, I have no experience with this.
Nothing ?

There are no support on friendlyarm products ? :(
shuita wrote:
Nothing ?
There are no support on friendlyarm products ? :(


you could try: aplay -D plughw:0,0 test.wav
[test.wav is your test-sounfile]
plughw:0,0 is card 0 device 0 = card 0: Pcm5102a [Pcm5102a], device 0: Playback pcm5102a-hifi-0 []

or create a /etc/asound.conf
for ALSA

Code: Select all

pcm.!default {
    type hw
    card 0
    device 0
}

ctl.!default {
    type hw
    card 0
}


after that use alsamixer to check the volume

BUT the Pins for LR & GND on the mainboard are not the pcm5102a? the pcm5102a should be an audio hat-board?
I dont know if the LR&GND Pins are using the HDMI-Audio on card 1 device 0?
Hi @guidol

Thanks for your help. Sadly, nothing work.
You probably right with Pcm5102a. So are we sure, audio pin on mainboard are hdmi ?

I tried to set at "1" on asound.conf (correctly set by checking on npi-config). Nothing.

I'm a bit disapointed by friendlyarm products :\
shuita wrote:
I plugged a passive speaker on LR & GND pins (PCB v1.1)
Do you have an idea ?


a PASSIVE Speaker could be much to quiet.... you need an speaker with amplifier.
And with Amplifier and the right asound.conf you also have to raise the volume inside the alsamixer...

Which Audio-Out device is shown in the alsamixer?

LR is loudspeaker right (do you have soldered in the four pins of the audio at the inner row?)

If the OS from FriendlyElec doesnt work - you got armbian a chance:
https://dl.armbian.com/nanopiair/Ubuntu ... default.7z

Attachments

Hello Guidol,

Happy new year!
I finaly tried the armbian and it's working :D
But, yes you're right, the sound is really low

Thanks you so much.
shuita wrote:
Hello Guidol,
Happy new year!
But, yes you're right, the sound is really low
Thanks you so much.

Happy new year also to you :)
You will need a active speaker then the volume will be OK!
You are welcome :)

Who is online

In total there are 6 users online :: 0 registered, 0 hidden and 6 guests (based on users active over the past 5 minutes)
Most users ever online was 2865 on Sun Nov 10, 2019 5:27 am

Users browsing this forum: No registered users and 6 guests