Commit b3e0afe6 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: ctxfi - Add prefix to debug prints

Added ctxfi: prefix to each debug print.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 35b053be
...@@ -259,7 +259,7 @@ static int get_amixer_rsc(struct amixer_mgr *mgr, ...@@ -259,7 +259,7 @@ static int get_amixer_rsc(struct amixer_mgr *mgr,
} }
spin_unlock_irqrestore(&mgr->mgr_lock, flags); spin_unlock_irqrestore(&mgr->mgr_lock, flags);
if (err) { if (err) {
printk(KERN_ERR "Can't meet AMIXER resource request!\n"); printk(KERN_ERR "ctxfi: Can't meet AMIXER resource request!\n");
goto error; goto error;
} }
...@@ -413,7 +413,7 @@ static int get_sum_rsc(struct sum_mgr *mgr, ...@@ -413,7 +413,7 @@ static int get_sum_rsc(struct sum_mgr *mgr,
} }
spin_unlock_irqrestore(&mgr->mgr_lock, flags); spin_unlock_irqrestore(&mgr->mgr_lock, flags);
if (err) { if (err) {
printk(KERN_ERR "Can't meet SUM resource request!\n"); printk(KERN_ERR "ctxfi: Can't meet SUM resource request!\n");
goto error; goto error;
} }
......
...@@ -191,7 +191,7 @@ static unsigned int convert_format(snd_pcm_format_t snd_format) ...@@ -191,7 +191,7 @@ static unsigned int convert_format(snd_pcm_format_t snd_format)
case SNDRV_PCM_FORMAT_S32_LE: case SNDRV_PCM_FORMAT_S32_LE:
return SRC_SF_S32; return SRC_SF_S32;
default: default:
printk(KERN_ERR "not recognized snd format is %d \n", printk(KERN_ERR "ctxfi: not recognized snd format is %d \n",
snd_format); snd_format);
return SRC_SF_S16; return SRC_SF_S16;
} }
...@@ -1254,7 +1254,8 @@ static int ct_create_alsa_devs(struct ct_atc *atc) ...@@ -1254,7 +1254,8 @@ static int ct_create_alsa_devs(struct ct_atc *atc)
err = alsa_dev_funcs[i].create(atc, i, err = alsa_dev_funcs[i].create(atc, i,
alsa_dev_funcs[i].public_name); alsa_dev_funcs[i].public_name);
if (err) { if (err) {
printk(KERN_ERR "Creating alsa device %d failed!\n", i); printk(KERN_ERR "ctxfi: "
"Creating alsa device %d failed!\n", i);
return err; return err;
} }
} }
...@@ -1289,7 +1290,8 @@ static int atc_create_hw_devs(struct ct_atc *atc) ...@@ -1289,7 +1290,8 @@ static int atc_create_hw_devs(struct ct_atc *atc)
err = rsc_mgr_funcs[i].create(atc->hw, &atc->rsc_mgrs[i]); err = rsc_mgr_funcs[i].create(atc->hw, &atc->rsc_mgrs[i]);
if (err) { if (err) {
printk(KERN_ERR "Failed to create rsc_mgr %d!!!\n", i); printk(KERN_ERR "ctxfi: "
"Failed to create rsc_mgr %d!!!\n", i);
return err; return err;
} }
} }
...@@ -1333,7 +1335,7 @@ static int atc_get_resources(struct ct_atc *atc) ...@@ -1333,7 +1335,7 @@ static int atc_get_resources(struct ct_atc *atc)
err = daio_mgr->get_daio(daio_mgr, &da_desc, err = daio_mgr->get_daio(daio_mgr, &da_desc,
(struct daio **)&atc->daios[i]); (struct daio **)&atc->daios[i]);
if (err) { if (err) {
printk(KERN_ERR "Failed to get DAIO " printk(KERN_ERR "ctxfi: Failed to get DAIO "
"resource %d!!!\n", i); "resource %d!!!\n", i);
return err; return err;
} }
...@@ -1349,7 +1351,7 @@ static int atc_get_resources(struct ct_atc *atc) ...@@ -1349,7 +1351,7 @@ static int atc_get_resources(struct ct_atc *atc)
err = daio_mgr->get_daio(daio_mgr, &da_desc, err = daio_mgr->get_daio(daio_mgr, &da_desc,
(struct daio **)&atc->daios[i]); (struct daio **)&atc->daios[i]);
if (err) { if (err) {
printk(KERN_ERR "Failed to get S/PDIF-in resource!!!\n"); printk(KERN_ERR "ctxfi: Failed to get S/PDIF-in resource!!!\n");
return err; return err;
} }
atc->n_daio++; atc->n_daio++;
...@@ -1400,7 +1402,7 @@ static int atc_get_resources(struct ct_atc *atc) ...@@ -1400,7 +1402,7 @@ static int atc_get_resources(struct ct_atc *atc)
err = ct_mixer_create(atc, (struct ct_mixer **)&atc->mixer); err = ct_mixer_create(atc, (struct ct_mixer **)&atc->mixer);
if (err) { if (err) {
printk(KERN_ERR "Failed to create mixer obj!!!\n"); printk(KERN_ERR "ctxfi: Failed to create mixer obj!!!\n");
return err; return err;
} }
...@@ -1600,7 +1602,7 @@ int ct_atc_create(struct snd_card *card, struct pci_dev *pci, ...@@ -1600,7 +1602,7 @@ int ct_atc_create(struct snd_card *card, struct pci_dev *pci,
error1: error1:
ct_atc_destroy(atc); ct_atc_destroy(atc);
printk(KERN_ERR "Something wrong!!!\n"); printk(KERN_ERR "ctxfi: Something wrong!!!\n");
return err; return err;
} }
...@@ -1144,7 +1144,7 @@ static int hw_daio_init(struct hw *hw, const struct daio_conf *info) ...@@ -1144,7 +1144,7 @@ static int hw_daio_init(struct hw *hw, const struct daio_conf *info)
hw_write_20kx(hw, AUDIO_IO_TX_BLRCLK, 0x11111111); hw_write_20kx(hw, AUDIO_IO_TX_BLRCLK, 0x11111111);
hw_write_20kx(hw, AUDIO_IO_RX_BLRCLK, 0); hw_write_20kx(hw, AUDIO_IO_RX_BLRCLK, 0);
} else { } else {
printk(KERN_ALERT "ERROR!!! Invalid sampling rate!!!\n"); printk(KERN_ALERT "ctxfi: ERROR!!! Invalid sampling rate!!!\n");
return -EINVAL; return -EINVAL;
} }
...@@ -1197,7 +1197,8 @@ static int hw_trn_init(struct hw *hw, const struct trn_conf *info) ...@@ -1197,7 +1197,8 @@ static int hw_trn_init(struct hw *hw, const struct trn_conf *info)
/* Set up device page table */ /* Set up device page table */
if ((~0UL) == info->vm_pgt_phys) { if ((~0UL) == info->vm_pgt_phys) {
printk(KERN_ALERT "Wrong device page table page address!!!\n"); printk(KERN_ALERT "ctxfi: "
"Wrong device page table page address!!!\n");
return -1; return -1;
} }
...@@ -1314,7 +1315,7 @@ static int hw_pll_init(struct hw *hw, unsigned int rsr) ...@@ -1314,7 +1315,7 @@ static int hw_pll_init(struct hw *hw, unsigned int rsr)
break; break;
} }
if (i >= 1000) { if (i >= 1000) {
printk(KERN_ALERT "PLL initialization failed!!!\n"); printk(KERN_ALERT "ctxfi: PLL initialization failed!!!\n");
return -EBUSY; return -EBUSY;
} }
...@@ -1338,7 +1339,7 @@ static int hw_auto_init(struct hw *hw) ...@@ -1338,7 +1339,7 @@ static int hw_auto_init(struct hw *hw)
break; break;
} }
if (!get_field(gctl, GCTL_AID)) { if (!get_field(gctl, GCTL_AID)) {
printk(KERN_ALERT "Card Auto-init failed!!!\n"); printk(KERN_ALERT "ctxfi: Card Auto-init failed!!!\n");
return -EBUSY; return -EBUSY;
} }
...@@ -1762,7 +1763,7 @@ static int hw_adc_init(struct hw *hw, const struct adc_conf *info) ...@@ -1762,7 +1763,7 @@ static int hw_adc_init(struct hw *hw, const struct adc_conf *info)
/* Initialize I2C */ /* Initialize I2C */
err = I2CInit(hw, 0x1A, 1, 1); err = I2CInit(hw, 0x1A, 1, 1);
if (err < 0) { if (err < 0) {
printk(KERN_ALERT "Failure to acquire I2C!!!\n"); printk(KERN_ALERT "ctxfi: Failure to acquire I2C!!!\n");
goto error; goto error;
} }
...@@ -1782,7 +1783,7 @@ static int hw_adc_init(struct hw *hw, const struct adc_conf *info) ...@@ -1782,7 +1783,7 @@ static int hw_adc_init(struct hw *hw, const struct adc_conf *info)
I2CWrite(hw, MAKE_WM8775_ADDR(WM8775_MMC, 0x0A), I2CWrite(hw, MAKE_WM8775_ADDR(WM8775_MMC, 0x0A),
MAKE_WM8775_DATA(0x0A)); MAKE_WM8775_DATA(0x0A));
} else { } else {
printk(KERN_ALERT "Invalid master sampling " printk(KERN_ALERT "ctxfi: Invalid master sampling "
"rate (msr %d)!!!\n", info->msr); "rate (msr %d)!!!\n", info->msr);
err = -EINVAL; err = -EINVAL;
goto error; goto error;
...@@ -1820,7 +1821,7 @@ static int hw_adc_init(struct hw *hw, const struct adc_conf *info) ...@@ -1820,7 +1821,7 @@ static int hw_adc_init(struct hw *hw, const struct adc_conf *info)
I2CWrite(hw, MAKE_WM8775_ADDR(WM8775_AADCR, 0xCF), I2CWrite(hw, MAKE_WM8775_ADDR(WM8775_AADCR, 0xCF),
MAKE_WM8775_DATA(0xCF)); /* No boost */ MAKE_WM8775_DATA(0xCF)); /* No boost */
} else { } else {
printk(KERN_ALERT "ERROR!!! Invalid input mux!!!\n"); printk(KERN_ALERT "ctxfi: ERROR!!! Invalid input mux!!!\n");
err = -EINVAL; err = -EINVAL;
goto error; goto error;
} }
...@@ -1852,7 +1853,7 @@ static int hw_card_start(struct hw *hw) ...@@ -1852,7 +1853,7 @@ static int hw_card_start(struct hw *hw)
dma_mask = CT_XFI_DMA_MASK; dma_mask = CT_XFI_DMA_MASK;
if (pci_set_dma_mask(pci, dma_mask) < 0 || if (pci_set_dma_mask(pci, dma_mask) < 0 ||
pci_set_consistent_dma_mask(pci, dma_mask) < 0) { pci_set_consistent_dma_mask(pci, dma_mask) < 0) {
printk(KERN_ERR "architecture does not support PCI " printk(KERN_ERR "ctxfi: architecture does not support PCI "
"busmaster DMA with mask 0x%x\n", dma_mask); "busmaster DMA with mask 0x%x\n", dma_mask);
err = -ENXIO; err = -ENXIO;
goto error1; goto error1;
......
...@@ -760,7 +760,7 @@ static int ct_mixer_get_resources(struct ct_mixer *mixer) ...@@ -760,7 +760,7 @@ static int ct_mixer_get_resources(struct ct_mixer *mixer)
for (i = 0; i < (NUM_CT_SUMS * CHN_NUM); i++) { for (i = 0; i < (NUM_CT_SUMS * CHN_NUM); i++) {
err = sum_mgr->get_sum(sum_mgr, &sum_desc, &sum); err = sum_mgr->get_sum(sum_mgr, &sum_desc, &sum);
if (err) { if (err) {
printk(KERN_ERR "Failed to get sum resources for " printk(KERN_ERR "ctxfi:Failed to get sum resources for "
"front output!\n"); "front output!\n");
break; break;
} }
...@@ -775,8 +775,8 @@ static int ct_mixer_get_resources(struct ct_mixer *mixer) ...@@ -775,8 +775,8 @@ static int ct_mixer_get_resources(struct ct_mixer *mixer)
for (i = 0; i < (NUM_CT_AMIXERS * CHN_NUM); i++) { for (i = 0; i < (NUM_CT_AMIXERS * CHN_NUM); i++) {
err = amixer_mgr->get_amixer(amixer_mgr, &am_desc, &amixer); err = amixer_mgr->get_amixer(amixer_mgr, &am_desc, &amixer);
if (err) { if (err) {
printk(KERN_ERR "Failed to get amixer resources for " printk(KERN_ERR "ctxfi:Failed to get amixer resources "
"mixer obj!\n"); "for mixer obj!\n");
break; break;
} }
mixer->amixers[i] = amixer; mixer->amixers[i] = amixer;
......
...@@ -284,7 +284,7 @@ static int ct_pcm_playback_prepare(struct snd_pcm_substream *substream) ...@@ -284,7 +284,7 @@ static int ct_pcm_playback_prepare(struct snd_pcm_substream *substream)
err = atc->pcm_playback_prepare(atc, apcm); err = atc->pcm_playback_prepare(atc, apcm);
if (err < 0) { if (err < 0) {
printk(KERN_ERR "Preparing pcm playback failed!!!\n"); printk(KERN_ERR "ctxfi: Preparing pcm playback failed!!!\n");
return err; return err;
} }
...@@ -389,7 +389,7 @@ static int ct_pcm_capture_prepare(struct snd_pcm_substream *substream) ...@@ -389,7 +389,7 @@ static int ct_pcm_capture_prepare(struct snd_pcm_substream *substream)
err = atc->pcm_capture_prepare(atc, apcm); err = atc->pcm_capture_prepare(atc, apcm);
if (err < 0) { if (err < 0) {
printk(KERN_ERR "Preparing pcm capture failed!!!\n"); printk(KERN_ERR "ctxfi: Preparing pcm capture failed!!!\n");
return err; return err;
} }
...@@ -477,7 +477,7 @@ int ct_alsa_pcm_create(struct ct_atc *atc, ...@@ -477,7 +477,7 @@ int ct_alsa_pcm_create(struct ct_atc *atc,
err = snd_pcm_new(atc->card, name, device, err = snd_pcm_new(atc->card, name, device,
playback_count, capture_count, &pcm); playback_count, capture_count, &pcm);
if (err < 0) { if (err < 0) {
printk(KERN_ERR "snd_pcm_new failed!! Err=%d\n", err); printk(KERN_ERR "ctxfi: snd_pcm_new failed!! Err=%d\n", err);
return err; return err;
} }
......
...@@ -162,12 +162,14 @@ int rsc_init(struct rsc *rsc, u32 idx, enum RSCTYP type, u32 msr, void *hw) ...@@ -162,12 +162,14 @@ int rsc_init(struct rsc *rsc, u32 idx, enum RSCTYP type, u32 msr, void *hw)
case DAIO: case DAIO:
break; break;
default: default:
printk(KERN_ERR "Invalid resource type value %d!\n", type); printk(KERN_ERR
"ctxfi: Invalid resource type value %d!\n", type);
return -EINVAL; return -EINVAL;
} }
if (err) { if (err) {
printk(KERN_ERR "Failed to get resource control block!\n"); printk(KERN_ERR
"ctxfi: Failed to get resource control block!\n");
return err; return err;
} }
...@@ -190,8 +192,8 @@ int rsc_uninit(struct rsc *rsc) ...@@ -190,8 +192,8 @@ int rsc_uninit(struct rsc *rsc)
case DAIO: case DAIO:
break; break;
default: default:
printk(KERN_ERR "Invalid resource type value %d!\n", printk(KERN_ERR "ctxfi: "
rsc->type); "Invalid resource type value %d!\n", rsc->type);
break; break;
} }
...@@ -233,13 +235,15 @@ int rsc_mgr_init(struct rsc_mgr *mgr, enum RSCTYP type, ...@@ -233,13 +235,15 @@ int rsc_mgr_init(struct rsc_mgr *mgr, enum RSCTYP type,
case SUM: case SUM:
break; break;
default: default:
printk(KERN_ERR "Invalid resource type value %d!\n", type); printk(KERN_ERR
"ctxfi: Invalid resource type value %d!\n", type);
err = -EINVAL; err = -EINVAL;
goto error; goto error;
} }
if (err) { if (err) {
printk(KERN_ERR "Failed to get manager control block!\n"); printk(KERN_ERR
"ctxfi: Failed to get manager control block!\n");
goto error; goto error;
} }
...@@ -282,8 +286,8 @@ int rsc_mgr_uninit(struct rsc_mgr *mgr) ...@@ -282,8 +286,8 @@ int rsc_mgr_uninit(struct rsc_mgr *mgr)
case SUM: case SUM:
break; break;
default: default:
printk(KERN_ERR "Invalid resource type value %d!\n", printk(KERN_ERR "ctxfi: "
mgr->type); "Invalid resource type value %d!\n", mgr->type);
break; break;
} }
......
...@@ -431,7 +431,7 @@ get_src_rsc(struct src_mgr *mgr, const struct src_desc *desc, struct src **rsrc) ...@@ -431,7 +431,7 @@ get_src_rsc(struct src_mgr *mgr, const struct src_desc *desc, struct src **rsrc)
spin_unlock_irqrestore(&mgr->mgr_lock, flags); spin_unlock_irqrestore(&mgr->mgr_lock, flags);
if (err) { if (err) {
printk(KERN_ERR "Can't meet SRC resource request!\n"); printk(KERN_ERR "ctxfi: Can't meet SRC resource request!\n");
return err; return err;
} }
...@@ -740,7 +740,7 @@ static int get_srcimp_rsc(struct srcimp_mgr *mgr, ...@@ -740,7 +740,7 @@ static int get_srcimp_rsc(struct srcimp_mgr *mgr,
} }
spin_unlock_irqrestore(&mgr->mgr_lock, flags); spin_unlock_irqrestore(&mgr->mgr_lock, flags);
if (err) { if (err) {
printk(KERN_ERR "Can't meet SRCIMP resource request!\n"); printk(KERN_ERR "ctxfi: Can't meet SRCIMP resource request!\n");
goto error1; goto error1;
} }
......
...@@ -121,12 +121,13 @@ ct_vm_map(struct ct_vm *vm, void *host_addr, int size) ...@@ -121,12 +121,13 @@ ct_vm_map(struct ct_vm *vm, void *host_addr, int size)
/* do mapping */ /* do mapping */
if ((unsigned long)host_addr >= VMALLOC_START) { if ((unsigned long)host_addr >= VMALLOC_START) {
printk(KERN_ERR "Fail! Not support vmalloced addr now!\n"); printk(KERN_ERR "ctxfi: "
"Fail! Not support vmalloced addr now!\n");
return NULL; return NULL;
} }
if (size > vm->size) { if (size > vm->size) {
printk(KERN_ERR "Fail! No sufficient device virtural " printk(KERN_ERR "ctxfi: Fail! No sufficient device virtural "
"memory space available!\n"); "memory space available!\n");
return NULL; return NULL;
} }
...@@ -139,7 +140,7 @@ ct_vm_map(struct ct_vm *vm, void *host_addr, int size) ...@@ -139,7 +140,7 @@ ct_vm_map(struct ct_vm *vm, void *host_addr, int size)
block = get_vm_block(vm, (pages << PAGE_SHIFT)); block = get_vm_block(vm, (pages << PAGE_SHIFT));
if (block == NULL) { if (block == NULL) {
printk(KERN_ERR "No virtual memory block that is big " printk(KERN_ERR "ctxfi: No virtual memory block that is big "
"enough to allocate!\n"); "enough to allocate!\n");
return NULL; return NULL;
} }
......
...@@ -57,16 +57,17 @@ ct_card_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) ...@@ -57,16 +57,17 @@ ct_card_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
if (err) if (err)
return err; return err;
if ((reference_rate != 48000) && (reference_rate != 44100)) { if ((reference_rate != 48000) && (reference_rate != 44100)) {
printk(KERN_ERR "Invalid reference_rate value %u!!!\n" printk(KERN_ERR "ctxfi: Invalid reference_rate value %u!!!\n",
"The valid values for reference_rate " reference_rate);
"are 48000 and 44100.\nValue 48000 is " printk(KERN_ERR "ctxfi: The valid values for reference_rate "
"assumed.\n", reference_rate); "are 48000 and 44100, Value 48000 is assumed.\n");
reference_rate = 48000; reference_rate = 48000;
} }
if ((multiple != 1) && (multiple != 2)) { if ((multiple != 1) && (multiple != 2)) {
printk(KERN_ERR "Invalid multiple value %u!!!\nThe valid " printk(KERN_ERR "ctxfi: Invalid multiple value %u!!!\n",
"values for multiple are 1 and 2.\nValue 2 " multiple);
"is assumed.\n", multiple); printk(KERN_ERR "ctxfi: The valid values for multiple are "
"1 and 2, Value 2 is assumed.\n");
multiple = 2; multiple = 2;
} }
err = ct_atc_create(card, pci, reference_rate, multiple, &atc); err = ct_atc_create(card, pci, reference_rate, multiple, &atc);
......
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