[alsa-devel] [PATCH 3/3] topology: add support for adding bytes controls to widgets

Liam Girdwood liam.r.girdwood at linux.intel.com
Fri Aug 7 18:03:54 CEST 2015


From: Mengdong Lin <mengdong.lin at intel.com>

Widgets can now contain byte controls.

Signed-off-by: Mengdong Lin <mengdong.lin at intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
 src/topology/dapm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/topology/dapm.c b/src/topology/dapm.c
index 25d11d7..4217211 100644
--- a/src/topology/dapm.c
+++ b/src/topology/dapm.c
@@ -160,6 +160,10 @@ static int tplg_build_widget(snd_tplg_t *tplg,
 				err = copy_dapm_control(elem, ref->elem);
 			break;
 
+		case SND_TPLG_TYPE_BYTES:
+			if (!ref->elem)
+				ref->elem = tplg_elem_lookup(&tplg->bytes_ext_list,
+						ref->id, SND_TPLG_TYPE_BYTES);
 			if (ref->elem)
 				err = copy_dapm_control(elem, ref->elem);
 			break;
-- 
2.1.4



More information about the Alsa-devel mailing list