Skip to content

Commit 38d7853

Browse files
Dharageswari Rplbossart
authored andcommitted
ASoC: topology: Add support for WO and RO TLV byte kcontrols
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>
1 parent eb3eda2 commit 38d7853

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sound/soc/soc-topology.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,10 +603,11 @@ static int soc_tplg_kcontrol_bind_io(struct snd_soc_tplg_ctl_hdr *hdr,
603603
sbe->get = ext_ops[i].get;
604604
}
605605

606-
if (sbe->put && sbe->get)
607-
return 0;
608-
else
606+
if ((k->access & SNDRV_CTL_ELEM_ACCESS_TLV_READ) && !sbe->get)
609607
return -EINVAL;
608+
if ((k->access & SNDRV_CTL_ELEM_ACCESS_TLV_WRITE) && !sbe->put)
609+
return -EINVAL;
610+
return 0;
610611
}
611612

612613
/* try and map vendor specific kcontrol handlers first */

0 commit comments

Comments
 (0)