LMS/Squeezelite on OPi Zero with daughter board - Problems

Hello,
I’ve just received the official expansion board for the OPi Zero, so I immediately tried it with the LMS/squeezelite combo.
There are a few problems:

  1. installation errors out with an error 100, but it will not specify which package caused it. apt-get -f install won’t solve. After apt-get update and another try at installation it seemed to have worked
  2. I can’t seem to be able to make the lineout of the expansion board work. What should I change in dietpi in order to have squeezelite output to the expansion board’s lineout?

Thanks

Hi,

  1. installation errors out with an error 100, but it will not specify which package caused it. apt-get -f install won’t solve. After apt-get update and another try at installation it seemed to have worked
  2. I can’t seem to be able to make the lineout of the expansion board work. What should I change in dietpi in order to have squeezelite output to the expansion board’s lineout?

Had to order a replacement board due to failure :frowning:, i need to update this image anyway, so i’ll run some tests to find out whats needed for this:
https://github.com/Fourdee/DietPi/issues/778#issue-210238066

That’s unfortunate. Did the board just suddenly die?
Maybe it’s just my fault, with me unable to set the board up correctly, but I don’t think it should be any different than setting up the OPi PC’s sound card.

Yep, completely dead, even on serial/uart, nothing.

OPi lacks build quality if i’am honest. In all the time of doing DietPi, my OPi PC HDMI out is dead, OPi Zero board is completely dead. Every other board, fine :open_mouth:

I’ll get the image made tomorrow and run some tests, could be an issue our end, so no worries :slight_smile:

I have the impression that behind Xunlong Shenzen etc. etc. there is only one person. :smiley:
I have two OPi PC’s and one Zero. So far so good, but the good part is that they are very inexpensive.

I’ll get the image made tomorrow and run some tests, could be an issue our end, so no worries > :slight_smile:

I’m curious to understand what’s wrong but take your time. There’s no hurry. :slight_smile:

Yep, cheap as chips, give RPi a run for their money lol :wink:

Ok new image is live:
INVALID LINK REMOVED

I’ve tested sound through expansion board, works fine:

apt-get install alsa-utils
speaker-test -c2

or

dietpi-config > audio options > soundcard > default

In regards to the apt errors you received, unable to replicate, however, was this a specific software title in dietpi-software, and, which?

Great, I will try it on monday (I have left the Zero at work…) and let you know.

Error 100 was given immediately after the zero had downloaded the deb for LMS.
I had previously selected both LMS and squeezelite for installation.
After the error, nothing got installed. I then gave apt-get update and after that the installation completed without errors.

Tried with the new image, leaving everything default except by choosing “default 3,5mm Analogue” in config → Audio.
speaker-test will produce no audio at all.

I guess I have a faulty expansion board. :frowning:

EDIT: No I have not… I’ve tried with Armbian, and I can get audio from the board.
What’s wrong with my DietPi configuration, then?

Strange,

Ok, new install of OPi Zero:

apt-get install alsa-utils
speaker-test -c2

Sound works on expansion board.

Install of LMS/Squeezelite:

dietpi-software install 35 36

Test playback via LMS, working fine.

Cant seem to replicate the issue, works fine for me.

Whats the output of:

aplay -l
cat /etc/asound.conf

Shouldn’t make a difference, but which Zero interface board version do you have? Mine is v1.1

That’s exactly what I have done. Not working.
Did the same with Armbian: working. :open_mouth:

Whats the output of:

aplay -l
cat /etc/asound.conf

>
> Shouldn't make a difference, but which > Zero interface board version > do you have? Mine is v1.1

I will check ASAP and let you know.
root@OPiZero:~# 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



root@OPiZero:~# cat /etc/asound.conf 
pcm.!default {
    type hw
    card 0
    device 0
}
ctl.!default {
    type hw
    card 0
}

I have rev. 1.1. of the board. too

Bizzare,

Maybe the mixer settings are out, lets compare:

root@DietPi:~# amixer contents

numid=6,iface=MIXER,name='Lineout volume control'
  ; type=INTEGER,access=rw------,values=1,min=0,max=31,step=0
  : values=31
numid=7,iface=MIXER,name='ADC input gain ctrl'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=3
numid=10,iface=MIXER,name='Audio adda drc'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=11,iface=MIXER,name='Audio adda loop'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=8,iface=MIXER,name='Audio linein in'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=9,iface=MIXER,name='Audio lineout'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=3,iface=MIXER,name='LINEIN_G boost stage output mixer control'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=3
numid=4,iface=MIXER,name='MIC1 boost AMP gain control'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=4
numid=1,iface=MIXER,name='MIC1_G boost stage output mixer control'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=3
numid=5,iface=MIXER,name='MIC2 boost AMP gain control'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=4
numid=2,iface=MIXER,name='MIC2_G boost stage output mixer control'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=3
numid=12,iface=MIXER,name='audio capture mode'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'main mic'
  ; Item #1 'mic1_2'
  ; Item #2 'linein'
  : values=0

And HDMI codec:

root@DietPi:~# amixer contents -c 1
numid=1,iface=MIXER,name='hdmi audio format Function'
  ; type=ENUMERATED,access=rw------,values=1,items=14
  ; Item #0 'null'
  ; Item #1 'pcm'
  ; Item #2 'AC3'
  ; Item #3 'MPEG1'
  ; Item #4 'MP3'
  ; Item #5 'MPEG2'
  ; Item #6 'AAC'
  ; Item #7 'DTS'
  ; Item #8 'ATRAC'
  ; Item #9 'ONE_BIT_AUDIO'
  ; Item #10 'DOLBY_DIGITAL_PLUS'
  ; Item #11 'DTS_HD'
  ; Item #12 'MAT'
  ; Item #13 'WMAPRO'
  : values=1

I can’t see any differences:

root@OPiZero:~# amixer contents
numid=6,iface=MIXER,name='Lineout volume control'
  ; type=INTEGER,access=rw------,values=1,min=0,max=31,step=0
  : values=31
numid=7,iface=MIXER,name='ADC input gain ctrl'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=7
numid=10,iface=MIXER,name='Audio adda drc'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=11,iface=MIXER,name='Audio adda loop'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=8,iface=MIXER,name='Audio linein in'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=9,iface=MIXER,name='Audio lineout'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=3,iface=MIXER,name='LINEIN_G boost stage output mixer control'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=3
numid=4,iface=MIXER,name='MIC1 boost AMP gain control'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=4
numid=1,iface=MIXER,name='MIC1_G boost stage output mixer control'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=3
numid=5,iface=MIXER,name='MIC2 boost AMP gain control'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=4
numid=2,iface=MIXER,name='MIC2_G boost stage output mixer control'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=3
numid=12,iface=MIXER,name='audio capture mode'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'main mic'
  ; Item #1 'mic1_2'
  ; Item #2 'linein'
  : values=0



root@OPiZero:~# amixer contents -c 1
numid=1,iface=MIXER,name='hdmi audio format Function'
  ; type=ENUMERATED,access=rw------,values=1,items=14
  ; Item #0 'null'
  ; Item #1 'pcm'
  ; Item #2 'AC3'
  ; Item #3 'MPEG1'
  ; Item #4 'MP3'
  ; Item #5 'MPEG2'
  ; Item #6 'AAC'
  ; Item #7 'DTS'
  ; Item #8 'ATRAC'
  ; Item #9 'ONE_BIT_AUDIO'
  ; Item #10 'DOLBY_DIGITAL_PLUS'
  ; Item #11 'DTS_HD'
  ; Item #12 'MAT'
  ; Item #13 'WMAPRO'
  : values=1

Thanks,

Diff check, mine is on left:
https://www.diffchecker.com/8cfweq7M

HDMI:
https://www.diffchecker.com/HOiSSv9M

I cant see this having any effect on sound (as its input), but lets match with:

amixer sset 'ADC input gain ctrl' 3

When you run the following, do you recieve any errors, or, does it seem to be playing channels ok?

speaker-test -c2

Example of working speaker-test:

root@DietPi:~# speaker-test -c2

speaker-test 1.0.28

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 128 to 262144
Period size range from 64 to 32768
Using max buffer size 262144
Periods = 4
was set period_size = 32768
was set buffer_size = 262144
 0 - Front Left
 1 - Front Right
Time per period = 5.560045
 0 - Front Left

speaker-test gives the same output as yours, but there is no sound from the speakers (I have also tried using headphones, but still no sound).
Everything looks OK, only nothing can be actually heard.

I’ll match your alsa configuration tomorrow (I’m not at the office now) although I can’t imagine that little difference being the culprit.
I’m baffled (and a bit frustrated :frowning: )

Yep, me and you both. Really bizarre, you should hear sound :frowning:

That’s why I thought the board was faulty. But it works fine with Armbian… :open_mouth:

Mmmmm.

Could possibly be related to kernel/armbian version, although ours should be the same, built image on 10/03/17. On the ARMbian image which version?

uname -a

dpkg -l | grep armbian

For reference, DietPi:

root@DietPi:~# uname -a
Linux DietPi 3.4.113-sun8i #2 SMP PREEMPT Fri Mar 10 18:24:50 GMT 2017 armv7l GNU/Linux

root@DietPi:~# dpkg -l | grep armbian
ii  armbian-firmware                  5.27                         armhf        Linux firmware
ii  armbian-tools-jessie              5.27                         armhf        Armbian tools, temper, Cubie bt utils
ii  sunxi-tools                       1.4.2-1~armbian5.25+1        armhf        tools for working with Allwinner (sunxi) ARM processors



root@orangepizero:~# uname -a
Linux orangepizero 3.4.113-sun8i #10 SMP PREEMPT Thu Feb 23 19:55:00 CET 2017 armv7l GNU/Linux

root@orangepizero:~# dpkg -l | grep armbian
ii  armbian-firmware                     5.25                              armhf        Linux firmware
ii  armbian-tools-jessie                 5.25                              armhf        Armbian tools, temper, Cubie bt utils
ii  hostapd                              1:2.5~armbian5.25+1               armhf        IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
ii  sunxi-tools                          1.4.2-1~armbian5.25+1             armhf        tools for working with Allwinner (sunxi) ARM processors

The armbian-firmware looks older on armbian, actually. And there’s also that #2/#10 difference in ‘uname -a’…

BTW: I’ve tried installing a USB sound card, and the speaker-test works, and also squeezelite plays normally…
I can’t seem to get sound from Mopidy, but maybe it’s my fault, as I have no idea how it should work (I thought that connecting to the web interface and selecting a song to be played would make sound come out from the zero, but it stays completely silent).
I’d like to make Mopidy work, as I’ve found out it’s probably the only platform that will allow me to connect to my Deezer account.

EDIT: this is ridiculous… I went to alsamixer, and noticed that there were some options set to “MM” (mute). I’ve tried unmuting them, and now I get sound from the daughterboard. The extremely funny thing it that I’ve tried muting all the same options again, and sound keeps coming even with those muted. So I really don’t know what the hell happened, but now it seems to work… :open_mouth:
Even Mopidy works now. Beats me.

I have no idea if this might have been the problem, but still… These were the muted items:

Audio adda Audio adda Audio linei Audio lineo

Could you please check if those are muted on your installation, too?