• Matthias Reichl's avatar
    ASoC: bcm2835: fix hw_params error when device is in prepared state · 8d5737a5
    Matthias Reichl authored
    If bcm2835 is configured as bitclock master calling hw_params()
    after prepare() fails with EBUSY. This also makes it impossible to
    use bcm2835 in full duplex mode.
    
    The error is caused by the split clock setup: clk_set_rate
    is called in hw_params, clk_prepare_enable in prepare. As hw_params
    doesn't check if the clock was already enabled clk_set_rate
    fails with EBUSY.
    
    Fix this by moving clock startup from prepare to hw_params and
    let hw_params properly deal with an already set up or enabled
    clock.
    Signed-off-by: default avatarMatthias Reichl <hias@horus.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    8d5737a5
bcm2835-i2s.c 24.3 KB