diff options
Diffstat (limited to 'sound/pci')
-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 |
8 files changed, 29 insertions, 29 deletions
diff --git a/sound/pci/asihpi/hpi6000.c b/sound/pci/asihpi/hpi6000.c index f7e374ec441..1b9bf9395cf 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 22c5fc62553..2672f6591ce 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 dda4f1c6f65..d67f4d3db91 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 3e5ca8fb519..e377287192a 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 460fb2ef7e3..18af38ebf75 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 ef9af3f4ace..1bd7a540fd4 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 51afc048961..aea621eafbb 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 3086b751da4..617f98b0cba 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 | ||