From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org,
Grazvydas Ignotas <notasas@gmail.com>,
Jarkko Nikula <jarkko.nikula@bitmer.com>
Subject: Re: [PATCH 1/3] ASoC: omap-abe-twl6040: No need to register DMIC routes seperatly
Date: Mon, 10 Mar 2014 10:13:27 +0200 [thread overview]
Message-ID: <531D7427.5020006@ti.com> (raw)
In-Reply-To: <1394302616-15991-1-git-send-email-lars@metafoo.de>
Hi,
On 03/08/2014 08:16 PM, Lars-Peter Clausen wrote:
> When using table based DAPM setup there is no need to register DAPM elements for
> different sub-components separately. The widgets will be registered before the
> first sub-component is initialized, the routes are only added after the last
> sub-component has been initialized, meaning everything will be available when it
> is needed.
The reason why we add the DMIC routes in the way we do is that not all boards
have DMIC in use. PandaBoards does not have DMIC while SDP/Blaze have. On
PandaBoard we do not register the dmic dai link so the widgets are not going
to be added and also the dmic DAI and codec will be not loaded on PandaBoards.
I think this will cause some warning because of missing "DMic" widget?
--
Péter
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> sound/soc/omap/omap-abe-twl6040.c | 19 ++++---------------
> 1 file changed, 4 insertions(+), 15 deletions(-)
>
> diff --git a/sound/soc/omap/omap-abe-twl6040.c b/sound/soc/omap/omap-abe-twl6040.c
> index ebb1390..5011bfa 100644
> --- a/sound/soc/omap/omap-abe-twl6040.c
> +++ b/sound/soc/omap/omap-abe-twl6040.c
> @@ -163,6 +163,10 @@ static const struct snd_soc_dapm_route audio_map[] = {
>
> {"AFML", NULL, "Line In"},
> {"AFMR", NULL, "Line In"},
> +
> + /* DMIC routing */
> + {"DMic", NULL, "Digital Mic"},
> + {"Digital Mic", NULL, "Digital Mic1 Bias"},
> };
>
> static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd)
> @@ -196,20 +200,6 @@ static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd)
> return ret;
> }
>
> -static const struct snd_soc_dapm_route dmic_audio_map[] = {
> - {"DMic", NULL, "Digital Mic"},
> - {"Digital Mic", NULL, "Digital Mic1 Bias"},
> -};
> -
> -static int omap_abe_dmic_init(struct snd_soc_pcm_runtime *rtd)
> -{
> - struct snd_soc_codec *codec = rtd->codec;
> - struct snd_soc_dapm_context *dapm = &codec->dapm;
> -
> - return snd_soc_dapm_add_routes(dapm, dmic_audio_map,
> - ARRAY_SIZE(dmic_audio_map));
> -}
> -
> /* Digital audio interface glue - connects codec <--> CPU */
> static struct snd_soc_dai_link abe_twl6040_dai_links[] = {
> {
> @@ -229,7 +219,6 @@ static struct snd_soc_dai_link abe_twl6040_dai_links[] = {
> .codec_dai_name = "dmic-hifi",
> .platform_name = "omap-pcm-audio",
> .codec_name = "dmic-codec",
> - .init = omap_abe_dmic_init,
> .ops = &omap_abe_dmic_ops,
> },
> };
>
next prev parent reply other threads:[~2014-03-10 8:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-08 18:16 [PATCH 1/3] ASoC: omap-abe-twl6040: No need to register DMIC routes seperatly Lars-Peter Clausen
2014-03-08 18:16 ` [PATCH 2/3] ASoC: rx51: Convert to table based control and DAPM setup Lars-Peter Clausen
2014-03-08 18:16 ` [PATCH 3/3] ASoC: omap3pandora: Convert to table based " Lars-Peter Clausen
2014-03-10 8:13 ` Peter Ujfalusi [this message]
2014-03-10 8:18 ` [PATCH 1/3] ASoC: omap-abe-twl6040: No need to register DMIC routes seperatly Lars-Peter Clausen
2014-03-10 9:12 ` Mark Brown
2014-03-10 9:24 ` Lars-Peter Clausen
2014-03-10 10:10 ` Mark Brown
2014-03-10 10:27 ` Lars-Peter Clausen
2014-03-10 11:05 ` Mark Brown
2014-03-10 11:29 ` Lars-Peter Clausen
2014-03-10 12:09 ` 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=531D7427.5020006@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jarkko.nikula@bitmer.com \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=notasas@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox