diff options
author | Timur Tabi <timur@freescale.com> | 2008-08-07 12:22:32 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-10-30 11:54:11 -0400 |
commit | 0c235d1e837c142b7565814318b6ba5917d5ac32 (patch) | |
tree | 5b9d136a7840ffeb91022fbb7c70de9d7b0a1d17 | |
parent | ca53fb24dd21bff32c4b41b2be1035a1adfc0135 (diff) |
ASoC: Disable automatic volume control in the CS4270 sound driver
Disable the automatic volume control feature of the CS4270 audio codec. This
feature, which is enabled by default, causes volume change commands to be
delayed. Sometimes the volume change happens after playback is started.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/codecs/cs4270.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index 0bbd94501d7e..0ff476d7057c 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c | |||
@@ -450,6 +450,19 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream, | |||
450 | return ret; | 450 | return ret; |
451 | } | 451 | } |
452 | 452 | ||
453 | /* Disable automatic volume control. It's enabled by default, and | ||
454 | * it causes volume change commands to be delayed, sometimes until | ||
455 | * after playback has started. | ||
456 | */ | ||
457 | |||
458 | reg = cs4270_read_reg_cache(codec, CS4270_TRANS); | ||
459 | reg &= ~(CS4270_TRANS_SOFT | CS4270_TRANS_ZERO); | ||
460 | ret = cs4270_i2c_write(codec, CS4270_TRANS, reg); | ||
461 | if (ret < 0) { | ||
462 | printk(KERN_ERR "I2C write failed\n"); | ||
463 | return ret; | ||
464 | } | ||
465 | |||
453 | /* Thaw and power-up the codec */ | 466 | /* Thaw and power-up the codec */ |
454 | 467 | ||
455 | ret = snd_soc_write(codec, CS4270_PWRCTL, 0); | 468 | ret = snd_soc_write(codec, CS4270_PWRCTL, 0); |