• M
    ASoC: fsl-ssi: Fix baudclock handling · d429d8e3
    Markus Pargmann 提交于
    The baudclock may be used and set by different streams.
    
    Allow only the first stream to set the bitclock rate. Other streams have
    to try to get to the correct rate without modifying the bitclock rate
    using the SSI internal clock modifiers.
    
    The variable baudclk_streams is introduced to keep track of the active
    streams that are using the baudclock. This way we know if the baudclock
    may be set and whether we may enable/disable the clock.
    
    baudclock enable/disable is moved to hw_params()/hw_free(). This way we can
    keep track of the baudclock in those two functions and avoid a running
    clock while it is not used. As hw_params()/hw_free() may be called
    multiple times for the same stream, we have to use baudclk_streams
    variable to know whether we may enable/disable the clock.
    Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
    Tested-By: NMichael Grzeschik <mgr@pengutronix.de>
    Signed-off-by: NMark Brown <broonie@linaro.org>
    d429d8e3
fsl_ssi.c 39.3 KB