diff options
Diffstat (limited to 'sound/i2c/cs8427.c')
-rw-r--r-- | sound/i2c/cs8427.c | 17 |
1 files changed, 8 insertions, 9 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, ®, 1)) != 1) { | 89 | if ((err = snd_i2c_sendbytes(device, ®, 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, ®, 1)) != 1) { | 355 | if ((err = snd_i2c_sendbytes(device, ®, 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 | } |