Skip to content

Commit

Permalink
ASoC: twl6040: No need to change delay during HF ramp
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Sep 26, 2011
1 parent 8ff1e17 commit 4d64bdc
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions sound/soc/codecs/twl6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? */
Expand 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));
}


Expand Down

0 comments on commit 4d64bdc

Please sign in to comment.