• Lars-Peter Clausen's avatar
    ASoC: dapm: Consolidate MUXs and value MUXs · 3727b496
    Lars-Peter Clausen authored
    MUXs and value MUXs are almost identical, the only difference is that a value
    MUX uses a look-up table to map from the selected control item to a register
    value, while MUXs use a direct mapping. This patch uses
    snd_soc_enum_item_to_val() and snd_soc_enum_val_to_item(), which where earlier
    introduced during the consolidation of enum and value enum controls, to hide
    this difference. This allows us to use the same code path for both MUXs and
    value MUXs and a lot of nearly duplicated code can be removed.
    Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarMark Brown <broonie@linaro.org>
    3727b496
soc-dapm.c 98.9 KB