• Zidan Wang's avatar
    ASoC: fsl_sai: fix no frame clk in master mode · 3e3f8bd5
    Zidan Wang authored
    After several open/close sai test with ctrl+c, there will be
    I/O error. The SAI can't work anymore, can't recover. There
    will be no frame clock. With adding the software reset in
    trigger stop, the issue can be fixed.
    
    This is a hardware bug/errata and reset is the only option.
    
    According to the reference manual, the software reset doesn't
    reset any control register but only internal hardware logics
    such as bit clock generator, status flags, and FIFO pointers.
    (Our purpose is just to reset the clock generator while the
    software reset is the only way to do that.)
    
    Since slave mode doesn't use the clock generator, only apply
    the reset procedure to the master mode.
    
    For asynchronous mode, TX will not be reset when RX is still
    running. In this case, i can't reproduce this issue.
    Signed-off-by: default avatarZidan Wang <zidan.wang@freescale.com>
    Acked-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    3e3f8bd5
fsl_sai.c 21.9 KB