• Hans de Goede's avatar
    ASoC: Intel: bytcr_rt5651: Add support for Bay Trail CR / SSP0 using boards · 8a880a20
    Hans de Goede authored
    Despite its name being prefixed with bytcr, before this commit the
    bytcr_rt5651 machine driver could not work with Bay Trail CR boards,
    as those only have SSP0 and it only supported SSP0-AIF1 setups.
    
    This commit adds support for this, autodetecting AIF1 vs AIF2 based on
    BIOS tables.
    
    While at it also add support for SSP2-AIF2 setups, as that requires only
    minimal extra code on top of the code adding SSP0-AIF1 / SSP0-AIF2 support.
    
    Note this code is all copy-pasted from bytcr_rt5640.c. I've looked into
    merging the 2 machine drivers into 1 to avoid copy-pasting, but there are
    enough subtile differences to make this hard *and* with all the quirks the
    machine driver already is full with if (variant-foo) then ... else ...
    constructs adding more of these is going to make the code unreadable.
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    8a880a20
bytcr_rt5651.c 25 KB