[alsa-devel] [PATCH] ASoC: arizona: Always keep SYSCLK link for DAIs
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;
participants (1)
-
Mark Brown