diff options
Diffstat (limited to 'sound/pci/cs46xx/dsp_spos_scb_lib.c')
-rw-r--r-- | sound/pci/cs46xx/dsp_spos_scb_lib.c | 57 |
1 files changed, 38 insertions, 19 deletions
diff --git a/sound/pci/cs46xx/dsp_spos_scb_lib.c b/sound/pci/cs46xx/dsp_spos_scb_lib.c index 409e8764fbeb..8284bc9b5858 100644 --- a/sound/pci/cs46xx/dsp_spos_scb_lib.c +++ b/sound/pci/cs46xx/dsp_spos_scb_lib.c | |||
@@ -233,8 +233,11 @@ void cs46xx_dsp_proc_free_scb_desc (struct dsp_scb_descriptor * scb) | |||
233 | { | 233 | { |
234 | if (scb->proc_info) { | 234 | if (scb->proc_info) { |
235 | struct proc_scb_info * scb_info = scb->proc_info->private_data; | 235 | struct proc_scb_info * scb_info = scb->proc_info->private_data; |
236 | struct snd_cs46xx *chip = scb_info->chip; | ||
236 | 237 | ||
237 | snd_printdd("cs46xx_dsp_proc_free_scb_desc: freeing %s\n",scb->scb_name); | 238 | dev_dbg(chip->card->dev, |
239 | "cs46xx_dsp_proc_free_scb_desc: freeing %s\n", | ||
240 | scb->scb_name); | ||
238 | 241 | ||
239 | snd_info_free_entry(scb->proc_info); | 242 | snd_info_free_entry(scb->proc_info); |
240 | scb->proc_info = NULL; | 243 | scb->proc_info = NULL; |
@@ -305,7 +308,7 @@ _dsp_create_generic_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u | |||
305 | scb_data[SCBfuncEntryPtr] &= 0xFFFF0000; | 308 | scb_data[SCBfuncEntryPtr] &= 0xFFFF0000; |
306 | scb_data[SCBfuncEntryPtr] |= task_entry->address; | 309 | scb_data[SCBfuncEntryPtr] |= task_entry->address; |
307 | 310 | ||
308 | snd_printdd("dsp_spos: creating SCB <%s>\n",name); | 311 | dev_dbg(chip->card->dev, "dsp_spos: creating SCB <%s>\n", name); |
309 | 312 | ||
310 | scb = cs46xx_dsp_create_scb(chip,name,scb_data,dest); | 313 | scb = cs46xx_dsp_create_scb(chip,name,scb_data,dest); |
311 | 314 | ||
@@ -320,9 +323,15 @@ _dsp_create_generic_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u | |||
320 | /* update parent SCB */ | 323 | /* update parent SCB */ |
321 | if (scb->parent_scb_ptr) { | 324 | if (scb->parent_scb_ptr) { |
322 | #if 0 | 325 | #if 0 |
323 | printk ("scb->parent_scb_ptr = %s\n",scb->parent_scb_ptr->scb_name); | 326 | dev_dbg(chip->card->dev, |
324 | printk ("scb->parent_scb_ptr->next_scb_ptr = %s\n",scb->parent_scb_ptr->next_scb_ptr->scb_name); | 327 | "scb->parent_scb_ptr = %s\n", |
325 | printk ("scb->parent_scb_ptr->sub_list_ptr = %s\n",scb->parent_scb_ptr->sub_list_ptr->scb_name); | 328 | scb->parent_scb_ptr->scb_name); |
329 | dev_dbg(chip->card->dev, | ||
330 | "scb->parent_scb_ptr->next_scb_ptr = %s\n", | ||
331 | scb->parent_scb_ptr->next_scb_ptr->scb_name); | ||
332 | dev_dbg(chip->card->dev, | ||
333 | "scb->parent_scb_ptr->sub_list_ptr = %s\n", | ||
334 | scb->parent_scb_ptr->sub_list_ptr->scb_name); | ||
326 | #endif | 335 | #endif |
327 | /* link to parent SCB */ | 336 | /* link to parent SCB */ |
328 | if (scb_child_type == SCB_ON_PARENT_NEXT_SCB) { | 337 | if (scb_child_type == SCB_ON_PARENT_NEXT_SCB) { |
@@ -368,7 +377,8 @@ cs46xx_dsp_create_generic_scb (struct snd_cs46xx *chip, char * name, u32 * scb_d | |||
368 | SYMBOL_CODE); | 377 | SYMBOL_CODE); |
369 | 378 | ||
370 | if (task_entry == NULL) { | 379 | if (task_entry == NULL) { |
371 | snd_printk (KERN_ERR "dsp_spos: symbol %s not found\n",task_entry_name); | 380 | dev_err(chip->card->dev, |
381 | "dsp_spos: symbol %s not found\n", task_entry_name); | ||
372 | return NULL; | 382 | return NULL; |
373 | } | 383 | } |
374 | 384 | ||
@@ -582,7 +592,8 @@ cs46xx_dsp_create_pcm_reader_scb(struct snd_cs46xx * chip, char * scb_name, | |||
582 | SYMBOL_CODE); | 592 | SYMBOL_CODE); |
583 | 593 | ||
584 | if (ins->null_algorithm == NULL) { | 594 | if (ins->null_algorithm == NULL) { |
585 | snd_printk (KERN_ERR "dsp_spos: symbol NULLALGORITHM not found\n"); | 595 | dev_err(chip->card->dev, |
596 | "dsp_spos: symbol NULLALGORITHM not found\n"); | ||
586 | return NULL; | 597 | return NULL; |
587 | } | 598 | } |
588 | } | 599 | } |
@@ -612,7 +623,8 @@ cs46xx_dsp_create_src_task_scb(struct snd_cs46xx * chip, char * scb_name, | |||
612 | unsigned int phiIncr; | 623 | unsigned int phiIncr; |
613 | unsigned int correctionPerGOF, correctionPerSec; | 624 | unsigned int correctionPerGOF, correctionPerSec; |
614 | 625 | ||
615 | snd_printdd( "dsp_spos: setting %s rate to %u\n",scb_name,rate); | 626 | dev_dbg(chip->card->dev, "dsp_spos: setting %s rate to %u\n", |
627 | scb_name, rate); | ||
616 | 628 | ||
617 | /* | 629 | /* |
618 | * Compute the values used to drive the actual sample rate conversion. | 630 | * Compute the values used to drive the actual sample rate conversion. |
@@ -670,7 +682,8 @@ cs46xx_dsp_create_src_task_scb(struct snd_cs46xx * chip, char * scb_name, | |||
670 | SYMBOL_CODE); | 682 | SYMBOL_CODE); |
671 | 683 | ||
672 | if (ins->s16_up == NULL) { | 684 | if (ins->s16_up == NULL) { |
673 | snd_printk (KERN_ERR "dsp_spos: symbol S16_UPSRC not found\n"); | 685 | dev_err(chip->card->dev, |
686 | "dsp_spos: symbol S16_UPSRC not found\n"); | ||
674 | return NULL; | 687 | return NULL; |
675 | } | 688 | } |
676 | } | 689 | } |
@@ -1265,7 +1278,7 @@ cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip, | |||
1265 | the Sample Rate Converted (which could | 1278 | the Sample Rate Converted (which could |
1266 | alter the raw data stream ...) */ | 1279 | alter the raw data stream ...) */ |
1267 | if (sample_rate == 48000) { | 1280 | if (sample_rate == 48000) { |
1268 | snd_printdd ("IEC958 pass through\n"); | 1281 | dev_dbg(chip->card->dev, "IEC958 pass through\n"); |
1269 | /* Hack to bypass creating a new SRC */ | 1282 | /* Hack to bypass creating a new SRC */ |
1270 | pass_through = 1; | 1283 | pass_through = 1; |
1271 | } | 1284 | } |
@@ -1299,13 +1312,14 @@ cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip, | |||
1299 | } | 1312 | } |
1300 | 1313 | ||
1301 | if (pcm_index == -1) { | 1314 | if (pcm_index == -1) { |
1302 | snd_printk (KERN_ERR "dsp_spos: no free PCM channel\n"); | 1315 | dev_err(chip->card->dev, "dsp_spos: no free PCM channel\n"); |
1303 | return NULL; | 1316 | return NULL; |
1304 | } | 1317 | } |
1305 | 1318 | ||
1306 | if (src_scb == NULL) { | 1319 | if (src_scb == NULL) { |
1307 | if (ins->nsrc_scb >= DSP_MAX_SRC_NR) { | 1320 | if (ins->nsrc_scb >= DSP_MAX_SRC_NR) { |
1308 | snd_printk(KERN_ERR "dsp_spos: to many SRC instances\n!"); | 1321 | dev_err(chip->card->dev, |
1322 | "dsp_spos: to many SRC instances\n!"); | ||
1309 | return NULL; | 1323 | return NULL; |
1310 | } | 1324 | } |
1311 | 1325 | ||
@@ -1331,7 +1345,8 @@ cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip, | |||
1331 | 1345 | ||
1332 | snprintf (scb_name,DSP_MAX_SCB_NAME,"SrcTask_SCB%d",src_index); | 1346 | snprintf (scb_name,DSP_MAX_SCB_NAME,"SrcTask_SCB%d",src_index); |
1333 | 1347 | ||
1334 | snd_printdd( "dsp_spos: creating SRC \"%s\"\n",scb_name); | 1348 | dev_dbg(chip->card->dev, |
1349 | "dsp_spos: creating SRC \"%s\"\n", scb_name); | ||
1335 | src_scb = cs46xx_dsp_create_src_task_scb(chip,scb_name, | 1350 | src_scb = cs46xx_dsp_create_src_task_scb(chip,scb_name, |
1336 | sample_rate, | 1351 | sample_rate, |
1337 | src_output_buffer_addr[src_index], | 1352 | src_output_buffer_addr[src_index], |
@@ -1343,7 +1358,8 @@ cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip, | |||
1343 | pass_through); | 1358 | pass_through); |
1344 | 1359 | ||
1345 | if (!src_scb) { | 1360 | if (!src_scb) { |
1346 | snd_printk (KERN_ERR "dsp_spos: failed to create SRCtaskSCB\n"); | 1361 | dev_err(chip->card->dev, |
1362 | "dsp_spos: failed to create SRCtaskSCB\n"); | ||
1347 | return NULL; | 1363 | return NULL; |
1348 | } | 1364 | } |
1349 | 1365 | ||
@@ -1355,8 +1371,8 @@ cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip, | |||
1355 | 1371 | ||
1356 | snprintf (scb_name,DSP_MAX_SCB_NAME,"PCMReader_SCB%d",pcm_index); | 1372 | snprintf (scb_name,DSP_MAX_SCB_NAME,"PCMReader_SCB%d",pcm_index); |
1357 | 1373 | ||
1358 | snd_printdd( "dsp_spos: creating PCM \"%s\" (%d)\n",scb_name, | 1374 | dev_dbg(chip->card->dev, "dsp_spos: creating PCM \"%s\" (%d)\n", |
1359 | pcm_channel_id); | 1375 | scb_name, pcm_channel_id); |
1360 | 1376 | ||
1361 | pcm_scb = cs46xx_dsp_create_pcm_reader_scb(chip,scb_name, | 1377 | pcm_scb = cs46xx_dsp_create_pcm_reader_scb(chip,scb_name, |
1362 | pcm_reader_buffer_addr[pcm_index], | 1378 | pcm_reader_buffer_addr[pcm_index], |
@@ -1369,7 +1385,8 @@ cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip, | |||
1369 | ); | 1385 | ); |
1370 | 1386 | ||
1371 | if (!pcm_scb) { | 1387 | if (!pcm_scb) { |
1372 | snd_printk (KERN_ERR "dsp_spos: failed to create PCMreaderSCB\n"); | 1388 | dev_err(chip->card->dev, |
1389 | "dsp_spos: failed to create PCMreaderSCB\n"); | ||
1373 | return NULL; | 1390 | return NULL; |
1374 | } | 1391 | } |
1375 | 1392 | ||
@@ -1419,7 +1436,8 @@ int cs46xx_dsp_pcm_channel_set_period (struct snd_cs46xx * chip, | |||
1419 | temp |= DMA_RQ_C1_SOURCE_MOD16; | 1436 | temp |= DMA_RQ_C1_SOURCE_MOD16; |
1420 | break; | 1437 | break; |
1421 | default: | 1438 | default: |
1422 | snd_printdd ("period size (%d) not supported by HW\n", period_size); | 1439 | dev_dbg(chip->card->dev, |
1440 | "period size (%d) not supported by HW\n", period_size); | ||
1423 | return -EINVAL; | 1441 | return -EINVAL; |
1424 | } | 1442 | } |
1425 | 1443 | ||
@@ -1457,7 +1475,8 @@ int cs46xx_dsp_pcm_ostream_set_period (struct snd_cs46xx * chip, | |||
1457 | temp |= DMA_RQ_C1_DEST_MOD16; | 1475 | temp |= DMA_RQ_C1_DEST_MOD16; |
1458 | break; | 1476 | break; |
1459 | default: | 1477 | default: |
1460 | snd_printdd ("period size (%d) not supported by HW\n", period_size); | 1478 | dev_dbg(chip->card->dev, |
1479 | "period size (%d) not supported by HW\n", period_size); | ||
1461 | return -EINVAL; | 1480 | return -EINVAL; |
1462 | } | 1481 | } |
1463 | 1482 | ||