ASoC: rcar: unregister fixed rate on ADG
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 2 Aug 2017 10:26:09 +0000 (10:26 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 2 Aug 2017 11:06:16 +0000 (12:06 +0100)
commite3c6de48133ff1355f14a31a74a9027834c0fd65
treeb64626287fcd05751b08e171a38ee9ddeb2f94c1
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877
ASoC: rcar: unregister fixed rate on ADG

ADG is registering fixed rate clock for audio_clkout, but it had not
been unregister clock when removing.

Salvator-X board is using ak4613 driver now, and it supports
hw_constraints from commit 907cd8809eebc ("ASoC: ak4613: add
hw_constraint rule for Sampling Rate").
And this calculation is using input clk. This ak4613 input clock is
ADG clkout on Salvator-X.

Because ADG had not been unregister clkout when unbinding, it receives
fixed rate clk register error when re-binding.
Thus, ak4613 can't get correct input clock, and hw_constraints will be
failed after re-binding.
This means Salvator-X board can't use sound after unbind/bind.

This patch solves this issue.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/adg.c