diff mbox series

[1/2] ASoC: topology: Add support for WO and RO TLV byte kcontrols

Message ID 20200908092825.1813847-1-kai.vehmanen@linux.intel.com (mailing list archive)
State Accepted
Commit 819b9f6002391925b53817ed96638bd40bd1d34f
Headers show
Series [1/2] ASoC: topology: Add support for WO and RO TLV byte kcontrols | expand

Commit Message

Kai Vehmanen Sept. 8, 2020, 9:28 a.m. UTC
From: Dharageswari R <dharageswari.r@intel.com>

This patch adds support for write-only and read-only TLV byte kcontrols
by checking for appropriate get/put IO handlers.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 sound/soc/soc-topology.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Mark Brown Sept. 8, 2020, 5:20 p.m. UTC | #1
On Tue, 8 Sep 2020 12:28:24 +0300, Kai Vehmanen wrote:
> This patch adds support for write-only and read-only TLV byte kcontrols
> by checking for appropriate get/put IO handlers.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: topology: Add support for WO and RO TLV byte kcontrols
      commit: 819b9f6002391925b53817ed96638bd40bd1d34f
[2/2] ASoC: SOF: Implement snd_sof_bytes_ext_volatile_get kcontrol IO
      commit: 783560d02dd61aee20d1d00c1c061bcafea30264

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index cee998671318..28faaf58326e 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -603,10 +603,11 @@  static int soc_tplg_kcontrol_bind_io(struct snd_soc_tplg_ctl_hdr *hdr,
 				sbe->get = ext_ops[i].get;
 		}
 
-		if (sbe->put && sbe->get)
-			return 0;
-		else
+		if ((k->access & SNDRV_CTL_ELEM_ACCESS_TLV_READ) && !sbe->get)
 			return -EINVAL;
+		if ((k->access & SNDRV_CTL_ELEM_ACCESS_TLV_WRITE) && !sbe->put)
+			return -EINVAL;
+		return 0;
 	}
 
 	/* try and map vendor specific kcontrol handlers first */