ASoC: hdmi-codec: fix routing
authorRussell King <rmk+kernel@armlinux.org.uk>
Sat, 14 Jul 2018 15:01:06 +0000 (16:01 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 16 Jul 2018 14:30:03 +0000 (15:30 +0100)
commitd30e23d69981a4b665f5ce8711335df986576389
tree3552d5058a87a603186fcfc72bb1c8651f8e6eff
parent090345ce7265dd111299e3a63cdc79c3ef924481
ASoC: hdmi-codec: fix routing

Commit 943fa0228252 ("ASoC: hdmi-codec: Use different name for playback
streams") broke hdmi-codec's routing between it's output "TX" widget
and the S/PDIF or I2S streams by renaming the streams.

Whether an error occurs or not is dependent on whether there is another
widget called "Playback" registered by some other component - if there
is, that widget will be (incorrectly) bound to the HDMI codec's "TX"
output widget.  If we end up connecting "TX" incorrectly, it can result
in components not being started, causing no audio output.

Since the I2S and S/PDIF streams now have different names, we can't
use a static route at component level to describe the relationship, so
arrange to dynamically create the route when the DAI driver is probed.

Fixes: 943fa0228252 ("ASoC: hdmi-codec: Use different name for playback streams")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/hdmi-codec.c