• Nicolin Chen's avatar
    ASoC: fsl_ssi: Clean up helper functions of trigger() · 7d67bcb6
    Nicolin Chen authored
    The trigger() calls fsl_ssi_tx_config() and fsl_ssi_rx_config(),
    and both of them jump to fsl_ssi_config(). And fsl_ssi_config()
    later calls another fsl_ssi_rxtx_config().
    
    However, the whole routine, especially fsl_ssi_config() function,
    is too complicated because of the folowing reasons:
    1) It has to handle the concern of the opposite stream.
    2) It has to handle cases of offline configurations support.
    3) It has to handle enable and disable operations while they're
       mostly different.
    
    Since the enable and disable routines have more differences than
    TX and RX rountines, this patch simplifies these helper functions
    with the following changes:
    - Changing to two helper functions of enable and disable instead
      of TX and RX.
    - Removing fsl_ssi_rxtx_config() by separately integrating it to
      two newly introduced enable & disable functions.
    Signed-off-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
    Tested-by: default avatarCaleb Crome <caleb@crome.org>
    Tested-by: default avatarMaciej S. Szmigiero <mail@maciej.szmigiero.name>
    Reviewed-by: default avatarMaciej S. Szmigiero <mail@maciej.szmigiero.name>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    7d67bcb6
fsl_ssi.c 44 KB