All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Baluta <daniel.baluta@oss.nxp.com>
To: broonie@kernel.org
Cc: pierre-louis.bossart@linux.intel.com, lgirdwood@gmail.com,
	ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	peter.ujfalusi@linux.intel.com, daniel.baluta@nxp.com,
	Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Subject: [PATCH 02/12] ASoC: SOF: control: Add access field in struct snd_sof_control
Date: Thu, 16 Sep 2021 14:16:36 +0300	[thread overview]
Message-ID: <20210916111646.367133-3-daniel.baluta@oss.nxp.com> (raw)
In-Reply-To: <20210916111646.367133-1-daniel.baluta@oss.nxp.com>

From: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>

Add a new field to save the access setting for all controls
in struct snd_sof_control. This will be used to ensure that
only widgets belonging to static pipelines have volatile
controls.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 sound/soc/sof/sof-audio.h | 1 +
 sound/soc/sof/topology.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index 9a8d005e75a0..78a4a0c90a29 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -66,6 +66,7 @@ struct snd_sof_control {
 	int min_volume_step; /* min volume step for volume_table */
 	int max_volume_step; /* max volume step for volume_table */
 	int num_channels;
+	unsigned int access;
 	u32 readback_offset; /* offset to mmapped data if used */
 	struct sof_ipc_ctrl_data *control_data;
 	u32 size;	/* cdata size */
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index 96b8791f7cc1..d8f7b1edefc3 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -1250,6 +1250,7 @@ static int sof_control_load(struct snd_soc_component *scomp, int index,
 		return -ENOMEM;
 
 	scontrol->scomp = scomp;
+	scontrol->access = kc->access;
 
 	switch (le32_to_cpu(hdr->ops.info)) {
 	case SND_SOC_TPLG_CTL_VOLSW:
-- 
2.27.0


WARNING: multiple messages have this Message-ID (diff)
From: Daniel Baluta <daniel.baluta@oss.nxp.com>
To: broonie@kernel.org
Cc: pierre-louis.bossart@linux.intel.com,
	alsa-devel@alsa-project.org, kai.vehmanen@linux.intel.com,
	lgirdwood@gmail.com, daniel.baluta@nxp.com,
	linux-kernel@vger.kernel.org, ranjani.sridharan@linux.intel.com,
	Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
	peter.ujfalusi@linux.intel.com
Subject: [PATCH 02/12] ASoC: SOF: control: Add access field in struct snd_sof_control
Date: Thu, 16 Sep 2021 14:16:36 +0300	[thread overview]
Message-ID: <20210916111646.367133-3-daniel.baluta@oss.nxp.com> (raw)
In-Reply-To: <20210916111646.367133-1-daniel.baluta@oss.nxp.com>

From: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>

Add a new field to save the access setting for all controls
in struct snd_sof_control. This will be used to ensure that
only widgets belonging to static pipelines have volatile
controls.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 sound/soc/sof/sof-audio.h | 1 +
 sound/soc/sof/topology.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index 9a8d005e75a0..78a4a0c90a29 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -66,6 +66,7 @@ struct snd_sof_control {
 	int min_volume_step; /* min volume step for volume_table */
 	int max_volume_step; /* max volume step for volume_table */
 	int num_channels;
+	unsigned int access;
 	u32 readback_offset; /* offset to mmapped data if used */
 	struct sof_ipc_ctrl_data *control_data;
 	u32 size;	/* cdata size */
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index 96b8791f7cc1..d8f7b1edefc3 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -1250,6 +1250,7 @@ static int sof_control_load(struct snd_soc_component *scomp, int index,
 		return -ENOMEM;
 
 	scontrol->scomp = scomp;
+	scontrol->access = kc->access;
 
 	switch (le32_to_cpu(hdr->ops.info)) {
 	case SND_SOC_TPLG_CTL_VOLSW:
-- 
2.27.0


  parent reply	other threads:[~2021-09-16 11:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 11:16 [PATCH 00/12] Add support for on demand pipeline setup/destroy Daniel Baluta
2021-09-16 11:16 ` Daniel Baluta
2021-09-16 11:16 ` [PATCH 01/12] ASoC: topology: change the complete op in snd_soc_tplg_ops to return int Daniel Baluta
2021-09-16 11:16   ` Daniel Baluta
2021-09-16 11:16 ` Daniel Baluta [this message]
2021-09-16 11:16   ` [PATCH 02/12] ASoC: SOF: control: Add access field in struct snd_sof_control Daniel Baluta
2021-09-16 11:16 ` [PATCH 03/12] ASoC: SOF: topology: Add new token for dynamic pipeline Daniel Baluta
2021-09-16 11:16   ` Daniel Baluta
2021-09-16 11:16 ` [PATCH 04/12] ASoC: SOF: sof-audio: add helpers for widgets, kcontrols and dai config set up Daniel Baluta
2021-09-16 11:16   ` Daniel Baluta
2021-09-16 11:16 ` [PATCH 05/12] AsoC: dapm: export a couple of functions Daniel Baluta
2021-09-16 11:16   ` Daniel Baluta
2021-09-16 11:16 ` [PATCH 06/12] ASoC: SOF: Add new fields to snd_sof_route Daniel Baluta
2021-09-16 11:16   ` Daniel Baluta
2021-09-16 11:16 ` [PATCH 07/12] ASoC: SOF: restore kcontrols for widget during set up Daniel Baluta
2021-09-16 11:16   ` Daniel Baluta
2021-09-16 11:16 ` [PATCH 08/12] ASoC: SOF: Don't set up widgets during topology parsing Daniel Baluta
2021-09-16 11:16   ` Daniel Baluta
2021-09-16 11:16 ` [PATCH 09/12] ASoC: SOF: Introduce widget use_count Daniel Baluta
2021-09-16 11:16   ` Daniel Baluta
2021-09-16 11:16 ` [PATCH 10/12] ASoC: SOF: Intel: hda: make sure DAI widget is set up before IPC Daniel Baluta
2021-09-16 11:16   ` Daniel Baluta
2021-09-16 11:16 ` [PATCH 11/12] ASoC: SOF: Add support for dynamic pipelines Daniel Baluta
2021-09-16 11:16   ` Daniel Baluta
2021-09-16 11:16 ` [PATCH 12/12] ASoC: SOF: topology: Add kernel parameter for topology verification Daniel Baluta
2021-09-16 11:16   ` Daniel Baluta
2021-09-17 11:49 ` [PATCH 00/12] Add support for on demand pipeline setup/destroy Daniel Baluta
2021-09-17 11:49   ` Daniel Baluta

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=20210916111646.367133-3-daniel.baluta@oss.nxp.com \
    --to=daniel.baluta@oss.nxp.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.