alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Arnaud Pouliquen <arnaud.pouliquen@st.com>
To: alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>,
	lgirdwood@gmail.com, Takashi Sakamoto <o-takashi@sakamocchi.jp>,
	Vinod Koul <vinod.koul@intel.com>,
	broonie@kernel.org,
	Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Subject: [RFC v2 3/3] ASoC: hdmi-codec: Example of PCM control bound to PCM device for multi HDMI DAIs.
Date: Tue, 22 Nov 2016 11:53:16 +0100	[thread overview]
Message-ID: <1479811996-2238-4-git-send-email-arnaud.pouliquen@st.com> (raw)
In-Reply-To: <1479811996-2238-1-git-send-email-arnaud.pouliquen@st.com>

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

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@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

      parent reply	other threads:[~2016-11-22 10:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-22 10:53 [RFC v2 0/3] ALSA controls management using index/device/sub-devices fields Arnaud Pouliquen
2016-11-22 10:53 ` [RFC v2 1/3] ASoC: core: allow DAI PCM controls bound to PCM device Arnaud Pouliquen
2016-11-24  4:55   ` Vinod Koul
2016-11-24  5:14     ` Takashi Sakamoto
2016-11-24  9:52       ` Arnaud Pouliquen
2016-11-22 10:53 ` [RFC v2 2/3] ASoC: sti: bind pcm controls to pcm device Arnaud Pouliquen
2016-11-22 10:53 ` Arnaud Pouliquen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479811996-2238-4-git-send-email-arnaud.pouliquen@st.com \
    --to=arnaud.pouliquen@st.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=lgirdwood@gmail.com \
    --cc=o-takashi@sakamocchi.jp \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).