From: Peter Ujfalusi <peter.ujfalusi@nokia.com>
To: alsa-devel@alsa-project.org
Cc: "sakoman@gmail.com" <sakoman@gmail.com>,
"getarunks@gmail.com" <getarunks@gmail.com>,
"broonie@opensource.wolfsonmicro.com"
<broonie@opensource.wolfsonmicro.com>,
"anuj.aggarwal@ti.com" <anuj.aggarwal@ti.com>
Subject: Re: [PATCH 1/1] ASoC: TWL4030: Headset VMID ramp fix
Date: Fri, 8 May 2009 15:14:17 +0300 [thread overview]
Message-ID: <200905081514.18044.peter.ujfalusi@nokia.com> (raw)
In-Reply-To: <200905081456.50445.peter.ujfalusi@nokia.com>
On Friday 08 May 2009 14:56:50 Ujfalusi Peter (Nokia-D/Tampere) wrote:
> On Friday 08 May 2009 09:40:44 ext Jarkko Nikula wrote:
> > It really does fix the power-up & -down pops on Beagle. By listening
> > carefully I can hear slight power-up and -down pops but only if really
> > focusing on it.
> >
> > But now the audio output is distorted and volume level is a little bit
> > lower. Without the patch it plays fine. Is it possible that now the
> > output voltage is not correctly biased? Worth to check with a scope.
>
> Well, that's what you get, when you are testing audio with /dev/zero and
> /dev/urandom... I have not noticed that the random noise got more random ;)
> What you have described is correct, it is heavily distorted.
>
> But I have debugged this further and I believe I know what is going on:
> The sequence for disable according to the documentation:
> HS_POP_SET:RAMP_EN = 0
> HS_POP_GAIN:HSL_GAIN, HSR_GAIN = 0
> HS_POP_SET:VMID_EN = 0
>
> Now what is missing from this is that after setting the HS_POP_SET:RAMP_EN
> = 0 it will take RAMP_DELAY time for the VMID to reach 0.
> Since we are not waiting between RAMP_EN = 0 and VMID_EN = 0, the VMID has
> been cut, which causes the 'tuck' on the headset output.
>
> In case of the Beagle board the ramp delay can be configured(MCLK=26MHz):
> 20ms - 2581ms, by default it is 20ms.
> To verify this I have added mdelay(30) after the RAMP_EN = 0, and there
> were no 'tuck'. However when I increased the RAMP_DELAY (to 40ms, or
> longer) the 'tuck' reappeared.
>
> How to solve this?
> Realistically we can not add 2581ms delay to the headsetl_event function...
> We could keep the VMID enabled all the time (which increases the idle power
> consumption by ~0.001A), but then the muting of the headset
> (HS_POP_GAIN:HSL_GAIN, HSR_GAIN = 0) will give the 'tuck'...
> In power consumption the difference between
> HS_POP_GAIN:HSL_GAIN, HSR_GAIN == 0 and
> HS_POP_GAIN:HSL_GAIN, HSR_GAIN != 0 is about ~0.01A, which is significant
> in my opinion.
> Using a timer to finish the ramp down?
>
> Anyways, this seams quite bad. I will think about it over the weekend...
>
> Any ideas?
We could fixate the RAMP_DELAY to 0 (27/20/14 ms, MCLK = 19.2/26/38.4 MHz) and
add mdelay(28/21/15) in the headsetl_event function... But I'm not sure is it
allowed, at least it looks hackish. Mark?
--
Péter
next prev parent reply other threads:[~2009-05-08 12:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-08 6:11 [PATCH 0/1] ASoC: TWL4030: Possible fix for the Beep at the end of the audio file Peter Ujfalusi
2009-05-08 6:11 ` [PATCH 1/1] ASoC: TWL4030: Headset VMID ramp fix Peter Ujfalusi
2009-05-08 6:40 ` Jarkko Nikula
2009-05-08 11:56 ` Peter Ujfalusi
2009-05-08 12:14 ` Peter Ujfalusi [this message]
2009-05-08 12:34 ` Mark Brown
2009-05-08 12:32 ` Mark Brown
2009-05-08 12:39 ` Peter Ujfalusi
2009-05-08 13:55 ` Jarkko Nikula
2009-05-08 14:23 ` Jarkko Nikula
2009-05-11 6:22 ` Peter Ujfalusi
2009-05-11 9:36 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200905081514.18044.peter.ujfalusi@nokia.com \
--to=peter.ujfalusi@nokia.com \
--cc=alsa-devel@alsa-project.org \
--cc=anuj.aggarwal@ti.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=getarunks@gmail.com \
--cc=sakoman@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.