Contents |
Test have been made with the following USB headset: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter
The headset can't work on a USB hub (you have to activate the following option in the kernel : Cannot submit datapipe for urb 0, error -38 : enable CONFIG_USB_EHCI_SPLIT_ISO to play through a hub). The headset is not a real soundcard, so it can't play all files at all frequencies. The headset will support this mode: frequency: 44100Hz, 2 channels
Here is the configuration {{{~/asoundrc}}} used so that alsa configures it automatically:
ctl.myplugdev {
type hw
card 1
}
pcm.myplugdev {
type plug
slave {
pcm hw:1
rate 44100
channels 2
}
}
Remarks:
You just have to add these lines to the previous configuration
pcm.!default pcm.myplugdev ctl.!default ctl.myplugdev
/!\ Note /!\
The redirection only works for the news programs launched after devices turnout. So restart the application is necessary.
From the Alsa documentation:
Specifying the !default name supercedes the one defined in the ALSA lib api.
The headset is also detected as a USB-HID device (Human Interface Device). It then send these keys:
#define KEY_MUTE 113 #define KEY_VOLUMEDOWN 114 #define KEY_VOLUMEUP 115
These keys are normalized and can be found in the /usr/include/linux/input.h file