Jump to content

How to get audio out on NanoPis (and possibly other H3 boards)


multivac61

Recommended Posts

I am having troubles with getting audio from the sunxi audiocodec on my NanoPi NEO.

 

I enabled audio in the .fex file and the configuration is as follows:

[audio0]
audio_used = 1
lineout_vol = 31
cap_vol = 5
audio_hp_ldo = "none"
adcagc_used = 0
adcdrc_used = 0
dacdrc_used = 0
adchpf_used = 0
dachpf_used = 0
audio_pa_ctrl = port:PA16<1><default><default><0>

When I ssh into the machine the codec does come up

root@nanopineo:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sndcodec-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

but no sound is heard over the lineout. What can I do to help and fix this?

 

p.s. dmesg doesn't show any signs of error related to this issue:

root@nanopineo:~# dmesg | grep snd
[    1.538130] asoc: sndcodec <-> sunxi-codec mapping ok
[    1.548425] asoc: sndhdmi <-> sunxi-hdmiaudio.0 mapping ok
[    1.571136]   #1: sndhdmi
[   10.083262] usbcore: registered new interface driver snd-usb-audio
root@nanopineo:~# dmesg | grep audio
[    1.548425] asoc: sndhdmi <-> sunxi-hdmiaudio.0 mapping ok
[    1.571129]   #0: audiocodec
[   10.083262] usbcore: registered new interface driver snd-usb-audio

Link to comment
Share on other sites

Hi All.

 

Like Newbie above, I still can't get sound out from post #112.

 

When I use the Friendly Arm Ubuntu, it works fine.

 

I would really like to run Armbian.

 

I think without the audio working Armbian is not a viable solution for the Neo.

 

Is there a roadmap to get it working?

 

JB

Link to comment
Share on other sites

I've rebooted my board 20+ times and haven't seen it hang... So, how often are we talking?

 

I had it twice today, my first NEO/512 got stuck in u-boot so I thought let's make the next round of tests with the other NEO/512 without heatsink. Same story, stuck at u-boot -- no autoboot (serial console attached by I didn't use it at that time). Then I connected USB-UART adapter to my MacBook, did 5 reboots, a few poweroff --> cut power --> cold boot cycles... everything worked as expected (in Armbian's u-boot even USB is disabled for sun8i to improve booting times and prevent this sort of show-stoppers).

 

Just to be sure: You're using the image for the M1 with adopted fex file, true? Since I'm using Igor's new NEO image (which uses u-boot 2016.07 while M1 image is still using 2016.05 if no upgrades happened)

 

I think without the audio working Armbian is not a viable solution for the Neo.

 

Wasn't it you who confirmed that after the fex change audio works on NEO (post #85 in this thread?). Regarding audio: no priorities, no roadmap, just a really bad feeling mentioning this feature. C'mon: the NEO's 'audio capabilities' need a soldering iron. Should we deal constantly with complaints like 'Armbian does provide no sound' when it's just about soldering cables wrong or something like that? Armbian on NEO comes without audio support and people who do need analog audio should better choose devices that feature the appropriate connector (OPi PC, NanoPi M1 to name the cheaper ones).

 

If it works for someone -- fine. If we can solve the problem also fine (I pointed to a kernel patch in FA's github repo but have no idea why they did it -- see the links above).

 

Since it works for you when using FA's OS image the best place to ask would be their forum -- maybe they tell us why they did the change and what we should do to support audio on the NEO (if it's easy we will do for sure, but also do not advertise this feature officially)

Link to comment
Share on other sites

Please check post #2 here. Sorry, can't help more since I refrain from touching audio on Linux.

 

No luck there either. There is also no analog sound on the Armbian build for the NanoPi M1. I am definitely not the only one that needs sound for that module.

 

Is analog sound working on the OrangePi plus? Could somebody confirm that? What is the main difference between the configs of these builds?

 

It is very important to me to get sound working on these modules. What can I do to help?

Link to comment
Share on other sites

No luck there either. There is also no analog sound on the Armbian build for the NanoPi M1. I am definitely not the only one that needs sound for that module.

 

Is analog sound working on the OrangePi plus? Could somebody confirm that? What is the main difference between the configs of these builds?

 

It is very important to me to get sound working on these modules. What can I do to help?

Are you sure nothing is actually coming out? Have you used a multimeter to check?

Link to comment
Share on other sites

There is also no analog sound on the Armbian build for the NanoPi M1. [...] What can I do to help?

 

Please read through the two threads below and this whole thread. Several people complain that audio's not working while others say it does and some say it's dependant on OS images/settings just to claim the opposite later:

So we have a TRRS connector on M1 (possible hardware issue when used with wrong plug) and we have misleading information all the time (the same person who confirmed audio works after fex file adjustments says later that nothing is working).

 

So by using FA's OS image and ruling out hardware issues you could at least help getting an idea what's going on.

Link to comment
Share on other sites

Hi tkaiser.

 

Sorry I did not reply earlier, I have been very sick with stomach bug.

 

I did say that it was working - but I replied too early. What happened is that the device re-appeared in the command aplay -l, so I thought it worked. But when I connected amplified speakers to the board, there is no sound. I should have waited until I fully tested it.

 

Also FYI, I have an M1 and no sound there too!

 

I can confirm that sound works on both boards with the FA image.

 

I know you are very busy, so please accept my apologies for misleading you about this issue being fixed.

JB

Link to comment
Share on other sites

Please read through the two threads below and this whole thread. Several people complain that audio's not working while others say it does and some say it's dependant on OS images/settings just to claim the opposite later:

So we have a TRRS connector on M1 (possible hardware issue when used with wrong plug) and we have misleading information all the time (the same person who confirmed audio works after fex file adjustments says later that nothing is working).

 

So by using FA's OS image and ruling out hardware issues you could at least help getting an idea what's going on.

This is not a hardware bug because the sound works like a charm with the images FA distributes. That has led me to believe that the bug does in fact reside within Armbian so I opened a bug report on Github - https://github.com/igorpecovnik/lib/issues/438

Link to comment
Share on other sites

Hi!

 

Can confirm the audio out; it's definitely not an hardware issue, with my current setup I get audio out using the FA Ubuntu image, but when switched to Armbian no audio out and alsamixer only recognise the snhdmi card but no analog audio.

 

Cheers,

Link to comment
Share on other sites

Let's move the various audio related posts away from NanoPi NEO thread.

 

According to the opened and above referenced github issue it should help to edit /etc/asound.conf that it looks like this:

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

Please confirm/discuss audio issues here.

 

Edit: /var/lib/alsa/asound.state seems to need also modifications, please check aforementioned github issue and Zador's commit from yesterday.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines