Skip to content

Commit d059cd4

Browse files
morimotobroonie
authored andcommitted
ASoC: rsnd: setup clock-out only when all conditions are right
Current adg.c doesn't assume that requested clock out divide condition doesn't match. In such case, it will indicate strange message, and will register NULL clock, etc. It is just a DT setting miss, but is confusable. This patch check all conditions for it. Reported-by: Vincenzo De Michele <vincenzo.michele@davinci.de> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87lee2zlf7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent bd4cee2 commit d059cd4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sound/soc/sh/rcar/adg.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,10 @@ static int rsnd_adg_get_clkout(struct rsnd_priv *priv)
607607
}
608608
}
609609

610+
if (!(adg->brg_rate[ADG_HZ_48] && req_Hz[ADG_HZ_48]) &&
611+
!(adg->brg_rate[ADG_HZ_441] && req_Hz[ADG_HZ_441]))
612+
goto rsnd_adg_get_clkout_end;
613+
610614
if (approximate)
611615
dev_info(dev, "It uses CLK_I as approximate rate");
612616

0 commit comments

Comments
 (0)