From e5e499c455ec59970984cfccf7e3ac220a8f26d0 Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Thu, 7 Aug 2008 11:22:32 -0500 Subject: [PATCH] --- yaml --- r: 120183 b: refs/heads/master c: 0c235d1e837c142b7565814318b6ba5917d5ac32 h: refs/heads/master i: 120181: 5437f48b37a45db495a8d6ef98c75a336638f75a 120179: 4e08a1ece1e6f251a53409cebf93def1b160e1e9 120175: 53cdfda5540e2123c63a86f38740cb0cbbb3b92f v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/cs4270.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 3c1b7cc64690..57754c8bd4e0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ca53fb24dd21bff32c4b41b2be1035a1adfc0135 +refs/heads/master: 0c235d1e837c142b7565814318b6ba5917d5ac32 diff --git a/trunk/sound/soc/codecs/cs4270.c b/trunk/sound/soc/codecs/cs4270.c index 0bbd94501d7e..0ff476d7057c 100644 --- a/trunk/sound/soc/codecs/cs4270.c +++ b/trunk/sound/soc/codecs/cs4270.c @@ -450,6 +450,19 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream, return ret; } + /* Disable automatic volume control. It's enabled by default, and + * it causes volume change commands to be delayed, sometimes until + * after playback has started. + */ + + reg = cs4270_read_reg_cache(codec, CS4270_TRANS); + reg &= ~(CS4270_TRANS_SOFT | CS4270_TRANS_ZERO); + ret = cs4270_i2c_write(codec, CS4270_TRANS, reg); + if (ret < 0) { + printk(KERN_ERR "I2C write failed\n"); + return ret; + } + /* Thaw and power-up the codec */ ret = snd_soc_write(codec, CS4270_PWRCTL, 0);