joe2act
Posts: 40
Joined: Tue Jul 24, 2012 4:21 am

Unstable USB speaker

Wed Aug 15, 2012 11:12 pm

Hi,

When I plug a Logitech USB speaker in R-Pi, I found it does not work in most time. The following is dmesg log. The log message shows that Raspbian recognizes USB speaker, and it creates the 2nd alsa sound card. Then it disconnects speaker right away. At the same time, smsc95xx link is up, down, up again.

This USB speaker in R-Pi works a few times. When USB speaker works, I can play mp3 music . The lsusb command lists this USB speaker correctly. However, it does not work in most time. When it does not work, the lsusb also does not list this usb speaker. The USB speaker is unstable in R-Pi.

R-Pi is powered from a laptop's USB port. I use Raspbian Wheezy. I use mplayer to play mp3.

Thanks.

P.S. dmesg log when I pluged Logitech USB speaker:

Code: Select all

[   19.322080] ### snd_bcm2835_alsa_probe c05d07a0 ############### PROBING FOR bcm2835 ALSA device (0):(1) ###############
[   19.348868] Creating card...
[   19.354416] Creating device/chip ..
[   19.360870] Adding controls ..
[   19.366428] Registering card ....
[   19.381171] bcm2835 ALSA CARD CREATED!
[   19.393305] ### BCM2835 ALSA driver init OK ###
[   26.399777] smsc95xx 1-1.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xC1E1
[   30.362221] Adding 102396k swap on /var/swap.  Priority:-1 extents:1 across:102396k SS
[   82.034144] smsc95xx 1-1.1:1.0: eth0: link down
[ 3400.803580] smsc95xx 1-1.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xC1E1
[ 2038.042093] usb 1-1.2: new full speed USB device number 4 using dwc_otg
[ 2038.147926] usb 1-1.2: New USB device found, idVendor=046d, idProduct=0a04
[ 2038.147961] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2038.148000] usb 1-1.2: Product: Logitech USB Speaker
[ 2038.148019] usb 1-1.2: Manufacturer: Logitech
[ 2038.160442] input: Logitech Logitech USB Speaker as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.2/input/input0
[ 2038.160577] generic-usb 0003:046D:0A04.0001: input: USB HID v1.00 Device [Logitech Logitech USB Speaker] on usb-bcm2708_usb-1.2/input2
[ 2038.321486] usb 1-1.2: USB disconnect, device number 4
[ 2038.428334] usbcore: registered new interface driver snd-usb-audio

JeremyF
Posts: 515
Joined: Wed Jan 25, 2012 9:06 pm
Contact: Website

Re: Unstable USB speaker

Wed Aug 15, 2012 11:28 pm

It's not really recommended to power from a computer's USB port as generally you're only receiving 500ma of current. (in theory anyway)

However, the real problem, probably, is that the voltage is either too low once it reaches the USB ports or the speaker needs more than ~140ma of current to function. A powered USB hub fixes both possible issues.
{sig} Setup: Original version Raspberry Pi (B, rev1, 256MB), Dell 2001FP monitor (1600x1200), 8GB Class 4 SD Card with Raspbian and XBMC, DD-WRT wireless bridge

itimpi
Posts: 1090
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: Unstable USB speaker

Thu Aug 16, 2012 12:05 am

If the USB speaker is plugged directly into the Pi then it will almost certainly be getting insufficient power. The speaker needs to either be independently powered or connected via a powered hub.

joe2act
Posts: 40
Joined: Tue Jul 24, 2012 4:21 am

Re: Unstable USB speaker

Thu Aug 16, 2012 2:34 am

JeremyF wrote:It's not really recommended to power from a computer's USB port as generally you're only receiving 500ma of current. (in theory anyway)

However, the real problem, probably, is that the voltage is either too low once it reaches the USB ports or the speaker needs more than ~140ma of current to function. A powered USB hub fixes both possible issues.
Thank you.

joe2act
Posts: 40
Joined: Tue Jul 24, 2012 4:21 am

Re: Unstable USB speaker

Thu Aug 16, 2012 2:35 am

itimpi wrote:If the USB speaker is plugged directly into the Pi then it will almost certainly be getting insufficient power. The speaker needs to either be independently powered or connected via a powered hub.
Thank you.

joe2act
Posts: 40
Joined: Tue Jul 24, 2012 4:21 am

Re: Unstable USB speaker

Thu Aug 16, 2012 5:41 pm

This unstable USB speaker problem is solved after Raspbian is updated (Linux raspberrypi 3.1.9+ #272). It was a software problem in the first Raspbian Wheezy(kernel 3.1.9+ #168). It is not a power problem. See log:

dmesg log:

Code: Select all

[24434.575755] usb 1-1.2: new full speed USB device number 5 using dwc_otg
[24434.681573] usb 1-1.2: New USB device found, idVendor=046d, idProduct=0a04
[24434.681607] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[24434.681636] usb 1-1.2: Product: Logitech USB Speaker
[24434.681654] usb 1-1.2: Manufacturer: Logitech
[24434.701437] input: Logitech Logitech USB Speaker as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.2/input/input1
[24434.701979] generic-usb 0003:046D:0A04.0002: input: USB HID v1.00 Device [Logitech Logitech USB Speaker] on usb-bcm2708_usb-1.2/input2

Code: Select all

pi@raspberrypi ~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
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
...
card 1: Speaker [Logitech USB Speaker], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Return to “Troubleshooting”