someaguy
Posts: 28
Joined: Thu Dec 10, 2015 4:29 am

Fustrated with getting USB sound.

Sun Dec 20, 2015 2:54 am

Seriously! When I got this Raspberry Pi a month ago to play around with, I had no idea how much of a pain in the ass it would be to get anything to work. I knew it would involve dealing with Linux command lines to get some things to work, but whats the point of entering command lines when the information provided is outdated?

When I got it out of the box, I used whatever version that came with the NOOBS boot loader. I tried to figure out how to get the USB sound card to work with it, after an evening pouring through confusing forms with endless command line inputs, I finally got the USB sound card to work and it worked beautifully with VLC player streaming internet radio stations.

I wanted to get creative with something that involved deleting some files to the point Raspbian would not boot, not a problem, I just went and downloaded the newest version of the OS and start over again.

Turns out that the instructions to get USB sound to work on the newest version of Raspbian: (Jessie) does not work as the files to screw around with in the command line does not exist anymore.

But then I discover in the Menu > Preferences options that there is a panel called: "Audio Devices Settings" and thought: "finally, a simple way to control the audio devices on the Raspberry Pi!" To see my USB sound device listed as the available devices and a button to make the device the default sound device made me feel that my grief is finally over! I made the USB sound device default and rebooted the Raspberry Pi just for good measure and opened up VLC player to play a file. To my disappointment, no sound was coming out! Went back to the Audio Devices Settings to figure out what was going on only to discover the built in sound device was default. Changed it back to the USB sound without reboot only to STILL have no sound.

Seriously, what is the point of this control preference if it does not even work? Why is it so unnecessarily complicated to configure a default sound device on this thing? Why is it that I run Ubuntu in a VM on my laptop without any issue to get sound to come from it? I have seriously ran out of ideas on what to do next.

User avatar
r3d4
Posts: 967
Joined: Sat Jul 30, 2011 8:21 am
Location: ./

Re: Fustrated with getting USB sound.

Sun Dec 20, 2015 8:47 am

Hi i found this topic : Raspbian Jessie and USB Audio device as default

viewtopic.php?f=28&t=124016#p837796
JoTil wrote:Hi all,
....
Just edit/create a file called /etc/asound.conf and insert this:

Code: Select all

pcm.!default {
    type hw
    card <number of your card>
}
ctl.!default {
    type hw
    card <number of your card>
}
This will automatically change to the desired output. In my case <number of your card> is "1" for the USB Soundcard and "0" for the standard audio jack of the Pi.

Jörg
Did you all ready try any of the above ?

raspbian jessy is new

raspbian wheezy is old

So if you want to find how to do something with specific to the new raspbian image , just include the string " raspbian jessy " in you search !

silentq15
Posts: 3
Joined: Sun Dec 20, 2015 6:12 pm

Re: Fustrated with getting USB sound.

Sun Dec 20, 2015 6:20 pm

I have tried what r3d4 has said with the ~/.asoundrc file. I have made the following adjustments for my config my card is called S2 so my file looks like this:

Code: Select all

[email protected]:~ $ more .asoundrc
pcm.!default hw:S2

ctl.!default hw:S2
Making the proper adjustments in nano while it does make speaker-test work and provide sound with the USB sound card it seems to cause other issues to happen which pretty much make the sound card useless. For example going into the ALSA mixer gives me an error:

Code: Select all

[email protected]:~ $ alsamixer 
LSA lib control.c:843:(snd_ctl_open_conf) Invalid type for CTL default definition
cannot open mixer: Invalid argument
In my case the mixer being broken because of this configuration is an issue as I am try to get shairport-sync to work to make my pi an airplay device. The mixer being broken causes an error with shairport-sync:

Code: Select all

[email protected]:~ $ sudo /etc/init.d/shairport-sync status
Failed to find mixer element
I am with the OP here it seems as if the new version of Raspbian has caused a senseless amount of frustration to simply change the default sound card. In my opinion this should just be an option in raspiconfig as it is a very simple and basic function.
Last edited by silentq15 on Sun Dec 20, 2015 6:40 pm, edited 2 times in total.

fruitoftheloom
Posts: 20495
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Fustrated with getting USB sound.

Sun Dec 20, 2015 6:36 pm

If Jessie is an issue than create another SD Card with Raspbian Wheezy

https://www.raspberrypi.org/downloads/raspbian

Though it will need to fully updated after being configured to suit..
Retired disgracefully.....

someaguy
Posts: 28
Joined: Thu Dec 10, 2015 4:29 am

Re: Fustrated with getting USB sound.

Mon Dec 21, 2015 5:56 pm

r3d4 wrote:Hi i found this topic : Raspbian Jessie and USB Audio device as default

viewtopic.php?f=28&t=124016#p837796
JoTil wrote:Hi all,
....
Just edit/create a file called /etc/asound.conf and insert this:

Code: Select all

pcm.!default {
    type hw
    card <number of your card>
}
ctl.!default {
    type hw
    card <number of your card>
}
This will automatically change to the desired output. In my case <number of your card> is "1" for the USB Soundcard and "0" for the standard audio jack of the Pi.

Jörg
Did you all ready try any of the above ?

raspbian jessy is new

raspbian wheezy is old

So if you want to find how to do something with specific to the new raspbian image , just include the string " raspbian jessy " in you search !
This is not a solution. While this sort of works, or at best, a band-aid solution, it does not make it a default device in the: "Audio Devices Settings" nor control it with the system volume controls. Also, This solution stops working when you run a TightVNC server. I am looking for a real solution. May I suggest deleting the driver for the default sound hardware in hopes that it will force it to fall on the USB sound drivers? Will this work? How can I do that?

User avatar
r3d4
Posts: 967
Joined: Sat Jul 30, 2011 8:21 am
Location: ./

Re: Fustrated with getting USB sound.

Tue Dec 22, 2015 3:41 am

someaguy wrote: May I suggest deleting the driver for the default sound hardware in hopes that it will force it to fall on the USB sound drivers? Will this work? How can I do that?
Drivers in linux are called (kernel)modules ..

Code: Select all

# apropos - search the manual page names and descriptions
apropos module kernel | grep -e "^.*mod (" -e "Linux Kernel"

depmod (8) - Generate modules.dep and map files.
insmod (8) - Simple program to insert a module into the Linux Kernel
kmod (8) - Program to manage Linux Kernel modules
lsmod (8) - Show the status of modules in the Linux Kernel
modinfo (8) - Show information about a Linux Kernel module
modprobe (8) - Add and remove modules from the Linux Kernel
rmmod (8) - Simple program to remove a module from the Linux Kernel
Use modprobe OR rmmod OR ..ect to remove a module .

someaguy
Posts: 28
Joined: Thu Dec 10, 2015 4:29 am

Re: Fustrated with getting USB sound.

Tue Dec 22, 2015 6:07 am

Finally!!! I believe I found a solution to this unnecessarily complicated problem that really should be tended to within the next version of Raspbian. According to this page... http://www.instructables.com/id/Disable ... /?ALLSTEPS you can disable the built in sound card driver and the OS will then default to the next available sound card. According to the instructions, this is what you do.

Open terminal

Create a file using vi or any text editor and save in /etc/modprobe.d

Code: Select all

cd /etc/modprobe.d

sudo vi alsa-blacklist.conf
Enter the following line...

Code: Select all

blacklist snd_bcm2835
Save the file

reboot the machine

Code: Select all

sudo reboot<br>
After I rebooted, I went to the preferences > Audio Device Settings and I COULD make the USB sound card as default. Once I did that, VLC works, the web browser works, any app I would assume would work now. Why did this have to be so difficult?

buzzology
Posts: 4
Joined: Mon Nov 20, 2017 2:59 am

Re: Fustrated with getting USB sound.

Thu Oct 25, 2018 11:27 am

This worked for me man, thanks for that!

User avatar
r3d4
Posts: 967
Joined: Sat Jul 30, 2011 8:21 am
Location: ./

Re: Fustrated with getting USB sound.

Tue Oct 30, 2018 11:51 am

someaguy wrote:
Tue Dec 22, 2015 6:07 am
Why did this have to be so difficult?
I think blame can be placed with either The Daemon, the GNU or the Penguin
see also : viewtopic.php?f=62&t=225442&start=25#p1385989 "Nothing ever works" ;)

Return to “Raspbian”