Posts: 7
Joined: Mon Mar 27, 2017 10:00 am

USB Sound card freeze the usb devices

Mon Mar 27, 2017 10:24 am

Hello, I have a raspberry pi 3 that I use to control a magic mirror ( ) and I try to use a usb sound card with no luck so far (it work once after many try and never work again).

The card is detected in lsusb and i set the defaults.ctl.card and defaults.pcm.card as 1 in the /usr/share/alsa/alsa.conf
I also adited the ~/.asoundrc to

Code: Select all

pcm.!default {
        type hw
        card 1

ctl.!default {
        type hw
        card 1
I even made my sound usb sound card as default by using the graphical application pimixer.

But no sound came out of the device.
The odd thing is that if I boot with both the card and a optical mouse plug on the raspberry, both devices are detected but none of them is working.
But if I only boot with the computer mouse pluged in, the mouse work just fine.
I try with two different mouse pluged in the same time and both of them seem to work.

But when the sound card is pluged in, no other device are working. Which make me think that the sound card somehow block something when the raspberry is booting.
I also tryed to plug the sound card after the booting is complete but no sound as well

To be sure the sound card wasn't defective I tryed it both on windows and kubuntu and it worked both time.

I should add that when the the "freeze" is there, If à use alsamixer I can't do anything other than Ctrl+c (and it take some time to respond.) Like if the device was busy doing who knows what and that I couldn't use it because of this

Any idea why that's happening ? and how to make my sound card work ? I need that sound card to be able to use both a speaker and a mic.

The freeze occur only if the USB sound card is pluged in while the raspberry is booting. If I wait until the raspberry as finish booting before pluging the card, the freeze doesn't occur and I I can hear noise from the speaker-test -c -D plughw:1,0 command.
But I don't know how to change which sound card is used without rebooting and it's not a good solution anyway because I can't redo the manipulation every time I want to use a mic and speaker

Posts: 7
Joined: Mon Mar 27, 2017 10:00 am

Re: USB Sound card freeze the usb devices

Tue Mar 28, 2017 12:05 pm

Ok, I test it more and If I unplug the hdmi screen, the sound card is working.
So I have two guess on the issue here
1) There is some sort of conflict between hdmi and the sound card at startup
2) there is not enough power for that much devices (hdmi screen + usb soudcard + computer mouse) at start up which cause a crash somehow in the usb control.

I find the second solution unlikely because the hdmi screen as it's own source of power.
so... I guessing it's a conflict ? Anybody knows what can cause such a conflict ?

Posts: 8
Joined: Wed Mar 22, 2017 11:49 pm

Re: USB Sound card freeze the usb devices

Fri May 05, 2017 11:19 am

My RPi is full of USB devices, and after a fresh re-build I currently experienced the same issue you have noted. The issue was not specific to the sound card, but manifested itself much more pronounced [i.e. no sound] than the other USB devices which were used for 1. probe requests 2. making a hotspot and 3. batman-adv interface.

Root Cause: Typically occurs if avahi-daemon is running.
Symptoms: Typically the sound card will fail and any USB keyboard will be slow to react. Then the RPi freezes.
Troubleshooting: To verify, check /var/log/syslog for the line “avahi-daemon: Withdrawing workstation service for eth0”. Eth0 is on the USB bus, thus eth0 can cause many issues when plugging/unplugging [e.g. batman-adv has this issue to tip-toe around when using an Ethernet connection on a server node, which requires an entirely different script to deal with]. In our case, I suspect ahahi-daemon senses a change that it cannot handle “easily”, so it starts looking for solutions. In trying solutions, avahi totally screws up all the USB ports which causes voltage fluctuations, and the RPi eventually freezes. To verify it has worked, search “USB disconnect” in /var/log/syslog after the daemon has been removed with the following commands.

Code: Select all

sudo apt-get remove avahi-daemon -y #removing helps solve network issues on BATMAN server node
sudo rm -r /var/run/avahi-daemon
sudo apt-get purge avahi-daemon -y
Further Reading: Details on Avahi in case you're not sure if you want it or not: ... mon.8.html

Return to “Troubleshooting”