• Daniel Mack's avatar
    ASoC: pxa-ssp: allow more flexible setup order · 737e370a
    Daniel Mack authored
    The pxa-ssp driver currently assumes that .set_fmt() is called before
    .set_clkdiv(), .set_pll() etc.
    
    Commit a8bd0ee5 ("ASoC: raumfeld: Use static DAI format setup") broke
    support for Raumfeld hardware (and possible other PXA based ones) because
    it effectively changed the order of these calls. Also, as the call to
    .set_fmt() is now done at probe time, the port clock is not yet enabled.
    
    To fix this, strip all hardware register access code from the .set_fmt()
    callback and memorize the desired value, so we can use it from the
    .hw_params() callback. Also make the .set_fmt() callback less destructive
    by reading all registers that it writes to in the beginning and only
    masking out the bits that it possibly fiddles with.
    Signed-off-by: default avatarDaniel Mack <daniel@zonque.org>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    737e370a
pxa-ssp.c 20.5 KB