ASoC: sun8i-codec: Add the AIF3 DAI, widgets, and routes
authorSamuel Holland <samuel@sholland.org>
Wed, 14 Oct 2020 06:19:41 +0000 (01:19 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 26 Oct 2020 14:57:06 +0000 (14:57 +0000)
commit5a7f34ab0232bc50d39ac0627a470425227fed7d
treebc164f938e67bd5cfaa4ca27158ec109a085d653
parent50ec8422acd2cdadf5599cc046a5448770542aa7
ASoC: sun8i-codec: Add the AIF3 DAI, widgets, and routes

AIF3 has some differences from AIF1 and AIF2:
 - It supports one channel only
 - It supports master mode only
 - It is not directly connected to any of the mixers; instead all audio
   goes through a mux with AIF2.
 - It does not have its own clock dividers; instead it reuses AIF2 BCLK
   and LRCK. This means that when both AIF2 and AIF3 are active, they
   must use the same sample rate and total frame width. Since AIF2 and
   AIF3 are only used for codec2codec DAI links, constraints are not
   applicable here; the only thing we can do when the rates don't match
   is report an error.

Make the necessary adjustments to support this AIF.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20201014061941.4306-18-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sunxi/sun8i-codec.c