soc: soundwire: Fix soundwire bus clock frequency

Soundwire bus clock frequency should not exceed MCLK. Fix
the soundwire bus clock frequency to MCLK during clock scaling
for proper SSP calculation.

Change-Id: I347c8ee0f63f34428160a3408eaa0e999142bc78
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
This commit is contained in:
Sudheer Papothi 2020-04-30 11:00:06 +05:30 • committed by Gerrit - the friendly Code Review server
commit aa730ef492

View file

@ -1104,6 +1104,8 @@ int swrm_get_clk_div_rate(int mclk_freq, int bus_clk_freq)
bus_clk_freq = SWR_CLK_RATE_4P8MHZ;
else if(bus_clk_freq <= SWR_CLK_RATE_9P6MHZ)
bus_clk_freq = SWR_CLK_RATE_9P6MHZ;
else
bus_clk_freq = SWR_CLK_RATE_9P6MHZ;
} else if (mclk_freq == SWR_CLK_RATE_11P2896MHZ)
bus_clk_freq = SWR_CLK_RATE_11P2896MHZ;