Commit 2b96a7f1 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: cs46xx: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 00980aa9
This diff is collapsed.
This diff is collapsed.
......@@ -233,8 +233,11 @@ void cs46xx_dsp_proc_free_scb_desc (struct dsp_scb_descriptor * scb)
{
if (scb->proc_info) {
struct proc_scb_info * scb_info = scb->proc_info->private_data;
struct snd_cs46xx *chip = scb_info->chip;
snd_printdd("cs46xx_dsp_proc_free_scb_desc: freeing %s\n",scb->scb_name);
dev_dbg(chip->card->dev,
"cs46xx_dsp_proc_free_scb_desc: freeing %s\n",
scb->scb_name);
snd_info_free_entry(scb->proc_info);
scb->proc_info = NULL;
......@@ -305,7 +308,7 @@ _dsp_create_generic_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u
scb_data[SCBfuncEntryPtr] &= 0xFFFF0000;
scb_data[SCBfuncEntryPtr] |= task_entry->address;
snd_printdd("dsp_spos: creating SCB <%s>\n",name);
dev_dbg(chip->card->dev, "dsp_spos: creating SCB <%s>\n", name);
scb = cs46xx_dsp_create_scb(chip,name,scb_data,dest);
......@@ -320,9 +323,15 @@ _dsp_create_generic_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u
/* update parent SCB */
if (scb->parent_scb_ptr) {
#if 0
printk ("scb->parent_scb_ptr = %s\n",scb->parent_scb_ptr->scb_name);
printk ("scb->parent_scb_ptr->next_scb_ptr = %s\n",scb->parent_scb_ptr->next_scb_ptr->scb_name);
printk ("scb->parent_scb_ptr->sub_list_ptr = %s\n",scb->parent_scb_ptr->sub_list_ptr->scb_name);
dev_dbg(chip->card->dev,
"scb->parent_scb_ptr = %s\n",
scb->parent_scb_ptr->scb_name);
dev_dbg(chip->card->dev,
"scb->parent_scb_ptr->next_scb_ptr = %s\n",
scb->parent_scb_ptr->next_scb_ptr->scb_name);
dev_dbg(chip->card->dev,
"scb->parent_scb_ptr->sub_list_ptr = %s\n",
scb->parent_scb_ptr->sub_list_ptr->scb_name);
#endif
/* link to parent SCB */
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
SYMBOL_CODE);
if (task_entry == NULL) {
snd_printk (KERN_ERR "dsp_spos: symbol %s not found\n",task_entry_name);
dev_err(chip->card->dev,
"dsp_spos: symbol %s not found\n", task_entry_name);
return NULL;
}
......@@ -582,7 +592,8 @@ cs46xx_dsp_create_pcm_reader_scb(struct snd_cs46xx * chip, char * scb_name,
SYMBOL_CODE);
if (ins->null_algorithm == NULL) {
snd_printk (KERN_ERR "dsp_spos: symbol NULLALGORITHM not found\n");
dev_err(chip->card->dev,
"dsp_spos: symbol NULLALGORITHM not found\n");
return NULL;
}
}
......@@ -612,7 +623,8 @@ cs46xx_dsp_create_src_task_scb(struct snd_cs46xx * chip, char * scb_name,
unsigned int phiIncr;
unsigned int correctionPerGOF, correctionPerSec;
snd_printdd( "dsp_spos: setting %s rate to %u\n",scb_name,rate);
dev_dbg(chip->card->dev, "dsp_spos: setting %s rate to %u\n",
scb_name, rate);
/*
* 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,
SYMBOL_CODE);
if (ins->s16_up == NULL) {
snd_printk (KERN_ERR "dsp_spos: symbol S16_UPSRC not found\n");
dev_err(chip->card->dev,
"dsp_spos: symbol S16_UPSRC not found\n");
return NULL;
}
}
......@@ -1265,7 +1278,7 @@ cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip,
the Sample Rate Converted (which could
alter the raw data stream ...) */
if (sample_rate == 48000) {
snd_printdd ("IEC958 pass through\n");
dev_dbg(chip->card->dev, "IEC958 pass through\n");
/* Hack to bypass creating a new SRC */
pass_through = 1;
}
......@@ -1299,13 +1312,14 @@ cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip,
}
if (pcm_index == -1) {
snd_printk (KERN_ERR "dsp_spos: no free PCM channel\n");
dev_err(chip->card->dev, "dsp_spos: no free PCM channel\n");
return NULL;
}
if (src_scb == NULL) {
if (ins->nsrc_scb >= DSP_MAX_SRC_NR) {
snd_printk(KERN_ERR "dsp_spos: to many SRC instances\n!");
dev_err(chip->card->dev,
"dsp_spos: to many SRC instances\n!");
return NULL;
}
......@@ -1331,7 +1345,8 @@ cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip,
snprintf (scb_name,DSP_MAX_SCB_NAME,"SrcTask_SCB%d",src_index);
snd_printdd( "dsp_spos: creating SRC \"%s\"\n",scb_name);
dev_dbg(chip->card->dev,
"dsp_spos: creating SRC \"%s\"\n", scb_name);
src_scb = cs46xx_dsp_create_src_task_scb(chip,scb_name,
sample_rate,
src_output_buffer_addr[src_index],
......@@ -1343,7 +1358,8 @@ cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip,
pass_through);
if (!src_scb) {
snd_printk (KERN_ERR "dsp_spos: failed to create SRCtaskSCB\n");
dev_err(chip->card->dev,
"dsp_spos: failed to create SRCtaskSCB\n");
return NULL;
}
......@@ -1355,8 +1371,8 @@ cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip,
snprintf (scb_name,DSP_MAX_SCB_NAME,"PCMReader_SCB%d",pcm_index);
snd_printdd( "dsp_spos: creating PCM \"%s\" (%d)\n",scb_name,
pcm_channel_id);
dev_dbg(chip->card->dev, "dsp_spos: creating PCM \"%s\" (%d)\n",
scb_name, pcm_channel_id);
pcm_scb = cs46xx_dsp_create_pcm_reader_scb(chip,scb_name,
pcm_reader_buffer_addr[pcm_index],
......@@ -1369,7 +1385,8 @@ cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip,
);
if (!pcm_scb) {
snd_printk (KERN_ERR "dsp_spos: failed to create PCMreaderSCB\n");
dev_err(chip->card->dev,
"dsp_spos: failed to create PCMreaderSCB\n");
return NULL;
}
......@@ -1419,7 +1436,8 @@ int cs46xx_dsp_pcm_channel_set_period (struct snd_cs46xx * chip,
temp |= DMA_RQ_C1_SOURCE_MOD16;
break;
default:
snd_printdd ("period size (%d) not supported by HW\n", period_size);
dev_dbg(chip->card->dev,
"period size (%d) not supported by HW\n", period_size);
return -EINVAL;
}
......@@ -1457,7 +1475,8 @@ int cs46xx_dsp_pcm_ostream_set_period (struct snd_cs46xx * chip,
temp |= DMA_RQ_C1_DEST_MOD16;
break;
default:
snd_printdd ("period size (%d) not supported by HW\n", period_size);
dev_dbg(chip->card->dev,
"period size (%d) not supported by HW\n", period_size);
return -EINVAL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment