mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
ASoC: topology: Allow TLV control to be either read or write
commitfeb00b736a
upstream. There is no reason to force readwrite access on TLV controls. It can be either read, write or both. This is further evidenced in code where it performs following checks: 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; Fixes:1a3232d2f6
("ASoC: topology: Add support for TLV bytes controls") Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220112170030.569712-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
801d547fde
commit
bab8585ef5
1 changed files with 2 additions and 1 deletions
|
@ -599,7 +599,8 @@ static int soc_tplg_kcontrol_bind_io(struct snd_soc_tplg_ctl_hdr *hdr,
|
||||||
|
|
||||||
if (hdr->ops.info == SND_SOC_TPLG_CTL_BYTES
|
if (hdr->ops.info == SND_SOC_TPLG_CTL_BYTES
|
||||||
&& k->iface & SNDRV_CTL_ELEM_IFACE_MIXER
|
&& k->iface & SNDRV_CTL_ELEM_IFACE_MIXER
|
||||||
&& k->access & SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE
|
&& (k->access & SNDRV_CTL_ELEM_ACCESS_TLV_READ
|
||||||
|
|| k->access & SNDRV_CTL_ELEM_ACCESS_TLV_WRITE)
|
||||||
&& k->access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) {
|
&& k->access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) {
|
||||||
struct soc_bytes_ext *sbe;
|
struct soc_bytes_ext *sbe;
|
||||||
struct snd_soc_tplg_bytes_control *be;
|
struct snd_soc_tplg_bytes_control *be;
|
||||||
|
|
Loading…
Reference in a new issue