All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>, Jyri Sarha <jsarha@ti.com>
Cc: alsa-devel@alsa-project.org, afd@ti.com
Subject: [PATCH] ASoC: tlv320aic31xx: Fix master mode clock I2S bus clocks
Date: Mon, 12 Feb 2018 16:06:46 +0200	[thread overview]
Message-ID: <20180212140646.3268-1-peter.ujfalusi@ti.com> (raw)

In the reset state of the codec we do not have complete playback or capture
routes.

The audio playback/capture will not work due to missing clock signals on
the I2S bus if PLL, MDAC/NDAC/DAC MADC/NADC/ADC is powered down.

To make sure that even if all output/input is disconnected the codec is
generating clocks, we need to have valid DAPM route in every case to power
up the must needed parts of the codec.

I have verified that switching DAC (during playback) or ADC (during
capture) will stop the I2S clocks, so the only solution is to connect the
'Off' routes as well to output/input.

Tested on am43x-epos-evm with aic3111 codec in master mode.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 sound/soc/codecs/tlv320aic31xx.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index 858cb8be445f..d42a23eb916e 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -586,9 +586,11 @@ common31xx_audio_map[] = {
 	{"DAC Left Input", "Left Data", "DAC IN"},
 	{"DAC Left Input", "Right Data", "DAC IN"},
 	{"DAC Left Input", "Mono", "DAC IN"},
+	{"DAC Left Input", "Off", "DAC IN"},
 	{"DAC Right Input", "Left Data", "DAC IN"},
 	{"DAC Right Input", "Right Data", "DAC IN"},
 	{"DAC Right Input", "Mono", "DAC IN"},
+	{"DAC Right Input", "Off", "DAC IN"},
 	{"DAC Left", NULL, "DAC Left Input"},
 	{"DAC Right", NULL, "DAC Right Input"},
 
@@ -601,6 +603,9 @@ common31xx_audio_map[] = {
 	{"HP Right", "Switch", "Output Right"},
 	{"HPR Driver", NULL, "HP Right"},
 	{"HPR", NULL, "HPR Driver"},
+
+	{"HPL", NULL, "DAC Left"},
+	{"HPR", NULL, "DAC Right"},
 };
 
 static const struct snd_soc_dapm_route
@@ -621,16 +626,20 @@ aic31xx_audio_map[] = {
 	{"MIC1LP P-Terminal", "FFR 10 Ohm", "MIC1LP"},
 	{"MIC1LP P-Terminal", "FFR 20 Ohm", "MIC1LP"},
 	{"MIC1LP P-Terminal", "FFR 40 Ohm", "MIC1LP"},
+	{"MIC1LP P-Terminal", "Off", "MIC1LP"},
 	{"MIC1RP P-Terminal", "FFR 10 Ohm", "MIC1RP"},
 	{"MIC1RP P-Terminal", "FFR 20 Ohm", "MIC1RP"},
 	{"MIC1RP P-Terminal", "FFR 40 Ohm", "MIC1RP"},
+	{"MIC1RP P-Terminal", "Off", "MIC1RP"},
 	{"MIC1LM P-Terminal", "FFR 10 Ohm", "MIC1LM"},
 	{"MIC1LM P-Terminal", "FFR 20 Ohm", "MIC1LM"},
 	{"MIC1LM P-Terminal", "FFR 40 Ohm", "MIC1LM"},
+	{"MIC1LM P-Terminal", "Off", "MIC1LM"},
 
 	{"MIC1LM M-Terminal", "FFR 10 Ohm", "MIC1LM"},
 	{"MIC1LM M-Terminal", "FFR 20 Ohm", "MIC1LM"},
 	{"MIC1LM M-Terminal", "FFR 40 Ohm", "MIC1LM"},
+	{"MIC1LM M-Terminal", "Off", "MIC1LM"},
 
 	{"MIC_GAIN_CTL", NULL, "MIC1LP P-Terminal"},
 	{"MIC_GAIN_CTL", NULL, "MIC1RP P-Terminal"},
-- 
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

             reply	other threads:[~2018-02-12 14:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-12 14:06 Peter Ujfalusi [this message]
2018-02-12 14:09 ` [PATCH] ASoC: tlv320aic31xx: Fix master mode clock I2S bus clocks Peter Ujfalusi
2018-02-12 14:17 ` Andrew F. Davis
2018-02-12 15:05   ` Peter Ujfalusi
2018-02-12 17:27     ` Andrew F. Davis
2018-02-13  9:22       ` Jyri Sarha
2018-02-13 11:19       ` Peter Ujfalusi
2018-02-13 12:23         ` 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=20180212140646.3268-1-peter.ujfalusi@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=afd@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jsarha@ti.com \
    --cc=lgirdwood@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.