ASoC: Intel: bytcr_rt5651: Add support for Bay Trail CR / SSP0 using boards
authorHans de Goede <hdegoede@redhat.com>
Sun, 4 Mar 2018 14:36:07 +0000 (15:36 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 7 Mar 2018 14:19:22 +0000 (14:19 +0000)
commit8a880a2014e3ab50e66252335bd71d61b0487a30
treedf80e65ab4ae32b0634a733e16db7d2077ec6821
parentf026e06317804f305d4665d266191e07e2bf6394
ASoC: Intel: bytcr_rt5651: Add support for Bay Trail CR / SSP0 using boards

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: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/bytcr_rt5651.c