USB speakers with Linux: further problems
Lennart Sorensen
lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Tue Jan 10 14:32:14 UTC 2006
On Tue, Jan 10, 2006 at 07:51:42AM -0500, Dominic Bonfiglio wrote:
> Ok, now I have plugged in my USB speakers, I have entered 'modprobe
> snd-usb-audio' and here is what I get:
>
> *linux:~ # aplay -l*
>
> **** List of PLAYBACK Hardware Devices ****
> card 0: I82801DBICH4 [Intel 82801DB-ICH4], device 0: Intel ICH [Intel
> 82801DB-ICH4]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
> card 0: I82801DBICH4 [Intel 82801DB-ICH4], device 4: Intel ICH - IEC958
> [Intel 82801DB-ICH4 - IEC958]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
> card 1: Speaker [Logitech USB Speaker], device 0: USB Audio [USB Audio]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
So it sees all the right devices.
> *linux:~ # lsmod|grep snd*
>
> snd_usb_audio 75712 0
> snd_usb_lib 16384 1 snd_usb_audio
> snd_rawmidi 24864 1 snd_usb_lib
> snd_hwdep 8992 1 snd_usb_audio
> snd_pcm_oss 59168 0
> snd_mixer_oss 18944 1 snd_pcm_oss
> snd_seq 51984 0
> snd_seq_device 8588 2 snd_rawmidi,snd_seq
> snd_intel8x0 33504 0
> snd_ac97_codec 91004 1 snd_intel8x0
> snd_ac97_bus 2432 1 snd_ac97_codec
> snd_pcm 93064 4 snd_usb_audio,snd_pcm_oss,snd_intel8x0,snd_ac97_codec
> snd_timer 24452 2 snd_seq,snd_pcm
> snd 60420 12
> snd_usb_audio,snd_usb_lib,snd_rawmidi,snd_hwdep,snd_pcm_oss,snd_mixer_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer
> usbcore 112512 6 snd_usb_audio,snd_usb_lib,usbhid,ehci_hcd,uhci_hcd
> soundcore 9184 1 snd
> snd_page_alloc 10632 2 snd_intel8x0,snd_pcm
>
>
>
> *linux:~ # lsmod|grep audio*
> snd_usb_audio 75712 0
> snd_usb_lib 16384 1 snd_usb_audio
> snd_hwdep 8992 1 snd_usb_audio
> snd_pcm 93064 4 snd_usb_audio,snd_pcm_oss,snd_intel8x0,snd_ac97_codec
> snd 60420 12
> snd_usb_audio,snd_usb_lib,snd_rawmidi,snd_hwdep,snd_pcm_oss,snd_mixer_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer
> usbcore 112512 6 snd_usb_audio,snd_usb_lib,usbhid,ehci_hcd,uhci_hcd
>
>
> *linux:~ # cat /proc/asound/cards*
>
> 0 [I82801DBICH4 ]: ICH4 - Intel 82801DB-ICH4
> Intel 82801DB-ICH4 with STAC9750,51 at 0xf0080400, irq 5
> 1 [Speaker ]: USB-Audio - Logitech USB Speaker
> Logitech Logitech USB Speaker at usb-0000:00:1d.0-2, full speed
So it sees both your onboard sound chip, and your usb speakers. Now you
just have to tell applications to use card 1 not card 0 when playing
sound, since of course by default everything uses card 0.
> In addition, both Kmix and Kamix recognize the speakers, and in both
> instances PCM is at full blast. But still the speakers don't play.
>
> A further development. I tried setting the xine engine in amarok to
> alsa, which allows you to set the audio output. I thought I could enter
> 'hw=1' and solve my problem that way. But now, everytime i try to use
> alsa, I get the warning 'amarok was unable to initialize any
> audio-drivers," and amarok promptly crashes. And when I leave the xine
> engine on "auto detect" mode, I get no sound output at all anymore.
> Amarok now only works using the aRts engine, but in that case the sound
> only comes out of the computers built-in speakers.
The simple solution is to do one of these:
-Disable onboard sound in the bios, and hope linux won't find it anyhow.
Then only usb sound is available
-Make the usb driver load before the driver for the onboard sound. That
way the USB speakers are card 0 and hence the default.
-Create a .asoundrc or /etc/asound.conf file containing:
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
That will set the default device to use to be card 1 rather than card 0.
At least for alsa applications. What old OSS applications do, I am not
sure. The first two options would take care of OSS programs too.
Len Sorensen
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list