aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/codecs/twl6040.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-09-26 16:26:31 +0300
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-26 22:33:31 +0100
commit4d64bdca4485da8d2e604c2b02f3f32c9f468a28 (patch)
treeca90daf6f9a61fa1189cd4130d7d3b833c089d1d /sound/soc/codecs/twl6040.c
parent8ff1e1709846c48d20a062293df013931d99585b (diff)
ASoC: twl6040: No need to change delay during HF ramp
The Handsfree gain have 2dB steps all the way, so there is no reason to have different delays as we approaching to the end of the scale. The comment was also wrong, since we have 0dB at 0x3 raw, at 16 the gain is -26dB. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/twl6040.c')
-rw-r--r--sound/soc/codecs/twl6040.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index 0144e435c08..c973347d4f6 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -526,7 +526,6 @@ static void twl6040_pga_hf_work(struct work_struct *work)
container_of(work, struct twl6040_data, handsfree.work.work);
struct snd_soc_codec *codec = priv->codec;
struct twl6040_output *handsfree = &priv->handsfree;
- unsigned int delay = handsfree->step_delay;
int i, handsfree_complete;
/* do we need to ramp at all ? */
@@ -543,15 +542,8 @@ static void twl6040_pga_hf_work(struct work_struct *work)
if (handsfree_complete)
break;
- /*
- * TODO: tune: delay is longer over 0dB
- * as increases are larger.
- */
- if (i >= 16)
- schedule_timeout_interruptible(msecs_to_jiffies(delay +
- (delay >> 1)));
- else
- schedule_timeout_interruptible(msecs_to_jiffies(delay));
+ schedule_timeout_interruptible(
+ msecs_to_jiffies(handsfree->step_delay));
}