aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorMathieu Bouffard <mbouffard@strangequarks.org>2011-05-18 11:09:17 -0400
committerTakashi Iwai <tiwai@suse.de>2011-05-18 11:09:17 -0400
commit7cdd8d73139ec935a8e91806131a5b91e26c653e (patch)
tree29eef1488bb07908476eccab82b63f322780fea7 /sound/usb
parentc91d9cda558fc348205fa972c8b864f8579ef258 (diff)
ALSA: usb-audio - Add support for USB X-Fi S51 Pro
USB X-Fi S51 Pro volume and mute from the volume knob on the unit. Compiled and tested with 2.6.39-rc7-git12 Signed-off-by: Mathieu Bouffard <mbouffard@strangequarks.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/mixer_quirks.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 73dcc8256bc0..9146cffa6ede 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -61,6 +61,7 @@ static const struct rc_config {
61 { USB_ID(0x041e, 0x3020), 2, 1, 6, 6, 18, 0x0013 }, /* Audigy 2 NX */ 61 { USB_ID(0x041e, 0x3020), 2, 1, 6, 6, 18, 0x0013 }, /* Audigy 2 NX */
62 { USB_ID(0x041e, 0x3040), 2, 2, 6, 6, 2, 0x6e91 }, /* Live! 24-bit */ 62 { USB_ID(0x041e, 0x3040), 2, 2, 6, 6, 2, 0x6e91 }, /* Live! 24-bit */
63 { USB_ID(0x041e, 0x3042), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 */ 63 { USB_ID(0x041e, 0x3042), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 */
64 { USB_ID(0x041e, 0x30df), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 Pro */
64 { USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */ 65 { USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */
65}; 66};
66 67
@@ -188,6 +189,12 @@ static int snd_audigy2nx_led_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
188 usb_sndctrlpipe(mixer->chip->dev, 0), 0x24, 189 usb_sndctrlpipe(mixer->chip->dev, 0), 0x24,
189 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER, 190 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
190 !value, 0, NULL, 0, 100); 191 !value, 0, NULL, 0, 100);
192 /* USB X-Fi S51 Pro */
193 if (mixer->chip->usb_id == USB_ID(0x041e, 0x30df))
194 err = snd_usb_ctl_msg(mixer->chip->dev,
195 usb_sndctrlpipe(mixer->chip->dev, 0), 0x24,
196 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
197 !value, 0, NULL, 0, 100);
191 else 198 else
192 err = snd_usb_ctl_msg(mixer->chip->dev, 199 err = snd_usb_ctl_msg(mixer->chip->dev,
193 usb_sndctrlpipe(mixer->chip->dev, 0), 0x24, 200 usb_sndctrlpipe(mixer->chip->dev, 0), 0x24,
@@ -234,9 +241,13 @@ static int snd_audigy2nx_controls_create(struct usb_mixer_interface *mixer)
234 /* USB X-Fi S51 doesn't have a CMSS LED */ 241 /* USB X-Fi S51 doesn't have a CMSS LED */
235 if ((mixer->chip->usb_id == USB_ID(0x041e, 0x3042)) && i == 0) 242 if ((mixer->chip->usb_id == USB_ID(0x041e, 0x3042)) && i == 0)
236 continue; 243 continue;
244 /* USB X-Fi S51 Pro doesn't have one either */
245 if ((mixer->chip->usb_id == USB_ID(0x041e, 0x30df)) && i == 0)
246 continue;
237 if (i > 1 && /* Live24ext has 2 LEDs only */ 247 if (i > 1 && /* Live24ext has 2 LEDs only */
238 (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || 248 (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) ||
239 mixer->chip->usb_id == USB_ID(0x041e, 0x3042) || 249 mixer->chip->usb_id == USB_ID(0x041e, 0x3042) ||
250 mixer->chip->usb_id == USB_ID(0x041e, 0x30df) ||
240 mixer->chip->usb_id == USB_ID(0x041e, 0x3048))) 251 mixer->chip->usb_id == USB_ID(0x041e, 0x3048)))
241 break; 252 break;
242 err = snd_ctl_add(mixer->chip->card, 253 err = snd_ctl_add(mixer->chip->card,
@@ -512,6 +523,7 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
512 case USB_ID(0x041e, 0x3020): 523 case USB_ID(0x041e, 0x3020):
513 case USB_ID(0x041e, 0x3040): 524 case USB_ID(0x041e, 0x3040):
514 case USB_ID(0x041e, 0x3042): 525 case USB_ID(0x041e, 0x3042):
526 case USB_ID(0x041e, 0x30df):
515 case USB_ID(0x041e, 0x3048): 527 case USB_ID(0x041e, 0x3048):
516 err = snd_audigy2nx_controls_create(mixer); 528 err = snd_audigy2nx_controls_create(mixer);
517 if (err < 0) 529 if (err < 0)