[alsa-devel] [PATCH 1/2] ASoC: tlv320dac33: Fix compillation error
Fix the compilation error introduced by patch: ASoC: tlv320dac33: Avoid multiple soft power up
Signed-off-by: Peter Ujfalusi peter.ujfalusi@nokia.com --- sound/soc/codecs/tlv320dac33.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index a0ba5d1..d13fda0 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c @@ -638,6 +638,7 @@ static int dac33_add_widgets(struct snd_soc_codec *codec) static int dac33_set_bias_level(struct snd_soc_codec *codec, enum snd_soc_bias_level level) { + struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); int ret;
switch (level) {
The power for the DACs need to be enabled, even when only the analog bypass is in use with the codec, otherwise the audio is going to be distorted. Make sure that the DACs are powered all the time, when there is audio aictivity.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@nokia.com --- sound/soc/codecs/tlv320dac33.c | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index d13fda0..119686a 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c @@ -590,8 +590,8 @@ static const struct snd_soc_dapm_widget dac33_dapm_widgets[] = { SND_SOC_DAPM_INPUT("LINEL"), SND_SOC_DAPM_INPUT("LINER"),
- SND_SOC_DAPM_DAC("DACL", "Left Playback", DAC33_LDAC_PWR_CTRL, 2, 0), - SND_SOC_DAPM_DAC("DACR", "Right Playback", DAC33_RDAC_PWR_CTRL, 2, 0), + SND_SOC_DAPM_DAC("DACL", "Left Playback", SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_DAC("DACR", "Right Playback", SND_SOC_NOPM, 0, 0),
/* Analog bypass */ SND_SOC_DAPM_SWITCH("Analog Left Bypass", SND_SOC_NOPM, 0, 0, @@ -599,6 +599,9 @@ static const struct snd_soc_dapm_widget dac33_dapm_widgets[] = { SND_SOC_DAPM_SWITCH("Analog Right Bypass", SND_SOC_NOPM, 0, 0, &dac33_dapm_abypassr_control),
+ SND_SOC_DAPM_PGA("Left DAC Power", DAC33_LDAC_PWR_CTRL, 2, 0, NULL, 0), + SND_SOC_DAPM_PGA("Right DAC Power", DAC33_RDAC_PWR_CTRL, 2, 0, NULL, 0), + SND_SOC_DAPM_REG(snd_soc_dapm_mixer, "Output Left Amp Power", DAC33_OUT_AMP_PWR_CTRL, 6, 3, 3, 0), SND_SOC_DAPM_REG(snd_soc_dapm_mixer, "Output Right Amp Power", @@ -612,11 +615,14 @@ static const struct snd_soc_dapm_route audio_map[] = { {"Analog Left Bypass", "Switch", "LINEL"}, {"Analog Right Bypass", "Switch", "LINER"},
- {"Output Left Amp Power", NULL, "DACL"}, - {"Output Right Amp Power", NULL, "DACR"}, + {"Left DAC Power", NULL, "DACL"}, + {"Right DAC Power", NULL, "DACR"}, + + {"Left DAC Power", NULL, "Analog Left Bypass"}, + {"Right DAC Power", NULL, "Analog Right Bypass"},
- {"Output Left Amp Power", NULL, "Analog Left Bypass"}, - {"Output Right Amp Power", NULL, "Analog Right Bypass"}, + {"Output Left Amp Power", NULL, "Left DAC Power"}, + {"Output Right Amp Power", NULL, "Right DAC Power"},
/* output */ {"LEFT_LO", NULL, "Output Left Amp Power"},
On Wed, Dec 08, 2010 at 03:12:57PM +0200, Peter Ujfalusi wrote:
- SND_SOC_DAPM_PGA("Left DAC Power", DAC33_LDAC_PWR_CTRL, 2, 0, NULL, 0),
- SND_SOC_DAPM_PGA("Right DAC Power", DAC33_RDAC_PWR_CTRL, 2, 0, NULL, 0),
These feels like they should be supply widgets for the output amps? Might be a bit clearer.
On Wednesday 08 December 2010 15:41:31 ext Mark Brown wrote:
On Wed, Dec 08, 2010 at 03:12:57PM +0200, Peter Ujfalusi wrote:
- SND_SOC_DAPM_PGA("Left DAC Power", DAC33_LDAC_PWR_CTRL, 2, 0, NULL, 0),
- SND_SOC_DAPM_PGA("Right DAC Power", DAC33_RDAC_PWR_CTRL, 2, 0, NULL,
0),
These feels like they should be supply widgets for the output amps? Might be a bit clearer.
Yes, somehow I tend to forgot about the DAPM_SUPPLY widget ;)
Thanks, Péter
On Wed, Dec 08, 2010 at 03:12:56PM +0200, Peter Ujfalusi wrote:
Fix the compilation error introduced by patch: ASoC: tlv320dac33: Avoid multiple soft power up
Signed-off-by: Peter Ujfalusi peter.ujfalusi@nokia.com
Acked-by: Mark Brown broonie@opensource.wolfsonmicro.com
On Wed, 2010-12-08 at 15:12 +0200, Peter Ujfalusi wrote:
Fix the compilation error introduced by patch: ASoC: tlv320dac33: Avoid multiple soft power up
Signed-off-by: Peter Ujfalusi peter.ujfalusi@nokia.com
sound/soc/codecs/tlv320dac33.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index a0ba5d1..d13fda0 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c @@ -638,6 +638,7 @@ static int dac33_add_widgets(struct snd_soc_codec *codec) static int dac33_set_bias_level(struct snd_soc_codec *codec, enum snd_soc_bias_level level) {
struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); int ret;
switch (level) {
Applied.
Thanks
Liam
participants (3)
-
Liam Girdwood
-
Mark Brown
-
Peter Ujfalusi