• Jarkko Nikula's avatar
    ASoC: tlv320aic3x: Sanitize output controls · 098b1718
    Jarkko Nikula authored
    Currently output controls are not uniform. Some routes are adjusted by
    mono controls that don't match to associated mixer switch, many routes are
    not covered at all and stereo controls have following variants:
    
    - L-to-L & R-to-R
    - R-to-L & R-to-R
    - L-to-L & R-to-L
    
    This patch attempts to fix these issues. First, for the convenience, only
    direct L-to-L, R-to-R and [L | R]-to-Mono routes are controlled by the
    stereo controls. This logic is also used with the output pin mute controls
    so all of them except mono output are controlled by stereo switches.
    
    Then rest of the swapped L-to-R and R-to-L routes are controlled by the
    mono controls that map to mixer switches with a same name. Mixers can then
    associate these switches and volumes together.
    Signed-off-by: default avatarJarkko Nikula <jhnikula@gmail.com>
    Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
    Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
    098b1718
tlv320aic3x.c 48.4 KB