diff options
author | Sam Revitch <sam.revitch@gmail.com> | 2006-06-23 15:10:18 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-06-28 19:30:39 +0200 |
commit | e217e30c359edafce3225d2c4fbbda06ae5a408b (patch) | |
tree | 5707cdeb4849c1e8a10585f826cd0e208677259a /sound/usb | |
parent | Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/... (diff) | |
download | linux-e217e30c359edafce3225d2c4fbbda06ae5a408b.tar.xz linux-e217e30c359edafce3225d2c4fbbda06ae5a408b.zip |
[ALSA] usb-audio support for Turtle Beach Roadie
From: Sam Revitch <sam.revitch@gmail.com>Recently a Turtle Beach Audio Advantage Roadie device ended up in my
possession. It seems to work with the snd-usb-audio driver, but only
using the headphone jack in 2-channel mode. The device has a DIN
connector carrying six more channels that are otherwise silent.
C-Media has freely available documentation for the CM106 chip around
which this device is based, and enabling 8-channel output, or
6-channel output with the headphone jack following the front pair is a
matter of setting one of its registers.
Attached is a patch to try to enable 5.1 output mode at probe time.
It seems to work correctly with my device. There is quite list of
other configurables for this device that might deserve controls.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/usbaudio.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 627de9525a32..d32d83d970cc 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -3096,6 +3096,32 @@ static int snd_usb_audigy2nx_boot_quirk(struct usb_device *dev) } /* + * C-Media CM106/CM106+ have four 16-bit internal registers that are nicely + * documented in the device's data sheet. + */ +static int snd_usb_cm106_write_int_reg(struct usb_device *dev, int reg, u16 value) +{ + u8 buf[4]; + buf[0] = 0x20; + buf[1] = value & 0xff; + buf[2] = (value >> 8) & 0xff; + buf[3] = reg; + return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), USB_REQ_SET_CONFIGURATION, + USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_ENDPOINT, + 0, 0, &buf, 4, 1000); +} + +static int snd_usb_cm106_boot_quirk(struct usb_device *dev) +{ + /* + * Enable line-out driver mode, set headphone source to front + * channels, enable stereo mic. + */ + return snd_usb_cm106_write_int_reg(dev, 2, 0x8004); +} + + +/* * Setup quirks */ #define AUDIOPHILE_SET 0x01 /* if set, parse device_setup */ @@ -3365,6 +3391,12 @@ static void *snd_usb_audio_probe(struct usb_device *dev, goto __err_val; } + /* C-Media CM106 / Turtle Beach Audio Advantage Roadie */ + if (id == USB_ID(0x10f5, 0x0200)) { + if (snd_usb_cm106_boot_quirk(dev) < 0) + goto __err_val; + } + /* * found a config. now register to ALSA */ |