* [PATCH] ASoC: arizona: Always keep SYSCLK link for DAIs
@ 2013-01-25 11:21 Mark Brown
0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2013-01-25 11:21 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown
Don't disconnect SYSCLK when a DAI moves to the ASYNCCLK domain, we always
need SYSCLK for operation even if it's not the reference clock for the
domain.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
sound/soc/codecs/arizona.c | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 27b6efc..f76e982 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -978,13 +978,27 @@ static int arizona_dai_set_sysclk(struct snd_soc_dai *dai,
routes[0].sink = dai->driver->capture.stream_name;
routes[1].sink = dai->driver->playback.stream_name;
- routes[0].source = arizona_dai_clk_str(dai_priv->clk);
- routes[1].source = arizona_dai_clk_str(dai_priv->clk);
- snd_soc_dapm_del_routes(&codec->dapm, routes, ARRAY_SIZE(routes));
+ switch (clk_id) {
+ case ARIZONA_CLK_SYSCLK:
+ routes[0].source = arizona_dai_clk_str(dai_priv->clk);
+ routes[1].source = arizona_dai_clk_str(dai_priv->clk);
+ snd_soc_dapm_del_routes(&codec->dapm, routes,
+ ARRAY_SIZE(routes));
+ break;
+ default:
+ break;
+ }
- routes[0].source = arizona_dai_clk_str(clk_id);
- routes[1].source = arizona_dai_clk_str(clk_id);
- snd_soc_dapm_add_routes(&codec->dapm, routes, ARRAY_SIZE(routes));
+ switch (clk_id) {
+ case ARIZONA_CLK_ASYNCCLK:
+ routes[0].source = arizona_dai_clk_str(clk_id);
+ routes[1].source = arizona_dai_clk_str(clk_id);
+ snd_soc_dapm_add_routes(&codec->dapm, routes,
+ ARRAY_SIZE(routes));
+ break;
+ default:
+ break;
+ }
dai_priv->clk = clk_id;
--
1.7.10.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-01-25 17:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-25 11:21 [PATCH] ASoC: arizona: Always keep SYSCLK link for DAIs Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).