aboutsummaryrefslogtreecommitdiff
path: root/sound/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/i2c')
-rw-r--r--sound/i2c/cs8427.c17
-rw-r--r--sound/i2c/other/ak4114.c6
-rw-r--r--sound/i2c/other/ak4117.c8
-rw-r--r--sound/i2c/tea6330t.c2
4 files changed, 16 insertions, 17 deletions
diff --git a/sound/i2c/cs8427.c b/sound/i2c/cs8427.c
index a21f7d541f8..1a05cfbdc7c 100644
--- a/sound/i2c/cs8427.c
+++ b/sound/i2c/cs8427.c
@@ -75,7 +75,7 @@ int snd_cs8427_reg_write(snd_i2c_device_t *device, unsigned char reg, unsigned c
buf[0] = reg & 0x7f;
buf[1] = val;
if ((err = snd_i2c_sendbytes(device, buf, 2)) != 2) {
- snd_printk("unable to send bytes 0x%02x:0x%02x to CS8427 (%i)\n", buf[0], buf[1], err);
+ snd_printk(KERN_ERR "unable to send bytes 0x%02x:0x%02x to CS8427 (%i)\n", buf[0], buf[1], err);
return err < 0 ? err : -EIO;
}
return 0;
@@ -87,11 +87,11 @@ static int snd_cs8427_reg_read(snd_i2c_device_t *device, unsigned char reg)
unsigned char buf;
if ((err = snd_i2c_sendbytes(device, &reg, 1)) != 1) {
- snd_printk("unable to send register 0x%x byte to CS8427\n", reg);
+ snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg);
return err < 0 ? err : -EIO;
}
if ((err = snd_i2c_readbytes(device, &buf, 1)) != 1) {
- snd_printk("unable to read register 0x%x byte from CS8427\n", reg);
+ snd_printk(KERN_ERR "unable to read register 0x%x byte from CS8427\n", reg);
return err < 0 ? err : -EIO;
}
return buf;
@@ -210,7 +210,7 @@ int snd_cs8427_create(snd_i2c_bus_t *bus,
snd_i2c_lock(bus);
if ((err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER)) != CS8427_VER8427A) {
snd_i2c_unlock(bus);
- snd_printk("unable to find CS8427 signature (expected 0x%x, read 0x%x), initialization is not completed\n", CS8427_VER8427A, err);
+ snd_printk(KERN_ERR "unable to find CS8427 signature (expected 0x%x, read 0x%x), initialization is not completed\n", CS8427_VER8427A, err);
return -EFAULT;
}
/* turn off run bit while making changes to configuration */
@@ -260,7 +260,7 @@ int snd_cs8427_create(snd_i2c_bus_t *bus,
snd_i2c_sendbytes(device, buf, 1);
snd_i2c_readbytes(device, buf, 127);
for (xx = 0; xx < 127; xx++)
- printk("reg[0x%x] = 0x%x\n", xx+1, buf[xx]);
+ printk(KERN_DEBUG "reg[0x%x] = 0x%x\n", xx+1, buf[xx]);
}
#endif
@@ -302,8 +302,7 @@ static void snd_cs8427_reset(snd_i2c_device_t *cs8427)
snd_i2c_unlock(cs8427->bus);
if (!(data & CS8427_UNLOCK))
break;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
snd_i2c_lock(cs8427->bus);
chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~CS8427_RXDMASK;
@@ -354,12 +353,12 @@ static int snd_cs8427_qsubcode_get(snd_kcontrol_t *kcontrol,
snd_i2c_lock(device->bus);
if ((err = snd_i2c_sendbytes(device, &reg, 1)) != 1) {
- snd_printk("unable to send register 0x%x byte to CS8427\n", reg);
+ snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg);
snd_i2c_unlock(device->bus);
return err < 0 ? err : -EIO;
}
if ((err = snd_i2c_readbytes(device, ucontrol->value.bytes.data, 10)) != 10) {
- snd_printk("unable to read Q-subcode bytes from CS8427\n");
+ snd_printk(KERN_ERR "unable to read Q-subcode bytes from CS8427\n");
snd_i2c_unlock(device->bus);
return err < 0 ? err : -EIO;
}
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c
index af5eadcddd9..d351b3aa191 100644
--- a/sound/i2c/other/ak4114.c
+++ b/sound/i2c/other/ak4114.c
@@ -56,9 +56,9 @@ static void reg_dump(ak4114_t *ak4114)
{
int i;
- printk("AK4114 REG DUMP:\n");
+ printk(KERN_DEBUG "AK4114 REG DUMP:\n");
for (i = 0; i < 0x20; i++)
- printk("reg[%02x] = %02x (%02x)\n", i, reg_read(ak4114, i), i < sizeof(ak4114->regmap) ? ak4114->regmap[i] : 0);
+ printk(KERN_DEBUG "reg[%02x] = %02x (%02x)\n", i, reg_read(ak4114, i), i < sizeof(ak4114->regmap) ? ak4114->regmap[i] : 0);
}
#endif
@@ -552,7 +552,7 @@ int snd_ak4114_check_rate_and_errors(ak4114_t *ak4114, unsigned int flags)
if (!(flags & AK4114_CHECK_NO_RATE) && runtime && runtime->rate != res) {
snd_pcm_stream_lock_irqsave(ak4114->capture_substream, _flags);
if (snd_pcm_running(ak4114->capture_substream)) {
- // printk("rate changed (%i <- %i)\n", runtime->rate, res);
+ // printk(KERN_DEBUG "rate changed (%i <- %i)\n", runtime->rate, res);
snd_pcm_stop(ak4114->capture_substream, SNDRV_PCM_STATE_DRAINING);
res = 1;
}
diff --git a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c
index d51b51dd86d..35b4584483a 100644
--- a/sound/i2c/other/ak4117.c
+++ b/sound/i2c/other/ak4117.c
@@ -54,9 +54,9 @@ static void reg_dump(ak4117_t *ak4117)
{
int i;
- printk("AK4117 REG DUMP:\n");
+ printk(KERN_DEBUG "AK4117 REG DUMP:\n");
for (i = 0; i < 0x1b; i++)
- printk("reg[%02x] = %02x (%02x)\n", i, reg_read(ak4117, i), i < sizeof(ak4117->regmap) ? ak4117->regmap[i] : 0);
+ printk(KERN_DEBUG "reg[%02x] = %02x (%02x)\n", i, reg_read(ak4117, i), i < sizeof(ak4117->regmap) ? ak4117->regmap[i] : 0);
}
#endif
@@ -477,7 +477,7 @@ int snd_ak4117_check_rate_and_errors(ak4117_t *ak4117, unsigned int flags)
goto __rate;
rcs0 = reg_read(ak4117, AK4117_REG_RCS0);
rcs2 = reg_read(ak4117, AK4117_REG_RCS2);
- // printk("AK IRQ: rcs0 = 0x%x, rcs1 = 0x%x, rcs2 = 0x%x\n", rcs0, rcs1, 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);
if (rcs0 & AK4117_PAR)
ak4117->parity_errors++;
@@ -530,7 +530,7 @@ int snd_ak4117_check_rate_and_errors(ak4117_t *ak4117, unsigned int flags)
if (!(flags & AK4117_CHECK_NO_RATE) && runtime && runtime->rate != res) {
snd_pcm_stream_lock_irqsave(ak4117->substream, _flags);
if (snd_pcm_running(ak4117->substream)) {
- // printk("rate changed (%i <- %i)\n", runtime->rate, res);
+ // printk(KERN_DEBUG "rate changed (%i <- %i)\n", runtime->rate, res);
snd_pcm_stop(ak4117->substream, SNDRV_PCM_STATE_DRAINING);
wake_up(&runtime->sleep);
res = 1;
diff --git a/sound/i2c/tea6330t.c b/sound/i2c/tea6330t.c
index fd65da65426..4fdd1fb57df 100644
--- a/sound/i2c/tea6330t.c
+++ b/sound/i2c/tea6330t.c
@@ -58,7 +58,7 @@ static void snd_tea6330t_set(tea6330t_t *tea,
unsigned char addr, unsigned char value)
{
#if 0
- printk("set - 0x%x/0x%x\n", addr, value);
+ printk(KERN_DEBUG "set - 0x%x/0x%x\n", addr, value);
#endif
snd_i2c_write(tea->bus, TEA6330T_ADDR, addr, value, 1);
}