ASoC: hdmi-codec: ELD control corresponds to the PCM stream
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 6 Jul 2017 00:39:29 +0000 (00:39 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 17 Jul 2017 11:05:38 +0000 (12:05 +0100)
commitecbb1b8d97a78a72003fcb19292da502d393bf80
treed97c471d1413d1235abc001028e0e0dbe9e6ffe1
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877
ASoC: hdmi-codec: ELD control corresponds to the PCM stream

Current hdmi-codec driver is using hdmi_controls for "ELD" control.
But, hdmi-codec driver might be used from many HDMIs. Thus, we need
to correspond device number, otherwise we will receive below error.

        xxx: control x:x:x:ELD:x is already present

This patch registers ELD control in .pcm_new by using
.device = rtd->pcm->device to corresponding to PCM stream.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[Takashi: use snd_ctl_new1()/snd_ctl_add()]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/hdmi-codec.c