diff mbox

[3/3] topology: add support for adding bytes controls to widgets

Message ID 1438963434-6407-4-git-send-email-liam.r.girdwood@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Liam Girdwood Aug. 7, 2015, 4:03 p.m. UTC
From: Mengdong Lin <mengdong.lin@intel.com>

Widgets can now contain byte controls.

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

Patch

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;