diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-11-03 03:17:18 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-11-03 03:17:18 -0400 |
commit | e6d06e085bb5e7769c91bd14eb46094034fff8e6 (patch) | |
tree | 850563d3b490c281ad776be01db2f49111da1c65 /sound/usb | |
parent | c8ddb2713c624f432fa5fe3c7ecffcdda46ea0d4 (diff) | |
parent | 87232dd49aeb6b7d1af291edca8bd129a82ef4b5 (diff) |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/mixer_quirks.c | 15 | ||||
-rw-r--r-- | sound/usb/pcm.c | 4 |
2 files changed, 16 insertions, 3 deletions
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index 7dae05d8783e..782f741cd00a 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c | |||
@@ -60,7 +60,7 @@ static const struct rc_config { | |||
60 | { USB_ID(0x041e, 0x3000), 0, 1, 2, 1, 18, 0x0013 }, /* Extigy */ | 60 | { USB_ID(0x041e, 0x3000), 0, 1, 2, 1, 18, 0x0013 }, /* Extigy */ |
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 */ | 63 | { USB_ID(0x041e, 0x3042), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 */ |
64 | { USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */ | 64 | { USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */ |
65 | }; | 65 | }; |
66 | 66 | ||
@@ -183,7 +183,13 @@ static int snd_audigy2nx_led_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e | |||
183 | if (value > 1) | 183 | if (value > 1) |
184 | return -EINVAL; | 184 | return -EINVAL; |
185 | changed = value != mixer->audigy2nx_leds[index]; | 185 | changed = value != mixer->audigy2nx_leds[index]; |
186 | err = snd_usb_ctl_msg(mixer->chip->dev, | 186 | if (mixer->chip->usb_id == USB_ID(0x041e, 0x3042)) |
187 | err = snd_usb_ctl_msg(mixer->chip->dev, | ||
188 | usb_sndctrlpipe(mixer->chip->dev, 0), 0x24, | ||
189 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER, | ||
190 | !value, 0, NULL, 0, 100); | ||
191 | else | ||
192 | err = snd_usb_ctl_msg(mixer->chip->dev, | ||
187 | usb_sndctrlpipe(mixer->chip->dev, 0), 0x24, | 193 | usb_sndctrlpipe(mixer->chip->dev, 0), 0x24, |
188 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER, | 194 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER, |
189 | value, index + 2, NULL, 0, 100); | 195 | value, index + 2, NULL, 0, 100); |
@@ -225,8 +231,12 @@ static int snd_audigy2nx_controls_create(struct usb_mixer_interface *mixer) | |||
225 | int i, err; | 231 | int i, err; |
226 | 232 | ||
227 | for (i = 0; i < ARRAY_SIZE(snd_audigy2nx_controls); ++i) { | 233 | for (i = 0; i < ARRAY_SIZE(snd_audigy2nx_controls); ++i) { |
234 | /* USB X-Fi S51 doesn't have a CMSS LED */ | ||
235 | if ((mixer->chip->usb_id == USB_ID(0x041e, 0x3042)) && i == 0) | ||
236 | continue; | ||
228 | if (i > 1 && /* Live24ext has 2 LEDs only */ | 237 | if (i > 1 && /* Live24ext has 2 LEDs only */ |
229 | (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || | 238 | (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || |
239 | mixer->chip->usb_id == USB_ID(0x041e, 0x3042) || | ||
230 | mixer->chip->usb_id == USB_ID(0x041e, 0x3048))) | 240 | mixer->chip->usb_id == USB_ID(0x041e, 0x3048))) |
231 | break; | 241 | break; |
232 | err = snd_ctl_add(mixer->chip->card, | 242 | err = snd_ctl_add(mixer->chip->card, |
@@ -365,6 +375,7 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer) | |||
365 | 375 | ||
366 | if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020) || | 376 | if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020) || |
367 | mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || | 377 | mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || |
378 | mixer->chip->usb_id == USB_ID(0x041e, 0x3042) || | ||
368 | mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) { | 379 | mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) { |
369 | if ((err = snd_audigy2nx_controls_create(mixer)) < 0) | 380 | if ((err = snd_audigy2nx_controls_create(mixer)) < 0) |
370 | return err; | 381 | return err; |
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index cff3a3c465d7..4132522ac90f 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c | |||
@@ -676,8 +676,10 @@ static int snd_usb_pcm_check_knot(struct snd_pcm_runtime *runtime, | |||
676 | if (!needs_knot) | 676 | if (!needs_knot) |
677 | return 0; | 677 | return 0; |
678 | 678 | ||
679 | subs->rate_list.count = count; | ||
680 | subs->rate_list.list = kmalloc(sizeof(int) * count, GFP_KERNEL); | 679 | subs->rate_list.list = kmalloc(sizeof(int) * count, GFP_KERNEL); |
680 | if (!subs->rate_list.list) | ||
681 | return -ENOMEM; | ||
682 | subs->rate_list.count = count; | ||
681 | subs->rate_list.mask = 0; | 683 | subs->rate_list.mask = 0; |
682 | count = 0; | 684 | count = 0; |
683 | list_for_each_entry(fp, &subs->fmt_list, list) { | 685 | list_for_each_entry(fp, &subs->fmt_list, list) { |