• Lars-Peter Clausen's avatar
    ASoC: mfld_machine: Convert to table based DAPM and control setup · 43b95634
    Lars-Peter Clausen authored
    Use table based setup to register the controls and DAPM widgets and routes.
    This on one hand makes the code a bit cleaner and on the other hand
    the board level DAPM elements get registered in the card's DAPM context rather
    than in the CODEC's DAPM context.
    
    The mfld_machine driver is a bit special in that it directly writes to one of
    the CODEC registers from one of the control handlers. Previous to this patch it
    was able to get a pointer to the CODEC from the control, since the control was
    registered with the CODEC. This won't be possible anymore once the control is
    registered with the card. Since there are already global variables in the driver
    accessed in the same function the patch adds a global variable that holds a
    pointer to the CODEC and uses that.
    Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarMark Brown <broonie@linaro.org>
    43b95634
mfld_machine.c 11.7 KB