diff options
Diffstat (limited to 'sound/i2c/cs8427.c')
-rw-r--r-- | sound/i2c/cs8427.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/i2c/cs8427.c b/sound/i2c/cs8427.c index 9deba80a587c..cb89f7eb9236 100644 --- a/sound/i2c/cs8427.c +++ b/sound/i2c/cs8427.c | |||
@@ -291,11 +291,13 @@ static void snd_cs8427_reset(struct snd_i2c_device *cs8427) | |||
291 | { | 291 | { |
292 | struct cs8427 *chip; | 292 | struct cs8427 *chip; |
293 | unsigned long end_time; | 293 | unsigned long end_time; |
294 | int data; | 294 | int data, aes3input = 0; |
295 | 295 | ||
296 | snd_assert(cs8427, return); | 296 | snd_assert(cs8427, return); |
297 | chip = cs8427->private_data; | 297 | chip = cs8427->private_data; |
298 | snd_i2c_lock(cs8427->bus); | 298 | snd_i2c_lock(cs8427->bus); |
299 | if ((chip->regmap[CS8427_REG_CLOCKSOURCE] & CS8427_RXDAES3INPUT) == CS8427_RXDAES3INPUT) /* AES3 bit is set */ | ||
300 | aes3input = 1; | ||
299 | chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~(CS8427_RUN | CS8427_RXDMASK); | 301 | chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~(CS8427_RUN | CS8427_RXDMASK); |
300 | snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE, | 302 | snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE, |
301 | chip->regmap[CS8427_REG_CLOCKSOURCE]); | 303 | chip->regmap[CS8427_REG_CLOCKSOURCE]); |
@@ -316,7 +318,8 @@ static void snd_cs8427_reset(struct snd_i2c_device *cs8427) | |||
316 | } | 318 | } |
317 | snd_i2c_lock(cs8427->bus); | 319 | snd_i2c_lock(cs8427->bus); |
318 | chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~CS8427_RXDMASK; | 320 | chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~CS8427_RXDMASK; |
319 | chip->regmap[CS8427_REG_CLOCKSOURCE] |= CS8427_RXDAES3INPUT; | 321 | if (aes3input) |
322 | chip->regmap[CS8427_REG_CLOCKSOURCE] |= CS8427_RXDAES3INPUT; | ||
320 | snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE, | 323 | snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE, |
321 | chip->regmap[CS8427_REG_CLOCKSOURCE]); | 324 | chip->regmap[CS8427_REG_CLOCKSOURCE]); |
322 | snd_i2c_unlock(cs8427->bus); | 325 | snd_i2c_unlock(cs8427->bus); |