[alsa-devel] [RFC v2 3/3] ASoC: hdmi-codec: Example of PCM control bound to PCM device for multi HDMI DAIs.

Arnaud Pouliquen arnaud.pouliquen at st.com
Tue Nov 22 11:53:16 CET 2016


link ELD control to PCM device to support multi instances of the codec.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen at st.com>
---
 sound/soc/codecs/hdmi-codec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
index 90b5948..a807c2f 100644
--- a/sound/soc/codecs/hdmi-codec.c
+++ b/sound/soc/codecs/hdmi-codec.c
@@ -339,6 +339,8 @@ static int hdmi_codec_digital_mute(struct snd_soc_dai *dai, int mute)
 		.sig_bits = 24,
 	},
 	.ops = &hdmi_dai_ops,
+	.pcm_controls = hdmi_controls,
+	.num_pcm_controls = ARRAY_SIZE(hdmi_controls),
 };
 
 static const struct snd_soc_dai_driver hdmi_spdif_dai = {
@@ -381,8 +383,6 @@ static int hdmi_of_xlate_dai_name(struct snd_soc_component *component,
 
 static struct snd_soc_codec_driver hdmi_codec = {
 	.component_driver = {
-		.controls		= hdmi_controls,
-		.num_controls		= ARRAY_SIZE(hdmi_controls),
 		.dapm_widgets		= hdmi_widgets,
 		.num_dapm_widgets	= ARRAY_SIZE(hdmi_widgets),
 		.dapm_routes		= hdmi_routes,
-- 
1.9.1



More information about the Alsa-devel mailing list