ALSA: vxpocket: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked one. It gives better information and allows dynamically control of debug prints. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20240807133452.9424-48-tiwai@suse.de
This commit is contained in:
parent
c7e58049a2
commit
2acbb5e572
@ -84,7 +84,7 @@ static int vx_check_magic(struct vx_core *chip)
|
||||
return 0;
|
||||
msleep(10);
|
||||
} while (time_after_eq(end_time, jiffies));
|
||||
snd_printk(KERN_ERR "cannot find xilinx magic word (%x)\n", c);
|
||||
dev_err(chip->card->dev, "cannot find xilinx magic word (%x)\n", c);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@ -153,7 +153,6 @@ static int vxp_load_xilinx_binary(struct vx_core *_chip, const struct firmware *
|
||||
vx_outb(chip, ICR, 0);
|
||||
|
||||
/* Wait for answer HF2 equal to 1 */
|
||||
snd_printdd(KERN_DEBUG "check ISR_HF2\n");
|
||||
if (vx_check_isr(_chip, ISR_HF2, ISR_HF2, 20) < 0)
|
||||
goto _error;
|
||||
|
||||
@ -170,7 +169,9 @@ static int vxp_load_xilinx_binary(struct vx_core *_chip, const struct firmware *
|
||||
goto _error;
|
||||
c = vx_inb(chip, RXL);
|
||||
if (c != (int)data)
|
||||
snd_printk(KERN_ERR "vxpocket: load xilinx mismatch at %d: 0x%x != 0x%x\n", i, c, (int)data);
|
||||
dev_err(_chip->card->dev,
|
||||
"vxpocket: load xilinx mismatch at %d: 0x%x != 0x%x\n",
|
||||
i, c, (int)data);
|
||||
}
|
||||
|
||||
/* reset HF1 */
|
||||
@ -188,7 +189,8 @@ static int vxp_load_xilinx_binary(struct vx_core *_chip, const struct firmware *
|
||||
c |= (int)vx_inb(chip, RXM) << 8;
|
||||
c |= vx_inb(chip, RXL);
|
||||
|
||||
snd_printdd(KERN_DEBUG "xilinx: dsp size received 0x%x, orig 0x%zx\n", c, fw->size);
|
||||
dev_dbg(_chip->card->dev,
|
||||
"xilinx: dsp size received 0x%x, orig 0x%zx\n", c, fw->size);
|
||||
|
||||
vx_outb(chip, ICR, ICR_HF0);
|
||||
|
||||
|
@ -151,7 +151,8 @@ static int snd_vxpocket_assign_resources(struct vx_core *chip, int port, int irq
|
||||
struct snd_card *card = chip->card;
|
||||
struct snd_vxpocket *vxp = to_vxpocket(chip);
|
||||
|
||||
snd_printdd(KERN_DEBUG "vxpocket assign resources: port = 0x%x, irq = %d\n", port, irq);
|
||||
dev_dbg(chip->card->dev,
|
||||
"vxpocket assign resources: port = 0x%x, irq = %d\n", port, irq);
|
||||
vxp->port = port;
|
||||
|
||||
sprintf(card->shortname, "Digigram %s", card->driver);
|
||||
@ -178,13 +179,11 @@ static int vxpocket_config(struct pcmcia_device *link)
|
||||
struct vx_core *chip = link->priv;
|
||||
int ret;
|
||||
|
||||
snd_printdd(KERN_DEBUG "vxpocket_config called\n");
|
||||
|
||||
/* redefine hardware record according to the VERSION1 string */
|
||||
if (!strcmp(link->prod_id[1], "VX-POCKET")) {
|
||||
snd_printdd("VX-pocket is detected\n");
|
||||
dev_dbg(chip->card->dev, "VX-pocket is detected\n");
|
||||
} else {
|
||||
snd_printdd("VX-pocket 440 is detected\n");
|
||||
dev_dbg(chip->card->dev, "VX-pocket 440 is detected\n");
|
||||
/* overwrite the hardware information */
|
||||
chip->hw = &vxp440_hw;
|
||||
chip->type = vxp440_hw.type;
|
||||
@ -226,11 +225,8 @@ static int vxp_suspend(struct pcmcia_device *link)
|
||||
{
|
||||
struct vx_core *chip = link->priv;
|
||||
|
||||
snd_printdd(KERN_DEBUG "SUSPEND\n");
|
||||
if (chip) {
|
||||
snd_printdd(KERN_DEBUG "snd_vx_suspend calling\n");
|
||||
if (chip)
|
||||
snd_vx_suspend(chip);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -239,15 +235,10 @@ static int vxp_resume(struct pcmcia_device *link)
|
||||
{
|
||||
struct vx_core *chip = link->priv;
|
||||
|
||||
snd_printdd(KERN_DEBUG "RESUME\n");
|
||||
if (pcmcia_dev_present(link)) {
|
||||
//struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
|
||||
if (chip) {
|
||||
snd_printdd(KERN_DEBUG "calling snd_vx_resume\n");
|
||||
if (chip)
|
||||
snd_vx_resume(chip);
|
||||
}
|
||||
}
|
||||
snd_printdd(KERN_DEBUG "resume done!\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -269,7 +260,7 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
|
||||
break;
|
||||
}
|
||||
if (i >= SNDRV_CARDS) {
|
||||
snd_printk(KERN_ERR "vxpocket: too many cards found\n");
|
||||
dev_err(&p_dev->dev, "vxpocket: too many cards found\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (! enable[i])
|
||||
@ -279,7 +270,7 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
|
||||
err = snd_card_new(&p_dev->dev, index[i], id[i], THIS_MODULE,
|
||||
0, &card);
|
||||
if (err < 0) {
|
||||
snd_printk(KERN_ERR "vxpocket: cannot create a card instance\n");
|
||||
dev_err(&pdev->dev, "vxpocket: cannot create a card instance\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user