diff options
-rw-r--r-- | sound/pci/asihpi/hpi6000.c | 2 | ||||
-rw-r--r-- | sound/pci/asihpi/hpi6205.c | 2 | ||||
-rw-r--r-- | sound/pci/asihpi/hpicmn.c | 12 | ||||
-rw-r--r-- | sound/pci/cs46xx/dsp_spos.c | 33 | ||||
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 1 | ||||
-rw-r--r-- | sound/pci/lx6464es/lx6464es.c | 4 | ||||
-rw-r--r-- | sound/pci/lx6464es/lx6464es.h | 2 | ||||
-rw-r--r-- | sound/pci/lx6464es/lx_core.c | 2 | ||||
-rw-r--r-- | sound/usb/mixer_quirks.c | 15 | ||||
-rw-r--r-- | sound/usb/pcm.c | 4 |
10 files changed, 45 insertions, 32 deletions
diff --git a/sound/pci/asihpi/hpi6000.c b/sound/pci/asihpi/hpi6000.c index f7e374ec4414..1b9bf9395cfe 100644 --- a/sound/pci/asihpi/hpi6000.c +++ b/sound/pci/asihpi/hpi6000.c | |||
@@ -625,6 +625,8 @@ static short create_adapter_obj(struct hpi_adapter_obj *pao, | |||
625 | control_cache_size, (struct hpi_control_cache_info *) | 625 | control_cache_size, (struct hpi_control_cache_info *) |
626 | &phw->control_cache[0] | 626 | &phw->control_cache[0] |
627 | ); | 627 | ); |
628 | if (!phw->p_cache) | ||
629 | pao->has_control_cache = 0; | ||
628 | } else | 630 | } else |
629 | pao->has_control_cache = 0; | 631 | pao->has_control_cache = 0; |
630 | 632 | ||
diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c index 22c5fc625533..2672f6591ceb 100644 --- a/sound/pci/asihpi/hpi6205.c +++ b/sound/pci/asihpi/hpi6205.c | |||
@@ -644,6 +644,8 @@ static u16 create_adapter_obj(struct hpi_adapter_obj *pao, | |||
644 | interface->control_cache.size_in_bytes, | 644 | interface->control_cache.size_in_bytes, |
645 | (struct hpi_control_cache_info *) | 645 | (struct hpi_control_cache_info *) |
646 | p_control_cache_virtual); | 646 | p_control_cache_virtual); |
647 | if (!phw->p_cache) | ||
648 | err = HPI_ERROR_MEMORY_ALLOC; | ||
647 | } | 649 | } |
648 | if (!err) { | 650 | if (!err) { |
649 | err = hpios_locked_mem_get_phys_addr(&phw-> | 651 | err = hpios_locked_mem_get_phys_addr(&phw-> |
diff --git a/sound/pci/asihpi/hpicmn.c b/sound/pci/asihpi/hpicmn.c index dda4f1c6f658..d67f4d3db911 100644 --- a/sound/pci/asihpi/hpicmn.c +++ b/sound/pci/asihpi/hpicmn.c | |||
@@ -571,14 +571,20 @@ struct hpi_control_cache *hpi_alloc_control_cache(const u32 | |||
571 | { | 571 | { |
572 | struct hpi_control_cache *p_cache = | 572 | struct hpi_control_cache *p_cache = |
573 | kmalloc(sizeof(*p_cache), GFP_KERNEL); | 573 | kmalloc(sizeof(*p_cache), GFP_KERNEL); |
574 | if (!p_cache) | ||
575 | return NULL; | ||
576 | p_cache->p_info = | ||
577 | kmalloc(sizeof(*p_cache->p_info) * number_of_controls, | ||
578 | GFP_KERNEL); | ||
579 | if (!p_cache->p_info) { | ||
580 | kfree(p_cache); | ||
581 | return NULL; | ||
582 | } | ||
574 | p_cache->cache_size_in_bytes = size_in_bytes; | 583 | p_cache->cache_size_in_bytes = size_in_bytes; |
575 | p_cache->control_count = number_of_controls; | 584 | p_cache->control_count = number_of_controls; |
576 | p_cache->p_cache = | 585 | p_cache->p_cache = |
577 | (struct hpi_control_cache_single *)pDSP_control_buffer; | 586 | (struct hpi_control_cache_single *)pDSP_control_buffer; |
578 | p_cache->init = 0; | 587 | p_cache->init = 0; |
579 | p_cache->p_info = | ||
580 | kmalloc(sizeof(*p_cache->p_info) * p_cache->control_count, | ||
581 | GFP_KERNEL); | ||
582 | return p_cache; | 588 | return p_cache; |
583 | } | 589 | } |
584 | 590 | ||
diff --git a/sound/pci/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c index 3e5ca8fb519f..e377287192aa 100644 --- a/sound/pci/cs46xx/dsp_spos.c +++ b/sound/pci/cs46xx/dsp_spos.c | |||
@@ -225,39 +225,25 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip) | |||
225 | { | 225 | { |
226 | struct dsp_spos_instance * ins = kzalloc(sizeof(struct dsp_spos_instance), GFP_KERNEL); | 226 | struct dsp_spos_instance * ins = kzalloc(sizeof(struct dsp_spos_instance), GFP_KERNEL); |
227 | 227 | ||
228 | if (ins == NULL) | 228 | if (ins == NULL) |
229 | return NULL; | 229 | return NULL; |
230 | 230 | ||
231 | /* better to use vmalloc for this big table */ | 231 | /* better to use vmalloc for this big table */ |
232 | ins->symbol_table.nsymbols = 0; | ||
233 | ins->symbol_table.symbols = vmalloc(sizeof(struct dsp_symbol_entry) * | 232 | ins->symbol_table.symbols = vmalloc(sizeof(struct dsp_symbol_entry) * |
234 | DSP_MAX_SYMBOLS); | 233 | DSP_MAX_SYMBOLS); |
235 | ins->symbol_table.highest_frag_index = 0; | 234 | ins->code.data = kmalloc(DSP_CODE_BYTE_SIZE, GFP_KERNEL); |
236 | 235 | ins->modules = kmalloc(sizeof(struct dsp_module_desc) * DSP_MAX_MODULES, GFP_KERNEL); | |
237 | if (ins->symbol_table.symbols == NULL) { | 236 | if (!ins->symbol_table.symbols || !ins->code.data || !ins->modules) { |
238 | cs46xx_dsp_spos_destroy(chip); | 237 | cs46xx_dsp_spos_destroy(chip); |
239 | goto error; | 238 | goto error; |
240 | } | 239 | } |
241 | 240 | ins->symbol_table.nsymbols = 0; | |
241 | ins->symbol_table.highest_frag_index = 0; | ||
242 | ins->code.offset = 0; | 242 | ins->code.offset = 0; |
243 | ins->code.size = 0; | 243 | ins->code.size = 0; |
244 | ins->code.data = kmalloc(DSP_CODE_BYTE_SIZE, GFP_KERNEL); | ||
245 | |||
246 | if (ins->code.data == NULL) { | ||
247 | cs46xx_dsp_spos_destroy(chip); | ||
248 | goto error; | ||
249 | } | ||
250 | |||
251 | ins->nscb = 0; | 244 | ins->nscb = 0; |
252 | ins->ntask = 0; | 245 | ins->ntask = 0; |
253 | |||
254 | ins->nmodules = 0; | 246 | ins->nmodules = 0; |
255 | ins->modules = kmalloc(sizeof(struct dsp_module_desc) * DSP_MAX_MODULES, GFP_KERNEL); | ||
256 | |||
257 | if (ins->modules == NULL) { | ||
258 | cs46xx_dsp_spos_destroy(chip); | ||
259 | goto error; | ||
260 | } | ||
261 | 247 | ||
262 | /* default SPDIF input sample rate | 248 | /* default SPDIF input sample rate |
263 | to 48000 khz */ | 249 | to 48000 khz */ |
@@ -271,8 +257,8 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip) | |||
271 | 257 | ||
272 | /* set left and right validity bits and | 258 | /* set left and right validity bits and |
273 | default channel status */ | 259 | default channel status */ |
274 | ins->spdif_csuv_default = | 260 | ins->spdif_csuv_default = |
275 | ins->spdif_csuv_stream = | 261 | ins->spdif_csuv_stream = |
276 | /* byte 0 */ ((unsigned int)_wrap_all_bits( (SNDRV_PCM_DEFAULT_CON_SPDIF & 0xff)) << 24) | | 262 | /* byte 0 */ ((unsigned int)_wrap_all_bits( (SNDRV_PCM_DEFAULT_CON_SPDIF & 0xff)) << 24) | |
277 | /* byte 1 */ ((unsigned int)_wrap_all_bits( ((SNDRV_PCM_DEFAULT_CON_SPDIF >> 8) & 0xff)) << 16) | | 263 | /* byte 1 */ ((unsigned int)_wrap_all_bits( ((SNDRV_PCM_DEFAULT_CON_SPDIF >> 8) & 0xff)) << 16) | |
278 | /* byte 3 */ (unsigned int)_wrap_all_bits( (SNDRV_PCM_DEFAULT_CON_SPDIF >> 24) & 0xff) | | 264 | /* byte 3 */ (unsigned int)_wrap_all_bits( (SNDRV_PCM_DEFAULT_CON_SPDIF >> 24) & 0xff) | |
@@ -281,6 +267,9 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip) | |||
281 | return ins; | 267 | return ins; |
282 | 268 | ||
283 | error: | 269 | error: |
270 | kfree(ins->modules); | ||
271 | kfree(ins->code.data); | ||
272 | vfree(ins->symbol_table.symbols); | ||
284 | kfree(ins); | 273 | kfree(ins); |
285 | return NULL; | 274 | return NULL; |
286 | } | 275 | } |
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 460fb2ef7e39..18af38ebf757 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -1166,6 +1166,7 @@ static const char *cs420x_models[CS420X_MODELS] = { | |||
1166 | 1166 | ||
1167 | static struct snd_pci_quirk cs420x_cfg_tbl[] = { | 1167 | static struct snd_pci_quirk cs420x_cfg_tbl[] = { |
1168 | SND_PCI_QUIRK(0x10de, 0x0ac0, "MacBookPro 5,3", CS420X_MBP53), | 1168 | SND_PCI_QUIRK(0x10de, 0x0ac0, "MacBookPro 5,3", CS420X_MBP53), |
1169 | SND_PCI_QUIRK(0x10de, 0x0d94, "MacBookAir 3,1(2)", CS420X_MBP55), | ||
1169 | SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55), | 1170 | SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55), |
1170 | SND_PCI_QUIRK(0x10de, 0xcb89, "MacBookPro 7,1", CS420X_MBP55), | 1171 | SND_PCI_QUIRK(0x10de, 0xcb89, "MacBookPro 7,1", CS420X_MBP55), |
1171 | SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27), | 1172 | SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27), |
diff --git a/sound/pci/lx6464es/lx6464es.c b/sound/pci/lx6464es/lx6464es.c index ef9af3f4ace2..1bd7a540fd49 100644 --- a/sound/pci/lx6464es/lx6464es.c +++ b/sound/pci/lx6464es/lx6464es.c | |||
@@ -425,7 +425,7 @@ exit: | |||
425 | static void lx_trigger_start(struct lx6464es *chip, struct lx_stream *lx_stream) | 425 | static void lx_trigger_start(struct lx6464es *chip, struct lx_stream *lx_stream) |
426 | { | 426 | { |
427 | struct snd_pcm_substream *substream = lx_stream->stream; | 427 | struct snd_pcm_substream *substream = lx_stream->stream; |
428 | const int is_capture = lx_stream->is_capture; | 428 | const unsigned int is_capture = lx_stream->is_capture; |
429 | 429 | ||
430 | int err; | 430 | int err; |
431 | 431 | ||
@@ -473,7 +473,7 @@ static void lx_trigger_start(struct lx6464es *chip, struct lx_stream *lx_stream) | |||
473 | 473 | ||
474 | static void lx_trigger_stop(struct lx6464es *chip, struct lx_stream *lx_stream) | 474 | static void lx_trigger_stop(struct lx6464es *chip, struct lx_stream *lx_stream) |
475 | { | 475 | { |
476 | const int is_capture = lx_stream->is_capture; | 476 | const unsigned int is_capture = lx_stream->is_capture; |
477 | int err; | 477 | int err; |
478 | 478 | ||
479 | snd_printd(LXP "stopping: stopping stream\n"); | 479 | snd_printd(LXP "stopping: stopping stream\n"); |
diff --git a/sound/pci/lx6464es/lx6464es.h b/sound/pci/lx6464es/lx6464es.h index 51afc048961d..aea621eafbb5 100644 --- a/sound/pci/lx6464es/lx6464es.h +++ b/sound/pci/lx6464es/lx6464es.h | |||
@@ -60,7 +60,7 @@ struct lx_stream { | |||
60 | snd_pcm_uframes_t frame_pos; | 60 | snd_pcm_uframes_t frame_pos; |
61 | enum lx_stream_status status; /* free, open, running, draining | 61 | enum lx_stream_status status; /* free, open, running, draining |
62 | * pause */ | 62 | * pause */ |
63 | int is_capture:1; | 63 | unsigned int is_capture:1; |
64 | }; | 64 | }; |
65 | 65 | ||
66 | 66 | ||
diff --git a/sound/pci/lx6464es/lx_core.c b/sound/pci/lx6464es/lx_core.c index 3086b751da4a..617f98b0cbae 100644 --- a/sound/pci/lx6464es/lx_core.c +++ b/sound/pci/lx6464es/lx_core.c | |||
@@ -1152,7 +1152,7 @@ static int lx_interrupt_request_new_buffer(struct lx6464es *chip, | |||
1152 | struct lx_stream *lx_stream) | 1152 | struct lx_stream *lx_stream) |
1153 | { | 1153 | { |
1154 | struct snd_pcm_substream *substream = lx_stream->stream; | 1154 | struct snd_pcm_substream *substream = lx_stream->stream; |
1155 | int is_capture = lx_stream->is_capture; | 1155 | const unsigned int is_capture = lx_stream->is_capture; |
1156 | int err; | 1156 | int err; |
1157 | unsigned long flags; | 1157 | unsigned long flags; |
1158 | 1158 | ||
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) { |