linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olivier Moysan <olivier.moysan@st.com>
To: <lgirdwood@gmail.com>, <broonie@kernel.org>, <perex@perex.cz>,
	<tiwai@suse.com>, <mcoquelin.stm32@gmail.com>,
	<alexandre.torgue@st.com>, <alsa-devel@alsa-project.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-kernel@vger.kernel.org>, <olivier.moysan@st.com>,
	<arnaud.pouliquen@st.com>, <benjamin.gaignard@st.com>
Subject: [PATCH 1/5] ASoC: stm32: sai: fix iec958 controls indexation
Date: Thu, 28 Feb 2019 14:19:21 +0100	[thread overview]
Message-ID: <1551359965-25228-2-git-send-email-olivier.moysan@st.com> (raw)
In-Reply-To: <1551359965-25228-1-git-send-email-olivier.moysan@st.com>

Allow indexation of sai iec958 controls according
to device id.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
---
 sound/soc/stm/stm32_sai_sub.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index f9297228c41c..506360b7bc01 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -100,7 +100,7 @@
  * @slot_mask: rx or tx active slots mask. set at init or at runtime
  * @data_size: PCM data width. corresponds to PCM substream width.
  * @spdif_frm_cnt: S/PDIF playback frame counter
- * @snd_aes_iec958: iec958 data
+ * @iec958: iec958 data
  * @ctrl_lock: control lock
  */
 struct stm32_sai_sub_data {
@@ -1068,11 +1068,12 @@ static int stm32_sai_pcm_new(struct snd_soc_pcm_runtime *rtd,
 			     struct snd_soc_dai *cpu_dai)
 {
 	struct stm32_sai_sub_data *sai = dev_get_drvdata(cpu_dai->dev);
+	struct snd_kcontrol_new knew = iec958_ctls;
 
 	if (STM_SAI_PROTOCOL_IS_SPDIF(sai)) {
 		dev_dbg(&sai->pdev->dev, "%s: register iec controls", __func__);
-		return snd_ctl_add(rtd->pcm->card,
-				   snd_ctl_new1(&iec958_ctls, sai));
+		knew.device = rtd->pcm->device;
+		return snd_ctl_add(rtd->pcm->card, snd_ctl_new1(&knew, sai));
 	}
 
 	return 0;
-- 
2.7.4


  reply	other threads:[~2019-02-28 13:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 13:19 [PATCH 0/5] ASoC: stm32: sai: miscellaneous fixes Olivier Moysan
2019-02-28 13:19 ` Olivier Moysan [this message]
2019-03-04  0:06   ` Applied "ASoC: stm32: sai: fix iec958 controls indexation" to the asoc tree Mark Brown
2019-02-28 13:19 ` [PATCH 2/5] ASoC: stm32: sai: fix exposed capabilities in spdif mode Olivier Moysan
2019-03-04  0:06   ` Applied "ASoC: stm32: sai: fix exposed capabilities in spdif mode" to the asoc tree Mark Brown
2019-02-28 13:19 ` [PATCH 3/5] ASoC: stm32: sai: fix race condition in irq handler Olivier Moysan
2019-03-04  0:05   ` Applied "ASoC: stm32: sai: fix race condition in irq handler" to the asoc tree Mark Brown
2019-02-28 13:19 ` [PATCH 4/5] ASoC: stm32: sai: fix oversampling mode Olivier Moysan
2019-03-04  0:05   ` Applied "ASoC: stm32: sai: fix oversampling mode" to the asoc tree Mark Brown
2019-02-28 13:19 ` [PATCH 5/5] ASoC: stm32: sai: fix set_sync service Olivier Moysan
2019-03-04  0:05   ` Applied "ASoC: stm32: sai: fix set_sync service" to the asoc tree Mark Brown

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=1551359965-25228-2-git-send-email-olivier.moysan@st.com \
    --to=olivier.moysan@st.com \
    --cc=alexandre.torgue@st.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnaud.pouliquen@st.com \
    --cc=benjamin.gaignard@st.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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).