Linux and the Logitech USB Headset

From JoatWiki
Jump to: navigation, search

Following are the changes to my system that I had to make to get my Logitech USB Headphones to work. It wasn't that difficult once I found out how to do it (involved one guess on my part). The following assumes that you're running ALSA.

Note: this doesn't fix everything (Java sound most notably). However, it does work with anything that uses ALSA directly.

Find your asound.conf. It's either .asound.conf in your home directory (for when you log in) or /etc/asound.conf (for a system wide configuration). Add the following two entries to the end of the file:

pcm.usb-audio {
   type plug
   slave.pcm "hw:1"
}

ctl.usb-audio {
   type hw
   card 1
}

For info, the above "card 1" setting for "ctl.usb-audio" and "hw:1" setting for "slave.pcm" are based on the following info:

[root@desk ~]# cat /proc/asound/cards
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfe028000 irq 16
 1 [Headset        ]: USB-Audio - Logitech USB Headset
                      Logitech Logitech USB Headset at usb-0000:00:0b.0-6, full speed

The above will make the headset controllable. However, most software won't use it by default. To fix this, find the entry (higher up in the asound.conf file) that looks like:

pcm.default {
   type plug
   slave.pcm "dmixer"
}

Change it so that it looks like:

pcm.default {
   type plug
   slave.pcm "usb-audio"
}

Restart alsa. Your audio programs should play into your headphones now. You probably lost audio to your speakers though. This isn't an issue for me as I don't use speakers on my computer. If need be, you can probably learn how to combine outputs here.

If all else fails, try

 mplayer -ao alsa:device=hw=1 http://127.0.0.1:9000/stream.mp3

Sources:

<comments>Linux_and_the_Logitech_USB_Headset</comments>

Personal tools