diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 11:53:31 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 11:53:31 -0700 |
commit | 0950c358ee8e969fce45ba363ca1deaf211e57b0 (patch) | |
tree | 4c3b66e8457e1568aa26696d268e0e9c264382cb /sound/usb/usbaudio.c | |
parent | 3aa590c6b7c89d844f81c2e96f295cf2c6967773 (diff) | |
parent | 8caf7aa26e0797e5706043f94c491acd1a08636a (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
* master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa:
[ALSA] echoaudio - Remove kfree_nocheck()
[ALSA] echoaudio - Fix Makefile
[ALSA] Add Intel D965 board support
[ALSA] Fix/add support of Realtek ALC883 / ALC888 and ALC861 codecs
[ALSA] Fix a typo in echoaudio/midi.c
[ALSA] snd-aoa: enable dual-edge in GPIOs
[ALSA] snd-aoa: support iMac G5 iSight
[ALSA] snd-aoa: not experimental
[ALSA] Add echoaudio sound drivers
[ALSA] ak4xxx-adda - Code clean-up
[ALSA] Remove CONFIG_EXPERIMENTAL from intel8x0m driver
[ALSA] Stereo controls for M-Audio Revolution cards
[ALSA] Fix misuse of __list_add() in seq_ports.c
[ALSA] hda-codec - Add model entry for Samsung X60 Chane
[ALSA] make CONFIG_SND_DYNAMIC_MINORS non-experimental
[ALSA] Fix wrong dependencies of snd-aoa driver
[ALSA] fix build failure due to snd-aoa
[ALSA] AD1888 mixer controls for DC mode
[ALSA] Suppress irq handler mismatch messages in ALSA ISA drivers
[ALSA] usb-audio support for Turtle Beach Roadie
Diffstat (limited to 'sound/usb/usbaudio.c')
-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 627de9525a3..d32d83d970c 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 */ |