Hello.
I'm trying DietPi on my Raspberry Pi 2 model B, in order to use it as a Squeezebox/Squeezelite machine.
I have a USB soundcard on the Pi, to enhance audio output, but I can't seem to make it work: in the dietpi-config audio configuration it is not recognized.
Therefore squeezelite is not sending anything to the correct output (I guess it's sending audio to the 3,5mm jack).
In alsamixer the USB card works (I can select it and change volume) but I can't find a way to make squeezelite use it.
Any help?
Thanks!!
Enabling USB card on Raspberry Pi
Re: Enabling USB card on Raspberry Pi
Hi,Sciamano wrote:Hello.
I'm trying DietPi on my Raspberry Pi 2 model B, in order to use it as a Squeezebox/Squeezelite machine.
I have a USB soundcard on the Pi, to enhance audio output, but I can't seem to make it work: in the dietpi-config audio configuration it is not recognized.
Therefore squeezelite is not sending anything to the correct output (I guess it's sending audio to the 3,5mm jack).
In alsamixer the USB card works (I can select it and change volume) but I can't find a way to make squeezelite use it.
Any help?
Thanks!!
We will need to manually set the soundcard via /etc/asound.conf, so it becomes default.
Please can you paste the results from the following commands, this will help us find the card we need to set:
Code: Select all
aplay -l
aplay -L
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.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: Enabling USB card on Raspberry Pi
Thanks for the reply.
I think I solved using a different approach.
I edited /etc/default/squeezelite and I added the following line:
Output to the USB soundcard now works.
Was this an improper solution?
Anyway here are the ouputs you requested:
Thanks for your help.
I think I solved using a different approach.
I edited /etc/default/squeezelite and I added the following line:
Code: Select all
SL_SOUNDCARD="front:CARD=Set,DEV=0"
Was this an improper solution?
Anyway here are the ouputs you requested:
Code: Select all
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
Code: Select all
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=ALSA
bcm2835 ALSA, bcm2835 ALSA
Default Audio Device
sysdefault:CARD=ALSA
bcm2835 ALSA, bcm2835 ALSA
Default Audio Device
dmix:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Direct sample mixing device
dmix:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Direct sample snooping device
hw:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Hardware device with all software conversions
default:CARD=Set
C-Media USB Headphone Set, USB Audio
Default Audio Device
sysdefault:CARD=Set
C-Media USB Headphone Set, USB Audio
Default Audio Device
front:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
Front speakers
surround21:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
Direct sample mixing device
dsnoop:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
Direct sample snooping device
hw:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
Direct hardware device without any conversions
plughw:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
Hardware device with all software conversions
Re: Enabling USB card on Raspberry Pi
Theres no such thing as a right or wrong way to do things in Linux. Always do whats best for youWas this an improper solution?

A different method would be to set the USB card as default soundcard:
From your results we can see the USB card is card 1: Set [C-Media USB Headphone Set], device 0:.
So /etc/asound.conf would be:
Code: Select all
pcm.!default {
type hw
card 1
device 0
}
ctl.!default {
type hw
card 1
device 0
}
Code: Select all
speaker-test -c2
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.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: Enabling USB card on Raspberry Pi
Creating the asound.cfg file as instucted is not working... I can't hear anything.
My solution is working though, so it's not a big problem, although I would like to solve it anyway.
I'm also encountering another strange problem in LMS: even though I've selected certain browse modes, I only actually see different ones in the LMS browsing window (specifically I don't see the "Artists" view) and when connecting to the server using the android app Squeezer, I see the Artists choice, but it shows songwriters/composers rather than the actual band/singer...
See images:



This did not happen on my older LMS installation on Raspbian, and I can't understand why it's behaving like this.
Again, thanks a lot for your help.

My solution is working though, so it's not a big problem, although I would like to solve it anyway.
I'm also encountering another strange problem in LMS: even though I've selected certain browse modes, I only actually see different ones in the LMS browsing window (specifically I don't see the "Artists" view) and when connecting to the server using the android app Squeezer, I see the Artists choice, but it shows songwriters/composers rather than the actual band/singer...
See images:



This did not happen on my older LMS installation on Raspbian, and I can't understand why it's behaving like this.
Again, thanks a lot for your help.
Re: Enabling USB card on Raspberry Pi
Strange, no sound with the speaker-test -c2?Sciamano wrote:Creating the asound.cfg file as instucted is not working... I can't hear anything.![]()
My solution is working though, so it's not a big problem, although I would like to solve it anyway.
Try launching alsamixer and see if it picks up the card, should show you some controls:
Code: Select all
alsamixer
Might be a bug in LMS, we install LMS version 7.9 in DietPi. Can you remember which version you installed on Raspbian?I'm also encountering another strange problem in LMS: even though I've selected certain browse modes, I only actually see different ones in the LMS browsing window (specifically I don't see the "Artists" view) and when connecting to the server using the android app Squeezer, I see the Artists choice, but it shows songwriters/composers rather than the actual band/singer...
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.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: Enabling USB card on Raspberry Pi
Complete silence... :shock:Fourdee wrote:Strange, no sound with the speaker-test -c2?Sciamano wrote:Creating the asound.cfg file as instucted is not working... I can't hear anything.![]()
My solution is working though, so it's not a big problem, although I would like to solve it anyway.
I'll do it tomorrow, and report back. Sorry but I had to remove the DietPi card for today, in order to make syncthing work because I need it up and running right now.Try launching alsamixer and see if it picks up the card, should show you some controls:Code: Select all
alsamixer
It was version 7.8Might be a bug in LMS, we install LMS version 7.9 in DietPi. Can you remember which version you installed on Raspbian?I'm also encountering another strange problem in LMS: even though I've selected certain browse modes, I only actually see different ones in the LMS browsing window (specifically I don't see the "Artists" view) and when connecting to the server using the android app Squeezer, I see the Artists choice, but it shows songwriters/composers rather than the actual band/singer...
Re: Enabling USB card on Raspberry Pi
Ok, it looks like reflashing the image on a new SD card also solved the problem with the USB soundcard, which now works.
I really would like to solve the problem with the Artists view in LMS, too...
Is there any easy way to install LMS v7.8 on DietPi, in order to check whether this problem is related to v7.9?
EDIT: I have also tried disabling the "Additional Browse Modes" plugin, which I had disabled in v7.8, but it did not solve.
I really would like to solve the problem with the Artists view in LMS, too...
Is there any easy way to install LMS v7.8 on DietPi, in order to check whether this problem is related to v7.9?
EDIT: I have also tried disabling the "Additional Browse Modes" plugin, which I had disabled in v7.8, but it did not solve.
Re: Enabling USB card on Raspberry Pi
Yep, so you can remove the DietPi 7.9 (you may lose all configuration/settings for LMS)Sciamano wrote:Ok, it looks like reflashing the image on a new SD card also solved the problem with the USB soundcard, which now works.
I really would like to solve the problem with the Artists view in LMS, too...
Is there any easy way to install LMS v7.8 on DietPi, in order to check whether this problem is related to v7.9?
EDIT: I have also tried disabling the "Additional Browse Modes" plugin, which I had disabled in v7.8, but it did not solve.
Code: Select all
dietpi-software uninstall 35
Code: Select all
wget http://downloads.slimdevices.com/LogitechMediaServer_v7.8.0/logitechmediaserver_7.8.0_all.deb -O package.deb
dpkg -i package.deb
Code: Select all
#Remove service
update-rc.d logitechmediaserver remove
rm /etc/init.d/logitechmediaserver
#DietPi-Services init
cp /DietPi/dietpi/conf/squeezeboxserver.service /etc/dietpi/dietpi-software/services/squeezeboxserver.service
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.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: Enabling USB card on Raspberry Pi
Great information, thanks.
I'll try and report back ASAP.
I'm quite convinced that the problem lies with LMS v7.9 since all the apps that remotely control the squeeze players encounter the same bug (composers shown instead of singers/bands).
It would be nice if other DietPi/LMS users gave their feedback about this, as I find it hard to believe that I am the only one encountering this problem.
I'll try and report back ASAP.
I'm quite convinced that the problem lies with LMS v7.9 since all the apps that remotely control the squeeze players encounter the same bug (composers shown instead of singers/bands).
It would be nice if other DietPi/LMS users gave their feedback about this, as I find it hard to believe that I am the only one encountering this problem.