* [PATCH] ASoC: TWL4030: Add supply for audio serial interface control
@ 2010-02-09 13:24 Peter Ujfalusi
2010-02-09 13:30 ` Peter Ujfalusi
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Peter Ujfalusi @ 2010-02-09 13:24 UTC (permalink / raw)
To: alsa-devel; +Cc: broonie, jy0922.shim, x0052729, lrg
The serial interface (TDM/I2S) for the audio block have been
constantly enabled.
Introduce a new DAPM_SUPPLY for handling the AIF_EN bit, so
the interface is only enabled, when there is a need for it.
For example when only the analog loopback is enabled, there
is no need to keep the serial interface active.
I have added the persons who contributed to the Voice path
of twl4030 codec driver, so they might have the ability
to test this patch, and send an update for the Voice path,
if it is necessary
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
---
This patch has been tested in OPTION 1 mode, where the Voice
path is not in use.
I have looked for dependencies in the Voice path regarding to
the Audio interface enable bit, but I have not found any.
If someone could test, if the Voice path also needs the AIF_EN
bit set, than please send a patch, which adds this new supply
to the DAPM rule for the Voice path.
sound/soc/codecs/twl4030.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index b32aeb3..277862e 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -55,7 +55,7 @@ static const u8 twl4030_reg[TWL4030_CACHEREGNUM] = {
0x0c, /* REG_ATXR1PGA (0xB) */
0x00, /* REG_AVTXL2PGA (0xC) */
0x00, /* REG_AVTXR2PGA (0xD) */
- 0x01, /* REG_AUDIO_IF (0xE) */
+ 0x00, /* REG_AUDIO_IF (0xE) */
0x00, /* REG_VOICE_IF (0xF) */
0x00, /* REG_ARXR1PGA (0x10) */
0x00, /* REG_ARXL1PGA (0x11) */
@@ -1203,6 +1203,8 @@ static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = {
SND_SOC_DAPM_SUPPLY("APLL Enable", SND_SOC_NOPM, 0, 0, apll_event,
SND_SOC_DAPM_PRE_PMU|SND_SOC_DAPM_POST_PMD),
+ SND_SOC_DAPM_SUPPLY("AIF Enable", TWL4030_REG_AUDIO_IF, 0, 0, NULL, 0),
+
/* Output MIXER controls */
/* Earpiece */
SND_SOC_DAPM_MIXER("Earpiece Mixer", SND_SOC_NOPM, 0, 0,
@@ -1337,6 +1339,11 @@ static const struct snd_soc_dapm_route intercon[] = {
{"Digital L2 Playback Mixer", NULL, "APLL Enable"},
{"Digital Voice Playback Mixer", NULL, "APLL Enable"},
+ {"Digital R1 Playback Mixer", NULL, "AIF Enable"},
+ {"Digital L1 Playback Mixer", NULL, "AIF Enable"},
+ {"Digital R2 Playback Mixer", NULL, "AIF Enable"},
+ {"Digital L2 Playback Mixer", NULL, "AIF Enable"},
+
{"Analog L1 Playback Mixer", NULL, "Digital L1 Playback Mixer"},
{"Analog R1 Playback Mixer", NULL, "Digital R1 Playback Mixer"},
{"Analog L2 Playback Mixer", NULL, "Digital L2 Playback Mixer"},
@@ -1455,6 +1462,11 @@ static const struct snd_soc_dapm_route intercon[] = {
{"ADC Virtual Left2", NULL, "APLL Enable"},
{"ADC Virtual Right2", NULL, "APLL Enable"},
+ {"ADC Virtual Left1", NULL, "AIF Enable"},
+ {"ADC Virtual Right1", NULL, "AIF Enable"},
+ {"ADC Virtual Left2", NULL, "AIF Enable"},
+ {"ADC Virtual Right2", NULL, "AIF Enable"},
+
/* Analog bypass routes */
{"Right1 Analog Loopback", "Switch", "Analog Right"},
{"Left1 Analog Loopback", "Switch", "Analog Left"},
--
1.6.6.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] ASoC: TWL4030: Add supply for audio serial interface control
2010-02-09 13:24 [PATCH] ASoC: TWL4030: Add supply for audio serial interface control Peter Ujfalusi
@ 2010-02-09 13:30 ` Peter Ujfalusi
2010-02-09 13:52 ` Mark Brown
2010-02-11 20:03 ` Misael Lopez
2010-02-10 0:11 ` Joonyoung Shim
2010-02-10 10:58 ` Mark Brown
2 siblings, 2 replies; 6+ messages in thread
From: Peter Ujfalusi @ 2010-02-09 13:30 UTC (permalink / raw)
To: alsa-devel
Cc: broonie@opensource.wolfsonmicro.com, jy0922.shim@samsung.com,
x0052729@ti.com, lrg@slimlogic.co.uk
Hello,
On Tuesday 09 February 2010 15:24:04 Ujfalusi Peter (Nokia-D/Tampere) wrote:
> The serial interface (TDM/I2S) for the audio block have been
> constantly enabled.
> Introduce a new DAPM_SUPPLY for handling the AIF_EN bit, so
> the interface is only enabled, when there is a need for it.
> For example when only the analog loopback is enabled, there
> is no need to keep the serial interface active.
>
> I have added the persons who contributed to the Voice path
> of twl4030 codec driver, so they might have the ability
> to test this patch, and send an update for the Voice path,
> if it is necessary
I meant to place this part after the ---, so this should not be part of the
commit message. Sorry about that, should I resend it?
Also, it seams that the email address for Misael Lopez at TI is no longer
active...
--
Péter
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
> ---
>
> This patch has been tested in OPTION 1 mode, where the Voice
> path is not in use.
> I have looked for dependencies in the Voice path regarding to
> the Audio interface enable bit, but I have not found any.
> If someone could test, if the Voice path also needs the AIF_EN
> bit set, than please send a patch, which adds this new supply
> to the DAPM rule for the Voice path.
>
> sound/soc/codecs/twl4030.c | 14 +++++++++++++-
> 1 files changed, 13 insertions(+), 1 deletions(-)
>
> diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
> index b32aeb3..277862e 100644
> --- a/sound/soc/codecs/twl4030.c
> +++ b/sound/soc/codecs/twl4030.c
> @@ -55,7 +55,7 @@ static const u8 twl4030_reg[TWL4030_CACHEREGNUM] = {
> 0x0c, /* REG_ATXR1PGA (0xB) */
> 0x00, /* REG_AVTXL2PGA (0xC) */
> 0x00, /* REG_AVTXR2PGA (0xD) */
> - 0x01, /* REG_AUDIO_IF (0xE) */
> + 0x00, /* REG_AUDIO_IF (0xE) */
> 0x00, /* REG_VOICE_IF (0xF) */
> 0x00, /* REG_ARXR1PGA (0x10) */
> 0x00, /* REG_ARXL1PGA (0x11) */
> @@ -1203,6 +1203,8 @@ static const struct snd_soc_dapm_widget
> twl4030_dapm_widgets[] = { SND_SOC_DAPM_SUPPLY("APLL Enable",
> SND_SOC_NOPM, 0, 0, apll_event,
> SND_SOC_DAPM_PRE_PMU|SND_SOC_DAPM_POST_PMD),
>
> + SND_SOC_DAPM_SUPPLY("AIF Enable", TWL4030_REG_AUDIO_IF, 0, 0, NULL, 0),
> +
> /* Output MIXER controls */
> /* Earpiece */
> SND_SOC_DAPM_MIXER("Earpiece Mixer", SND_SOC_NOPM, 0, 0,
> @@ -1337,6 +1339,11 @@ static const struct snd_soc_dapm_route intercon[] =
> { {"Digital L2 Playback Mixer", NULL, "APLL Enable"},
> {"Digital Voice Playback Mixer", NULL, "APLL Enable"},
>
> + {"Digital R1 Playback Mixer", NULL, "AIF Enable"},
> + {"Digital L1 Playback Mixer", NULL, "AIF Enable"},
> + {"Digital R2 Playback Mixer", NULL, "AIF Enable"},
> + {"Digital L2 Playback Mixer", NULL, "AIF Enable"},
> +
> {"Analog L1 Playback Mixer", NULL, "Digital L1 Playback Mixer"},
> {"Analog R1 Playback Mixer", NULL, "Digital R1 Playback Mixer"},
> {"Analog L2 Playback Mixer", NULL, "Digital L2 Playback Mixer"},
> @@ -1455,6 +1462,11 @@ static const struct snd_soc_dapm_route intercon[] =
> { {"ADC Virtual Left2", NULL, "APLL Enable"},
> {"ADC Virtual Right2", NULL, "APLL Enable"},
>
> + {"ADC Virtual Left1", NULL, "AIF Enable"},
> + {"ADC Virtual Right1", NULL, "AIF Enable"},
> + {"ADC Virtual Left2", NULL, "AIF Enable"},
> + {"ADC Virtual Right2", NULL, "AIF Enable"},
> +
> /* Analog bypass routes */
> {"Right1 Analog Loopback", "Switch", "Analog Right"},
> {"Left1 Analog Loopback", "Switch", "Analog Left"},
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] ASoC: TWL4030: Add supply for audio serial interface control
2010-02-09 13:30 ` Peter Ujfalusi
@ 2010-02-09 13:52 ` Mark Brown
2010-02-11 20:03 ` Misael Lopez
1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2010-02-09 13:52 UTC (permalink / raw)
To: Peter Ujfalusi
Cc: alsa-devel, jy0922.shim@samsung.com, x0052729@ti.com,
lrg@slimlogic.co.uk
On Tue, Feb 09, 2010 at 03:30:13PM +0200, Peter Ujfalusi wrote:
> I meant to place this part after the ---, so this should not be part of the
> commit message. Sorry about that, should I resend it?
No, that's fine.
> Also, it seams that the email address for Misael Lopez at TI is no longer
> active...
If we don't hear anything within a few days then I guess just go ahead -
if a problem is found it can always be fixed at the time.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: TWL4030: Add supply for audio serial interface control
2010-02-09 13:30 ` Peter Ujfalusi
2010-02-09 13:52 ` Mark Brown
@ 2010-02-11 20:03 ` Misael Lopez
1 sibling, 0 replies; 6+ messages in thread
From: Misael Lopez @ 2010-02-11 20:03 UTC (permalink / raw)
To: Peter Ujfalusi, alsa-devel@alsa-project.org
Cc: hnagalla@ti.com, jorge.candelaria@ti.com,
broonie@opensource.wolfsonmicro.com, jy0922.shim@samsung.com,
lrg@slimlogic.co.uk
> Hello,
>
> On Tuesday 09 February 2010 15:24:04 Ujfalusi Peter (Nokia-
> D/Tampere) wrote:
> > The serial interface (TDM/I2S) for the audio block have been
> > constantly enabled.
> > Introduce a new DAPM_SUPPLY for handling the AIF_EN bit, so
> > the interface is only enabled, when there is a need for it.
> > For example when only the analog loopback is enabled, there
> > is no need to keep the serial interface active.
> >
> > I have added the persons who contributed to the Voice path
> > of twl4030 codec driver, so they might have the ability
> > to test this patch, and send an update for the Voice path,
> > if it is necessary
>
> I meant to place this part after the ---, so this should not be
> part of the
> commit message. Sorry about that, should I resend it?
> Also, it seams that the email address for Misael Lopez at TI is
> no longer
> active...
My TI email is not longer active. And I don't have any hardware
available to test that, but I have a couple of comments.
IIRC the AIF_EN bit only enables the Audio (HiFi) port (I2S/TDM) of
twl4030, so the changes doesn't break anything in voice path.
OTOH, a similar strategy needs to be followed for Voice path but
using VIF_EN bit of Voice Interface register.
-Misa
> --
> Péter
>
> >
> > Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
> > ---
> >
> > This patch has been tested in OPTION 1 mode, where the Voice
> > path is not in use.
> > I have looked for dependencies in the Voice path regarding to
> > the Audio interface enable bit, but I have not found any.
> > If someone could test, if the Voice path also needs the AIF_EN
> > bit set, than please send a patch, which adds this new supply
> > to the DAPM rule for the Voice path.
> >
> > sound/soc/codecs/twl4030.c | 14 +++++++++++++-
> > 1 files changed, 13 insertions(+), 1 deletions(-)
> >
> > diff --git a/sound/soc/codecs/twl4030.c
> b/sound/soc/codecs/twl4030.c
> > index b32aeb3..277862e 100644
> > --- a/sound/soc/codecs/twl4030.c
> > +++ b/sound/soc/codecs/twl4030.c
> > @@ -55,7 +55,7 @@ static const u8
> twl4030_reg[TWL4030_CACHEREGNUM] = {
> > 0x0c, /* REG_ATXR1PGA (0xB) */
> > 0x00, /* REG_AVTXL2PGA (0xC) */
> > 0x00, /* REG_AVTXR2PGA (0xD) */
> > - 0x01, /* REG_AUDIO_IF (0xE) */
> > + 0x00, /* REG_AUDIO_IF (0xE) */
> > 0x00, /* REG_VOICE_IF (0xF) */
> > 0x00, /* REG_ARXR1PGA (0x10) */
> > 0x00, /* REG_ARXL1PGA (0x11) */
> > @@ -1203,6 +1203,8 @@ static const struct snd_soc_dapm_widget
> > twl4030_dapm_widgets[] = { SND_SOC_DAPM_SUPPLY("APLL Enable",
> > SND_SOC_NOPM, 0, 0, apll_event,
> > SND_SOC_DAPM_PRE_PMU|SND_SOC_DAPM_POST_PMD),
> >
> > + SND_SOC_DAPM_SUPPLY("AIF Enable", TWL4030_REG_AUDIO_IF, 0,
> 0, NULL, 0),
> > +
> > /* Output MIXER controls */
> > /* Earpiece */
> > SND_SOC_DAPM_MIXER("Earpiece Mixer", SND_SOC_NOPM, 0, 0,
> > @@ -1337,6 +1339,11 @@ static const struct snd_soc_dapm_route
> intercon[] =
> > { {"Digital L2 Playback Mixer", NULL, "APLL Enable"},
> > {"Digital Voice Playback Mixer", NULL, "APLL Enable"},
> >
> > + {"Digital R1 Playback Mixer", NULL, "AIF Enable"},
> > + {"Digital L1 Playback Mixer", NULL, "AIF Enable"},
> > + {"Digital R2 Playback Mixer", NULL, "AIF Enable"},
> > + {"Digital L2 Playback Mixer", NULL, "AIF Enable"},
> > +
> > {"Analog L1 Playback Mixer", NULL, "Digital L1 Playback
> Mixer"},
> > {"Analog R1 Playback Mixer", NULL, "Digital R1 Playback
> Mixer"},
> > {"Analog L2 Playback Mixer", NULL, "Digital L2 Playback
> Mixer"},
> > @@ -1455,6 +1462,11 @@ static const struct snd_soc_dapm_route
> intercon[] =
> > { {"ADC Virtual Left2", NULL, "APLL Enable"},
> > {"ADC Virtual Right2", NULL, "APLL Enable"},
> >
> > + {"ADC Virtual Left1", NULL, "AIF Enable"},
> > + {"ADC Virtual Right1", NULL, "AIF Enable"},
> > + {"ADC Virtual Left2", NULL, "AIF Enable"},
> > + {"ADC Virtual Right2", NULL, "AIF Enable"},
> > +
> > /* Analog bypass routes */
> > {"Right1 Analog Loopback", "Switch", "Analog Right"},
> > {"Left1 Analog Loopback", "Switch", "Analog Left"},
> >
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: TWL4030: Add supply for audio serial interface control
2010-02-09 13:24 [PATCH] ASoC: TWL4030: Add supply for audio serial interface control Peter Ujfalusi
2010-02-09 13:30 ` Peter Ujfalusi
@ 2010-02-10 0:11 ` Joonyoung Shim
2010-02-10 10:58 ` Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Joonyoung Shim @ 2010-02-10 0:11 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: alsa-devel, broonie, x0052729, lrg
On 2/9/2010 10:24 PM, Peter Ujfalusi wrote:
> The serial interface (TDM/I2S) for the audio block have been
> constantly enabled.
> Introduce a new DAPM_SUPPLY for handling the AIF_EN bit, so
> the interface is only enabled, when there is a need for it.
> For example when only the analog loopback is enabled, there
> is no need to keep the serial interface active.
>
> I have added the persons who contributed to the Voice path
> of twl4030 codec driver, so they might have the ability
> to test this patch, and send an update for the Voice path,
> if it is necessary
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
> ---
>
> This patch has been tested in OPTION 1 mode, where the Voice
> path is not in use.
> I have looked for dependencies in the Voice path regarding to
> the Audio interface enable bit, but I have not found any.
> If someone could test, if the Voice path also needs the AIF_EN
> bit set, than please send a patch, which adds this new supply
> to the DAPM rule for the Voice path.
>
Unfortunately, i cannot test the twl4030 codec anymore, but i think
there is no dependency in the Voice path by this patch. The AIF_EN bit
is only for the audio interface(DIN, DOUT, SYNC, CLK).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: TWL4030: Add supply for audio serial interface control
2010-02-09 13:24 [PATCH] ASoC: TWL4030: Add supply for audio serial interface control Peter Ujfalusi
2010-02-09 13:30 ` Peter Ujfalusi
2010-02-10 0:11 ` Joonyoung Shim
@ 2010-02-10 10:58 ` Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2010-02-10 10:58 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: alsa-devel, jy0922.shim, x0052729, lrg
On Tue, Feb 09, 2010 at 03:24:04PM +0200, Peter Ujfalusi wrote:
> The serial interface (TDM/I2S) for the audio block have been
> constantly enabled.
> Introduce a new DAPM_SUPPLY for handling the AIF_EN bit, so
> the interface is only enabled, when there is a need for it.
> For example when only the analog loopback is enabled, there
> is no need to keep the serial interface active.
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-02-11 20:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-09 13:24 [PATCH] ASoC: TWL4030: Add supply for audio serial interface control Peter Ujfalusi
2010-02-09 13:30 ` Peter Ujfalusi
2010-02-09 13:52 ` Mark Brown
2010-02-11 20:03 ` Misael Lopez
2010-02-10 0:11 ` Joonyoung Shim
2010-02-10 10:58 ` Mark Brown
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.