Jerome Brunet <jbrunet@xxxxxxxxxxxx> writes: > On the Amlogic SoC, there is a glue between the SoC audio outputs and the > input of the embedded Synopsys HDMI controller. > > On the g12a, this glue is mostly a couple of muxes to select the i2s and > spdif inputs of the hdmi controller. Each of these inputs may have > different hw_params and fmt which makes our life a little bit more > interesting, especially when switching between to active inputs. > > This glue is modeled as codec driver and uses codec-to-codec links to > connect to the Synopsys controller. This allows to use the regular > hdmi-codec driver (used by dw-hdmi i2s). > > To avoid glitches while switching input, the trick is to temporarily > force a disconnection of the mux output, which shutdowns the output dai > link. This also ensure that the stream parameters and fmt are updated > when the output is connected back. Tested-by: Kevin Hilman <khilman@xxxxxxxxxxxx>