mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-09-21 12:11:49 +08:00
ALSA: i2c: Drop commented old debug prints
There are quite a few commented-out debug prints that have never been used in the production code. Let's rip them off for code cleanness. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20240807133452.9424-18-tiwai@suse.de
This commit is contained in:
parent
1ac6352e50
commit
ae1873eeb8
@ -599,8 +599,6 @@ __rate:
|
|||||||
(runtime->rate != res)) {
|
(runtime->rate != res)) {
|
||||||
snd_pcm_stream_lock_irqsave(ak4113->substream, _flags);
|
snd_pcm_stream_lock_irqsave(ak4113->substream, _flags);
|
||||||
if (snd_pcm_running(ak4113->substream)) {
|
if (snd_pcm_running(ak4113->substream)) {
|
||||||
/*printk(KERN_DEBUG "rate changed (%i <- %i)\n",
|
|
||||||
* runtime->rate, res); */
|
|
||||||
snd_pcm_stop(ak4113->substream,
|
snd_pcm_stop(ak4113->substream,
|
||||||
SNDRV_PCM_STATE_DRAINING);
|
SNDRV_PCM_STATE_DRAINING);
|
||||||
wake_up(&runtime->sleep);
|
wake_up(&runtime->sleep);
|
||||||
|
@ -38,17 +38,6 @@ static inline unsigned char reg_read(struct ak4114 *ak4114, unsigned char reg)
|
|||||||
return ak4114->read(ak4114->private_data, reg);
|
return ak4114->read(ak4114->private_data, reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void reg_dump(struct ak4114 *ak4114)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
printk(KERN_DEBUG "AK4114 REG DUMP:\n");
|
|
||||||
for (i = 0; i < 0x20; i++)
|
|
||||||
printk(KERN_DEBUG "reg[%02x] = %02x (%02x)\n", i, reg_read(ak4114, i), i < ARRAY_SIZE(ak4114->regmap) ? ak4114->regmap[i] : 0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void snd_ak4114_free(struct ak4114 *chip)
|
static void snd_ak4114_free(struct ak4114 *chip)
|
||||||
{
|
{
|
||||||
atomic_inc(&chip->wq_processing); /* don't schedule new work */
|
atomic_inc(&chip->wq_processing); /* don't schedule new work */
|
||||||
@ -589,7 +578,6 @@ int snd_ak4114_check_rate_and_errors(struct ak4114 *ak4114, unsigned int flags)
|
|||||||
if (!(flags & AK4114_CHECK_NO_RATE) && runtime && runtime->rate != res) {
|
if (!(flags & AK4114_CHECK_NO_RATE) && runtime && runtime->rate != res) {
|
||||||
snd_pcm_stream_lock_irqsave(ak4114->capture_substream, _flags);
|
snd_pcm_stream_lock_irqsave(ak4114->capture_substream, _flags);
|
||||||
if (snd_pcm_running(ak4114->capture_substream)) {
|
if (snd_pcm_running(ak4114->capture_substream)) {
|
||||||
// printk(KERN_DEBUG "rate changed (%i <- %i)\n", runtime->rate, res);
|
|
||||||
snd_pcm_stop(ak4114->capture_substream, SNDRV_PCM_STATE_DRAINING);
|
snd_pcm_stop(ak4114->capture_substream, SNDRV_PCM_STATE_DRAINING);
|
||||||
res = 1;
|
res = 1;
|
||||||
}
|
}
|
||||||
|
@ -34,17 +34,6 @@ static inline unsigned char reg_read(struct ak4117 *ak4117, unsigned char reg)
|
|||||||
return ak4117->read(ak4117->private_data, reg);
|
return ak4117->read(ak4117->private_data, reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void reg_dump(struct ak4117 *ak4117)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
printk(KERN_DEBUG "AK4117 REG DUMP:\n");
|
|
||||||
for (i = 0; i < 0x1b; i++)
|
|
||||||
printk(KERN_DEBUG "reg[%02x] = %02x (%02x)\n", i, reg_read(ak4117, i), i < sizeof(ak4117->regmap) ? ak4117->regmap[i] : 0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void snd_ak4117_free(struct ak4117 *chip)
|
static void snd_ak4117_free(struct ak4117 *chip)
|
||||||
{
|
{
|
||||||
timer_shutdown_sync(&chip->timer);
|
timer_shutdown_sync(&chip->timer);
|
||||||
@ -452,7 +441,6 @@ int snd_ak4117_check_rate_and_errors(struct ak4117 *ak4117, unsigned int flags)
|
|||||||
goto __rate;
|
goto __rate;
|
||||||
rcs0 = reg_read(ak4117, AK4117_REG_RCS0);
|
rcs0 = reg_read(ak4117, AK4117_REG_RCS0);
|
||||||
rcs2 = reg_read(ak4117, AK4117_REG_RCS2);
|
rcs2 = reg_read(ak4117, AK4117_REG_RCS2);
|
||||||
// printk(KERN_DEBUG "AK IRQ: rcs0 = 0x%x, rcs1 = 0x%x, rcs2 = 0x%x\n", rcs0, rcs1, rcs2);
|
|
||||||
spin_lock_irqsave(&ak4117->lock, _flags);
|
spin_lock_irqsave(&ak4117->lock, _flags);
|
||||||
if (rcs0 & AK4117_PAR)
|
if (rcs0 & AK4117_PAR)
|
||||||
ak4117->errors[AK4117_PARITY_ERRORS]++;
|
ak4117->errors[AK4117_PARITY_ERRORS]++;
|
||||||
@ -505,7 +493,6 @@ int snd_ak4117_check_rate_and_errors(struct ak4117 *ak4117, unsigned int flags)
|
|||||||
if (!(flags & AK4117_CHECK_NO_RATE) && runtime && runtime->rate != res) {
|
if (!(flags & AK4117_CHECK_NO_RATE) && runtime && runtime->rate != res) {
|
||||||
snd_pcm_stream_lock_irqsave(ak4117->substream, _flags);
|
snd_pcm_stream_lock_irqsave(ak4117->substream, _flags);
|
||||||
if (snd_pcm_running(ak4117->substream)) {
|
if (snd_pcm_running(ak4117->substream)) {
|
||||||
// printk(KERN_DEBUG "rate changed (%i <- %i)\n", runtime->rate, res);
|
|
||||||
snd_pcm_stop(ak4117->substream, SNDRV_PCM_STATE_DRAINING);
|
snd_pcm_stop(ak4117->substream, SNDRV_PCM_STATE_DRAINING);
|
||||||
wake_up(&runtime->sleep);
|
wake_up(&runtime->sleep);
|
||||||
res = 1;
|
res = 1;
|
||||||
|
@ -391,8 +391,6 @@ static int put_ak_reg(struct snd_kcontrol *kcontrol, int addr,
|
|||||||
nval = mask - nval;
|
nval = mask - nval;
|
||||||
if (AK_GET_NEEDSMSB(kcontrol->private_value))
|
if (AK_GET_NEEDSMSB(kcontrol->private_value))
|
||||||
nval |= 0x80;
|
nval |= 0x80;
|
||||||
/* printk(KERN_DEBUG "DEBUG - AK writing reg: chip %x addr %x,
|
|
||||||
nval %x\n", chip, addr, nval); */
|
|
||||||
snd_akm4xxx_write(ak, chip, addr, nval);
|
snd_akm4xxx_write(ak, chip, addr, nval);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -56,9 +56,6 @@ int snd_tea6330t_detect(struct snd_i2c_bus *bus, int equalizer)
|
|||||||
static void snd_tea6330t_set(struct tea6330t *tea,
|
static void snd_tea6330t_set(struct tea6330t *tea,
|
||||||
unsigned char addr, unsigned char value)
|
unsigned char addr, unsigned char value)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
printk(KERN_DEBUG "set - 0x%x/0x%x\n", addr, value);
|
|
||||||
#endif
|
|
||||||
snd_i2c_write(tea->bus, TEA6330T_ADDR, addr, value, 1);
|
snd_i2c_write(tea->bus, TEA6330T_ADDR, addr, value, 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user