Jump to content

Orange Pi Zero no audio devices available cannot play audio


Al4d4R

Recommended Posts

Hi all!

 

I have browsing the forum quite while but I did not a solution for my problem. I have bought the OP Zero from DX.com and it came with an expansion board which has two additional USB ports, a 3.5 mm AV socket and a built in microphone. And now I would like to use the audio socket as audio output and I want to use its microphone as well. But I headed some problems and I cannot use its audio features .

 

I am using this kernel: Armbian_5.24_Orangepizero_Ubuntu_xenial_dev_4.9.4

 

I think there is no audio driver installed on this system.

 

here are some other debug info:

 

aplay: device_list:268: no soundcards found...

arecord: device_list:268: no soundcards found...
 
!!All Loaded Modules
!!------------------
 
Module
ccm
evdev
xradio_wlan
mac80211
cfg80211
rfkill
sun8i_ths
cpufreq_dt
uio_pdrv_genirq
thermal_sys
gpio_keys
uio
 
Could you please someone help me how to configure the Orange Pi Zero on board audio?
 
Do I need to install any audio driver? If yes, how?
 
If you need any additional information feel free to ask. 
 
Thank you!
 
 

 

Link to comment
Share on other sites

Kernel 4.8.4. You are using developing kernel for which we don't provide any end user support. It's meant for developers and testing. On the download page, there is a big red sign: Warning: nightly downloads are automated untested builds and no end user support is provided for them!

 

If you want audio and microphone with this kernel and addon, which is not officially supported yet, you need to write a driver. There is nothing like "install a driver".

 

http://linux-sunxi.org/Linux_mainlining_effort / here you can see how far things are developed

 

You will have more success with old kernel 3.4.113 ... but even there you might need to play with board configuration (/boot/script.bin) switches. Microphone or audio might be disabled on this board, since by default it doesn't have audio connector.

Link to comment
Share on other sites

On 4.2.2017 at 3:12 PM, Al4d4R said:

Thank you for your fast response! Unfortunately I have ingnored that red sign... Maybe I will try other kernel if I will be in trouble with the driver.

Thanks again!


I did try a "official" image from http://www.orangepi.org/downloadresources/ :
Raspbian Server - updated: 2017-05-05 
which links to http://www.orangepi.org/downloadresources/orangepizero/2017-05-05/orangepizero_e7c74a532b47c34968b5098.html
Original release date was 2016-11-24 with version 0.8.0 ( Raspbian_server_For_zero_H2+_V0_1 )

Its has (as told to me) a "horrible outdated  kernel(
uname -r : 3.4.39)", but has a working audio-driver for the analog and the (not inclueded) HDMI-Connector:

root@OrangePI:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sndcodec-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0


see also

 

Link to comment
Share on other sites

4 hours ago, guidol said:

but has a working audio-driver for the analog and the (not inclueded) HDMI-Connector:


As all of our images in download section with a label "legacy kernel" which contains kernel 3.4.113 with 100+ fixes on top of horribly outdated 3.4.39, found in stock builds. There is another DEV kernel (currently 4.13), which we are talking about here and that one lacks some basic functions. 

It is possible that certain features are disabled in board config in our image for Opi Zero. If there is no audio connector on board, this feature might be disabled ... but it can be simple enable back.

Link to comment
Share on other sites

1 hour ago, Igor said:


As all of our images in download section with a label "legacy kernel" which contains kernel 3.4.113 with 100+ fixes on top of horribly outdated 3.4.39, found in stock builds. There is another DEV kernel (currently 4.13), which we are talking about here and that one lacks some basic functions. 

It is possible that certain features are disabled in board config in our image for Opi Zero. If there is no audio connector on board, this feature might be disabled ... but it can be simple enable back.

Its fine to read that the kernel 3.4.114 has so much fixes, but with my OPi Zero and the USB/Audio-Expansionboard (plus case) - for me - its getting hotter than the stock kernel 3.4.39.

 

The new kernel from the mainline does not getting so hot like the legacy kernel with fixes.

 

So I will hope & bid for 2 things / possibilities:
1.) include the dynamic cpu-switching like in mainline to the legacy kernel

or

2.) include/enable the audio-feature (like in the stock kernel) to the mainline kernel.

 

I think in future much more people will request this feature (for the mainline kernel) , because on eBay they sell the OPi Zero + USB/Audio-Board + Case as a kit:
http://www.ebay.co.uk/itm/3-in-1-Orange-Pi-Zero-512MB-Development-Board-Expansion-Board-Black-Case-Kit/142329429602

OPi-Zero-Kit.jpg

Link to comment
Share on other sites

12 minutes ago, guidol said:

Its fine to read that the kernel 3.4.114 has so much fixes, but with my OPi Zero and the USB/Audio-Expansionboard (plus case) - for me - its getting hotter than the stock kernel 3.4.39.


Judging by the scientific method and using an external temperature meter? We invested hundreds of hours into optimising those things (check h3consumtion tool for going deeper with this), while board maker hasn't done anything at all. I am wondering how this is possible since so far we could only find people saying it's running cooler with Armbian than with stock image. There are some troubles with Zero rev. 1.4 and in general this board heat dispersion is bad.

 

Mainline kernel is not ready yet but close. There is no way to speed up the process if you rely on few amateurs doing this.

Link to comment
Share on other sites

1 hour ago, Igor said:


Judging by the scientific method and using an external temperature meter? We invested hundreds of hours into optimising those things (check h3consumtion tool for going deeper with this), while board maker hasn't done anything at all. I am wondering how this is possible since so far we could only find people saying it's running cooler with Armbian than with stock image. There are some troubles with Zero rev. 1.4 and in general this board heat dispersion is bad.

 

Mainline kernel is not ready yet but close. There is no way to speed up the process if you rely on few amateurs doing this.

 

Its was a finger-feeling and not a external temperature meter, but I think I found "my problem".

First after yor message I did use the internal temperature meter named

cat /sys/devices/virtual/thermal/thermal_zone0/temp
cat /sys/devices/virtual/thermal/thermal_zone1/temp (not available at Mainline Kernel)

 

So I did try Stock-, Legacy- and Mainline-Kernel:

 

Stock Kernel
Linux OrangePI 3.4.39 #2 SMP PREEMPT Mon Nov 21 16:23:11 CST 2016 armv7l GNU/Linux
idle 66-67 degree Celsius
SanDisk Ultra SDHC 16GB Class 10

 

Legacy Kernel
Linux orangepizero 3.4.113-sun8i #18 SMP PREEMPT Thu Jun 15 02:16:06 CEST 2017 armv7l armv7l armv7l GNU/Linux
idle 62-67 degree Celsius
Kingston SDHC 8GB Class 4

 

Mainline Kernel
Linux orangepizero 4.11.12-sun8i #1 SMP Wed Aug 23 15:21:32 CEST 2017 armv7l armv7l armv7l GNU/Linux
idle 54-58 degree Celsius
SanDisk Ultra SDHC 16GB Class 10

 

As I didnt got a third "SanDisk Ultra SDHC 16GB Class 10" I used a "Kingston SDHC 8GB Class 4" for the Legacy-Kernel.

 

Above we can see that there isnt much difference between Stock and Legacy-Kernel here (in the end 67 degree idle), BUT

I must admit that the OPi Zero is getting hotter around the Class 4 Kingston Card against the Class 10 SanDisk Ultra.

So my finger-feeling could belong to a hotter MicroSD-Cards rather than to the complete system which is measured from the internal temperature-sensor.

I have to check if the Legacy-Kernel would be running cooler if I flash it on the Class 10 Sandisk Ultra.

Do you got informations about different temperatures with different MicroSD Cards?
I did got this as a problem on my mind.

 

===============================================================================================================

Iam very pleased with the work from the armbian-teams - also for the OPi Zero.

I understand to esteem the hard work here while not getting informations from the maker-companys of the boards.

For me you are all very cool doing support for single-board-computers which have lost their manufacturer-support sometimes after an initial release.

 

I know the v1.4 doenst seems the best revision of the board in meaning of heat - but I does come with the kit to me :(

 

If there is the legacy working for me (with a newer MicroSD Card) then there is no problem for me to wait for a great mainline-kernel.
And if there will be audio included I will be very happy.

 

The "few amateurs" be certain to do a great job!

=================================================================================================================

Link to comment
Share on other sites

2 hours ago, Dmitry_ said:

Has the current mainline Armbian 5.36 kernel 4.13.16 no audio drivers too?

 

Both kernels have audio drivers and on both kernels, audio is disabled by default because there is no audio connector.

Link to comment
Share on other sites

3 hours ago, Dmitry_ said:

Has the current mainline Armbian 5.36 kernel 4.13.16 no audio drivers too?

You can enable it by yourself :)
armbian-config -> System -> Hardware: select analog-audio with the space-key

then SAVE and exit armbian-config and reboot

Did work for me :)

analog_audio.jpg

Link to comment
Share on other sites

I've figured out the problem. If I use out-of-the box 5.35 then I have sound. If I run `apt upgrade`  then it updates to 5.36 and the sound does not work there. By the way the `README.sun8i-h3-overlays` file has no words "sound" or "audio" in it. It was not strait forward to figure out that is "audio-codec" is for sound. I've search for this for this words and found nothing. I think you should put them there.

Link to comment
Share on other sites

7 hours ago, Dmitry_ said:

 It was not strait forward to figure out that is "audio-codec" is for sound. I've search for this for this words and found nothing. I think you should put them there.

I have

ARMBIAN 5.37.171221 nightly Ubuntu 16.04.3 LTS 4.14.8-sunxi

Linux orangepizero 4.14.8-sunxi #58 SMP Thu Dec 21 09:27:04 CET 2017 armv7l armv7l armv7l GNU/Linux

 

and audio

root@orangepizero:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

 

you only have to use the command "armbian-config" and use the menu as I did wrote before :)

Link to comment
Share on other sites

Then it might be some other thing I've changed. This is my login screen:

 

Welcome to ARMBIAN 5.36 user-built Ubuntu 16.04.3 LTS 4.13.16-sunxi   
System load:   0.64 0.16 0.05      Up time:       0 min        
Memory usage:  13 % of 240MB      IP:            10.0.1.1
CPU temp:      29°C               
Usage of /:    9% of 15G 

This is my armbianEnv.txt:

verbosity=1
logo=disabled
console=both
disp_mode=1920x1080p60
overlay_prefix=sun8i-h3
overlays=analog-codec i2c0 spi-spidev uart1 uart2 usbhost2 usbhost3
rootdev=UUID=ebe9dacf-124f-486c-b6c1-08749e209374
rootfstype=ext4
param_spidev_spi_bus=1
param_spidev_max_freq=32000000
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

This is my /etc/modules:

g_serial
fbtft_device

fbtft_device is defined in /etc/modprobe.d/fbtft_device.conf

options fbtft_device name=tm022hdh26 buswidth=8 rotate=270 gpios=reset:7,dc:2,led:6 fps=10 busnum=1 width=240 height=320

I have X.org and Qt5 installed and some Python3 libraries. And I also upgraded from 5.35 to 5.36.  I think that's all I've changed, as far as I can remember. I also have a RTL8188CUS wi-fi dongle which worked out of the box on the mainline release. When I run `ls -lah /dev/snd` I get 

total 0
drwxr-xr-x  2 root root       60 Feb 11  2016 .
drwxr-xr-x 13 root root      14K Feb 11  2016 ..
crw-rw----  1 root audio 116, 33 Feb 11  2016 timer

 

Link to comment
Share on other sites

1 hour ago, Dmitry_ said:

Then it might be some other thing I've changed. This is my login screen:

 


Welcome to ARMBIAN 5.36 user-built Ubuntu 16.04.3 LTS 4.13.16-sunxi   

When I run `ls -lah /dev/snd` I get 


total 0
drwxr-xr-x  2 root root       60 Feb 11  2016 .
drwxr-xr-x 13 root root      14K Feb 11  2016 ..
crw-rw----  1 root audio 116, 33 Feb 11  2016 timer

 

You got "ARMBIAN 5.36 user-built"  and I got "ARMBIAN 5.37.171221 nightly"

my "ls -lah /dev/snd"

root@orangepizero:/boot# ls -lah /dev/snd
total 0
drwxr-xr-x  3 root root      140 Dec 26 13:07 .
drwxr-xr-x 13 root root      14K Dec 26 13:07 ..
drwxr-xr-x  2 root root       60 Dec 26 13:07 by-path
crw-rw----  1 root audio 116,  0 Dec 26 13:07 controlC0
crw-rw----  1 root audio 116, 24 Dec 26 13:07 pcmC0D0c
crw-rw----  1 root audio 116, 16 Dec 26 13:07 pcmC0D0p
crw-rw----  1 root audio 116, 33 Dec 26 13:07 timer

there is something missing in your ARMBIAN build :(
Could you try the nightly-version: https://dl.armbian.com/orangepizero/nightly/Armbian_5.34.171121_Orangepizero_Ubuntu_xenial_next_4.13.14.7z
and update it to 5.37 via apt update & upgrade?

 

Your other files doesnt show something special.
I got only 2 usbhosts active (and cir for infrared):
 

overlays=analog-codec cir usbhost2 usbhost3

On my/this Opi Zero does run my InterNetradio via node.js/NodeRed/NodeRed_dashboard/mpg123/mplayer :)
SO sound is working in the nightly :)

Link to comment
Share on other sites

Hi, I have a similar problem on my OPi zero. I have

Welcome to ARMBIAN 5.36 user-built Ubuntu 16.04.3 LTS 4.13.16-sunxi

overlays=analog-codec is set but nothing happens, not the silghtest hint what might go wrong in dmesg.

But when I do

sudo modprobe sun8i-codec-analog
sudo modprobe sun4i-codec

I get

jgeisler@orangepizero:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

and

jgeisler@orangepizero:~$ dmesg|tail
[  142.801380] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok

That looks promising, though I have not yet soldered a jack to the pins to see if the audio actually works. What does that tell me? What is going wrong with the overlay?

Link to comment
Share on other sites

11 hours ago, jgeisler said:

But when I do


sudo modprobe sun8i-codec-analog
sudo modprobe sun4i-codec

I get


jgeisler@orangepizero:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

That looks promising, though I have not yet soldered a jack to the pins to see if the audio actually works. What does that tell me?
What is going wrong with the overlay?

 

Looks like the overlay is OK, but you only did miss a automatic modprobe
(dont know if activating a overlay also enables some modprobe)

 

You could  insert the commands in /etc/rc.local or try to put the 2 modules in /etc/modules?

sun4i_codec
sun8i_codec_analog

 

My demsg is also showing only this one mapping line for the codec, but lsmod shows me for the codec-modules (without manual modprobe):

root@orangepizero:~# lsmod
Module                  Size  Used by
sun4i_codec            32768  3
sun8i_codec_analog     24576  1

 

 

Link to comment
Share on other sites

On 12/26/2017 at 4:36 PM, guidol said:

I have

ARMBIAN 5.37.171221 nightly Ubuntu 16.04.3 LTS 4.14.8-sunxi

Linux orangepizero 4.14.8-sunxi #58 SMP Thu Dec 21 09:27:04 CET 2017 armv7l armv7l armv7l GNU/Linux

 

and audio

root@orangepizero:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

 

you only have to use the command "armbian-config" and use the menu as I did wrote before :)

 

I have Armbian 5.38

I connected pin 8 and 2 (also 7 and 2) in single header of Orange PI Zero.  When I execute the command u mentioned above (aplay -l) I get the same results. BTW Master and PCM channels are not in Alsamixer and there was no file called .asoundrc. So I created a one.

pcm.!default{
    type hw
    card 0
}

ctl.!default{
    type hw
    card 0
}

 

But when I execute speaker-test I get no sound but this.

speaker-test 1.1.3

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 256 to 262144
Period size range from 128 to 32768
Using max buffer size 262144
Periods = 4

I tried to play a music using  aplay song.mp3 but I got,

aplay: set_params:1299: Sample format non available
Available formats:
- S16_LE
- S32_LE

So how can I sort this out? :( 

Thank you :) 

Link to comment
Share on other sites

35 minutes ago, VihangaA said:

 

I have Armbian 5.38

I connected pin 8 and 2 (also 7 and 2) in single header of Orange PI Zero.  When I execute the command u mentioned above (aplay -l) I get the same results. BTW Master and PCM channels are not in Alsamixer and there was no file called .asoundrc. So I created a one.

 

But when I execute speaker-test I get no sound but this.

I tried to play a music using  aplay song.mp3 but I got,

So how can I sort this out? :( 

Thank you :) 

 

M OPi Zero is now at 

ARMBIAN 5.44.180510 nightly Ubuntu 16.04.4 LTS 4.14.40-sunxi

Linux orangepizero 4.14.40-sunxi #155 SMP Sat May 12 11:12:46 CEST 2018 armv7l armv7l armv7l GNU/Linux

 

aplay -l shows

**** List of PLAYBACK Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
 

 

Your .asoundrc should be in your homedirectory  (mostly then edited as ~/.asoundrc ) or you could place the same entrys in /etc/asound.conf

 

I also didnt get a sound from teh speaker-test, but when I do some "espeak 'Hello' 2>/dev/null" (you have to install espeak with a"apt install espeak")

I do hear the voice (the soundsystem is in the first time in "sleep"-mode but you should hear the second try)

 

Pin 2 is GND and Pin 7 is LINEOUT-Right and Pin 8 is LINEOUT-Left

 

You also need an amplified speaker, because the signal is only at Line-Out-Level.

 

for playing a .mp3 install mpg123 (via "apt install mpg123") and then play the .mp3 with

mpg123 song.mp3

 

In my alsamixer the correct ones for the volume are:

"Line Out"  and

"DAC"

 

OPi_Zero_Pinout.JPG

alsamixer.jpg

Link to comment
Share on other sites

22 hours ago, guidol said:

 

M OPi Zero is now at 

ARMBIAN 5.44.180510 nightly Ubuntu 16.04.4 LTS 4.14.40-sunxi

Linux orangepizero 4.14.40-sunxi #155 SMP Sat May 12 11:12:46 CEST 2018 armv7l armv7l armv7l GNU/Linux

 

aplay -l shows

**** List of PLAYBACK Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 []
   Subdevices: 1/1
  Subdevice #0: subdevice #0
 

 

Your .asoundrc should be in your homedirectory  (mostly then edited as ~/.asoundrc ) or you could place the same entrys in /etc/asound.conf

 

I also didnt get a sound from teh speaker-test, but when I do some "espeak 'Hello' 2>/dev/null" (you have to install espeak with a"apt install espeak")

I do hear the voice (the soundsystem is in the first time in "sleep"-mode but you should hear the second try)

 

Pin 2 is GND and Pin 7 is LINEOUT-Right and Pin 8 is LINEOUT-Left

 

You also need an amplified speaker, because the signal is only at Line-Out-Level.

 

for playing a .mp3 install mpg123 (via "apt install mpg123") and then play the .mp3 with

mpg123 song.mp3

 

In my alsamixer the correct ones for the volume are:

"Line Out"  and

"DAC"

Now it works! Thank you very much! :)  :) I had to create asound.conf file. Also connected an amplifier to speaker.

Link to comment
Share on other sites

Hi Everybody. I just bought the OrangePi Zero (v1.5) with extension module. I'm wondering howto have line out and mic working. I have following setup and it doesn't work. 

 

Welcome to ARMBIAN 5.65 stable Debian GNU/Linux 9 (stretch) 4.14.78-sunxi
System load:   0.08 0.02 0.01   Up time:       20:51 hours
Memory usage:  12 % of 493MB    IP:            192.168.1.18
CPU temp:      39°C
Usage of /:    31% of 7.1G
 

Is somebody available to share the most important info to succeed?

Many thanks, Sergio

Edited by SergioAiello
Link to comment
Share on other sites

I just find the clue: from alsamixer GUI 1) <TAB> key to select the proper view and 2) ";" to toggle the mic to "capture". In the past two days I played a lot with alsamixer command but just yesterday got by chance this tricky sequence (also because the FX keys as suggested by alsamixer help do work for me).

(to marine1988) The mic works ... pretty well!

REPLY

 

Link to comment
Share on other sites

I have successfully make the zero play with the extension via 3.5 audio jack :)

 

1. open armbian-config and check into the analogue 

 

analog_audio.jpg.c7cba9a6c2b26dc428e8bb166dc7c73f.jpg

 

2. reboot and check aplay -l shows, it shoud be

aplay -l shows

**** List of PLAYBACK Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

3.  create file .asoundrc in home directory

 

put this in

pcm.!default{
    type hw
    card 0
}

ctl.!default{
    type hw
    card 0
}

4. type alsamixer and make sure that the M and O like this

 

alsamixer.jpg.34be16925ae507290ffb5ea1e5ae33f5.jpg

 

5. speaker-test -twav -c2 -Dhw:0

 

and the sound plays

 

Front Left

Front Right

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