aboutsummaryrefslogtreecommitdiffstats
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 a21f7d541f86..1a05cfbdc7c6 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
75 buf[0] = reg & 0x7f; 75 buf[0] = reg & 0x7f;
76 buf[1] = val; 76 buf[1] = val;
77 if ((err = snd_i2c_sendbytes(device, buf, 2)) != 2) { 77 if ((err = snd_i2c_sendbytes(device, buf, 2)) != 2) {
78 snd_printk("unable to send bytes 0x%02x:0x%02x to CS8427 (%i)\n", buf[0], buf[1], err); 78 snd_printk(KERN_ERR "unable to send bytes 0x%02x:0x%02x to CS8427 (%i)\n", buf[0], buf[1], err);
79 return err < 0 ? err : -EIO; 79 return err < 0 ? err : -EIO;
80 } 80 }
81 return 0; 81 return 0;
@@ -87,11 +87,11 @@ static int snd_cs8427_reg_read(snd_i2c_device_t *device, unsigned char reg)
87 unsigned char buf; 87 unsigned char buf;
88 88
89 if ((err = snd_i2c_sendbytes(device, &reg, 1)) != 1) { 89 if ((err = snd_i2c_sendbytes(device, &reg, 1)) != 1) {
90 snd_printk("unable to send register 0x%x byte to CS8427\n", reg); 90 snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg);
91 return err < 0 ? err : -EIO; 91 return err < 0 ? err : -EIO;
92 } 92 }
93 if ((err = snd_i2c_readbytes(device, &buf, 1)) != 1) { 93 if ((err = snd_i2c_readbytes(device, &buf, 1)) != 1) {
94 snd_printk("unable to read register 0x%x byte from CS8427\n", reg); 94 snd_printk(KERN_ERR "unable to read register 0x%x byte from CS8427\n", reg);
95 return err < 0 ? err : -EIO; 95 return err < 0 ? err : -EIO;
96 } 96 }
97 return buf; 97 return buf;
@@ -210,7 +210,7 @@ int snd_cs8427_create(snd_i2c_bus_t *bus,
210 snd_i2c_lock(bus); 210 snd_i2c_lock(bus);
211 if ((err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER)) != CS8427_VER8427A) { 211 if ((err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER)) != CS8427_VER8427A) {
212 snd_i2c_unlock(bus); 212 snd_i2c_unlock(bus);
213 snd_printk("unable to find CS8427 signature (expected 0x%x, read 0x%x), initialization is not completed\n", CS8427_VER8427A, err); 213 snd_printk(KERN_ERR "unable to find CS8427 signature (expected 0x%x, read 0x%x), initialization is not completed\n", CS8427_VER8427A, err);
214 return -EFAULT; 214 return -EFAULT;
215 } 215 }
216 /* turn off run bit while making changes to configuration */ 216 /* turn off run bit while making changes to configuration */
@@ -260,7 +260,7 @@ int snd_cs8427_create(snd_i2c_bus_t *bus,
260 snd_i2c_sendbytes(device, buf, 1); 260 snd_i2c_sendbytes(device, buf, 1);
261 snd_i2c_readbytes(device, buf, 127); 261 snd_i2c_readbytes(device, buf, 127);
262 for (xx = 0; xx < 127; xx++) 262 for (xx = 0; xx < 127; xx++)
263 printk("reg[0x%x] = 0x%x\n", xx+1, buf[xx]); 263 printk(KERN_DEBUG "reg[0x%x] = 0x%x\n", xx+1, buf[xx]);
264 } 264 }
265#endif 265#endif
266 266
@@ -302,8 +302,7 @@ static void snd_cs8427_reset(snd_i2c_device_t *cs8427)
302 snd_i2c_unlock(cs8427->bus); 302 snd_i2c_unlock(cs8427->bus);
303 if (!(data & CS8427_UNLOCK)) 303 if (!(data & CS8427_UNLOCK))
304 break; 304 break;
305 set_current_state(TASK_UNINTERRUPTIBLE); 305 schedule_timeout_uninterruptible(1);
306 schedule_timeout(1);
307 } 306 }
308 snd_i2c_lock(cs8427->bus); 307 snd_i2c_lock(cs8427->bus);
309 chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~CS8427_RXDMASK; 308 chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~CS8427_RXDMASK;
@@ -354,12 +353,12 @@ static int snd_cs8427_qsubcode_get(snd_kcontrol_t *kcontrol,
354 353
355 snd_i2c_lock(device->bus); 354 snd_i2c_lock(device->bus);
356 if ((err = snd_i2c_sendbytes(device, &reg, 1)) != 1) { 355 if ((err = snd_i2c_sendbytes(device, &reg, 1)) != 1) {
357 snd_printk("unable to send register 0x%x byte to CS8427\n", reg); 356 snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg);
358 snd_i2c_unlock(device->bus); 357 snd_i2c_unlock(device->bus);
359 return err < 0 ? err : -EIO; 358 return err < 0 ? err : -EIO;
360 } 359 }
361 if ((err = snd_i2c_readbytes(device, ucontrol->value.bytes.data, 10)) != 10) { 360 if ((err = snd_i2c_readbytes(device, ucontrol->value.bytes.data, 10)) != 10) {
362 snd_printk("unable to read Q-subcode bytes from CS8427\n"); 361 snd_printk(KERN_ERR "unable to read Q-subcode bytes from CS8427\n");
363 snd_i2c_unlock(device->bus); 362 snd_i2c_unlock(device->bus);
364 return err < 0 ? err : -EIO; 363 return err < 0 ? err : -EIO;
365 } 364 }
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c
index af5eadcddd92..d351b3aa1916 100644
--- a/sound/i2c/other/ak4114.c
+++ b/sound/i2c/other/ak4114.c
@@ -56,9 +56,9 @@ static void reg_dump(ak4114_t *ak4114)
56{ 56{
57 int i; 57 int i;
58 58
59 printk("AK4114 REG DUMP:\n"); 59 printk(KERN_DEBUG "AK4114 REG DUMP:\n");
60 for (i = 0; i < 0x20; i++) 60 for (i = 0; i < 0x20; i++)
61 printk("reg[%02x] = %02x (%02x)\n", i, reg_read(ak4114, i), i < sizeof(ak4114->regmap) ? ak4114->regmap[i] : 0); 61 printk(KERN_DEBUG "reg[%02x] = %02x (%02x)\n", i, reg_read(ak4114, i), i < sizeof(ak4114->regmap) ? ak4114->regmap[i] : 0);
62} 62}
63#endif 63#endif
64 64
@@ -552,7 +552,7 @@ int snd_ak4114_check_rate_and_errors(ak4114_t *ak4114, unsigned int flags)
552 if (!(flags & AK4114_CHECK_NO_RATE) && runtime && runtime->rate != res) { 552 if (!(flags & AK4114_CHECK_NO_RATE) && runtime && runtime->rate != res) {
553 snd_pcm_stream_lock_irqsave(ak4114->capture_substream, _flags); 553 snd_pcm_stream_lock_irqsave(ak4114->capture_substream, _flags);
554 if (snd_pcm_running(ak4114->capture_substream)) { 554 if (snd_pcm_running(ak4114->capture_substream)) {
555 // printk("rate changed (%i <- %i)\n", runtime->rate, res); 555 // printk(KERN_DEBUG "rate changed (%i <- %i)\n", runtime->rate, res);
556 snd_pcm_stop(ak4114->capture_substream, SNDRV_PCM_STATE_DRAINING); 556 snd_pcm_stop(ak4114->capture_substream, SNDRV_PCM_STATE_DRAINING);
557 res = 1; 557 res = 1;
558 } 558 }
diff --git a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c
index d51b51dd86d6..35b4584483a3 100644
--- a/sound/i2c/other/ak4117.c
+++ b/sound/i2c/other/ak4117.c
@@ -54,9 +54,9 @@ static void reg_dump(ak4117_t *ak4117)
54{ 54{
55 int i; 55 int i;
56 56
57 printk("AK4117 REG DUMP:\n"); 57 printk(KERN_DEBUG "AK4117 REG DUMP:\n");
58 for (i = 0; i < 0x1b; i++) 58 for (i = 0; i < 0x1b; i++)
59 printk("reg[%02x] = %02x (%02x)\n", i, reg_read(ak4117, i), i < sizeof(ak4117->regmap) ? ak4117->regmap[i] : 0); 59 printk(KERN_DEBUG "reg[%02x] = %02x (%02x)\n", i, reg_read(ak4117, i), i < sizeof(ak4117->regmap) ? ak4117->regmap[i] : 0);
60} 60}
61#endif 61#endif
62 62
@@ -477,7 +477,7 @@ int snd_ak4117_check_rate_and_errors(ak4117_t *ak4117, unsigned int flags)
477 goto __rate; 477 goto __rate;
478 rcs0 = reg_read(ak4117, AK4117_REG_RCS0); 478 rcs0 = reg_read(ak4117, AK4117_REG_RCS0);
479 rcs2 = reg_read(ak4117, AK4117_REG_RCS2); 479 rcs2 = reg_read(ak4117, AK4117_REG_RCS2);
480 // printk("AK IRQ: rcs0 = 0x%x, rcs1 = 0x%x, rcs2 = 0x%x\n", rcs0, rcs1, rcs2); 480 // printk(KERN_DEBUG "AK IRQ: rcs0 = 0x%x, rcs1 = 0x%x, rcs2 = 0x%x\n", rcs0, rcs1, rcs2);
481 spin_lock_irqsave(&ak4117->lock, _flags); 481 spin_lock_irqsave(&ak4117->lock, _flags);
482 if (rcs0 & AK4117_PAR) 482 if (rcs0 & AK4117_PAR)
483 ak4117->parity_errors++; 483 ak4117->parity_errors++;
@@ -530,7 +530,7 @@ int snd_ak4117_check_rate_and_errors(ak4117_t *ak4117, unsigned int flags)
530 if (!(flags & AK4117_CHECK_NO_RATE) && runtime && runtime->rate != res) { 530 if (!(flags & AK4117_CHECK_NO_RATE) && runtime && runtime->rate != res) {
531 snd_pcm_stream_lock_irqsave(ak4117->substream, _flags); 531 snd_pcm_stream_lock_irqsave(ak4117->substream, _flags);
532 if (snd_pcm_running(ak4117->substream)) { 532 if (snd_pcm_running(ak4117->substream)) {
533 // printk("rate changed (%i <- %i)\n", runtime->rate, res); 533 // printk(KERN_DEBUG "rate changed (%i <- %i)\n", runtime->rate, res);
534 snd_pcm_stop(ak4117->substream, SNDRV_PCM_STATE_DRAINING); 534 snd_pcm_stop(ak4117->substream, SNDRV_PCM_STATE_DRAINING);
535 wake_up(&runtime->sleep); 535 wake_up(&runtime->sleep);
536 res = 1; 536 res = 1;
diff --git a/sound/i2c/tea6330t.c b/sound/i2c/tea6330t.c
index fd65da654267..4fdd1fb57dfe 100644
--- a/sound/i2c/tea6330t.c
+++ b/sound/i2c/tea6330t.c
@@ -58,7 +58,7 @@ static void snd_tea6330t_set(tea6330t_t *tea,
58 unsigned char addr, unsigned char value) 58 unsigned char addr, unsigned char value)
59{ 59{
60#if 0 60#if 0
61 printk("set - 0x%x/0x%x\n", addr, value); 61 printk(KERN_DEBUG "set - 0x%x/0x%x\n", addr, value);
62#endif 62#endif
63 snd_i2c_write(tea->bus, TEA6330T_ADDR, addr, value, 1); 63 snd_i2c_write(tea->bus, TEA6330T_ADDR, addr, value, 1);
64} 64}