• Lars-Peter Clausen's avatar
    ASoC: Prepare SOC_SINGLE_XR_SX controls for regmap · 6137a5ca
    Lars-Peter Clausen authored
    SOC_SINGLE_XR_SX controls currently only work with CODECs that set the
    'reg_word_size' field in their snd_soc_codec_driver struct. Going forward
    support for ASoC level IO will eventually be removed and all drivers will be
    converted to regmap. Preparing for the transition this patch adds support for
    CODECs using regmap for IO to the SOC_SINGLE_XR_SX control. We already have the
    val_bytes field in the CODEC struct which holds the number of bytes per word,
    but it is only initialized when regmap is used. Also initialize it for drivers
    still using legacy IO and update the SOC_SINGLE_XR_SX handlers to use it.
    Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarMark Brown <broonie@linaro.org>
    6137a5ca
soc-core.c 120 KB