LMS/Squeezelite on OPi Zero with daughter board - Problems

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: LMS/Squeezelite on OPi Zero with daughter board - Proble

Post by Sciamano »

Code: Select all

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

Code: Select all

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
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: LMS/Squeezelite on OPi Zero with daughter board - Proble

Post by Fourdee »

Sciamano wrote:

Code: Select all

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

Code: Select all

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:

Code: Select all

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:

Code: Select all

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
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: LMS/Squeezelite on OPi Zero with daughter board - Proble

Post by Sciamano »

I can't see any differences:

Code: Select all

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

Code: Select all

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
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: LMS/Squeezelite on OPi Zero with daughter board - Proble

Post by Fourdee »

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:

Code: Select all

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?

Code: Select all

speaker-test -c2
Example of working speaker-test:

Code: Select all

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
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: LMS/Squeezelite on OPi Zero with daughter board - Proble

Post by Sciamano »

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 :( )
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: LMS/Squeezelite on OPi Zero with daughter board - Proble

Post by Fourdee »

Sciamano wrote:I'm baffled (and a bit frustrated :( )
Yep, me and you both. Really bizarre, you *should* hear sound :(
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: LMS/Squeezelite on OPi Zero with daughter board - Proble

Post by Sciamano »

Fourdee wrote:
Sciamano wrote:I'm baffled (and a bit frustrated :( )
Yep, me and you both. Really bizarre, you *should* hear sound :(
That's why I thought the board was faulty. But it works fine with Armbian... :shock:
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: LMS/Squeezelite on OPi Zero with daughter board - Proble

Post by Fourdee »

Sciamano wrote:
That's why I thought the board was faulty. But it works fine with Armbian... :shock:
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?

Code: Select all

uname -a

dpkg -l | grep armbian
For reference, DietPi:

Code: Select all

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

If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: LMS/Squeezelite on OPi Zero with daughter board - Proble

Post by Sciamano »

Fourdee wrote: For reference, DietPi:

Code: Select all

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

Code: Select all

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... :o
Even Mopidy works now. Beats me.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: LMS/Squeezelite on OPi Zero with daughter board - Proble

Post by Sciamano »

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?
Post Reply