topology: Merge private data before embedded controls of a widget
PATCH 1/2 topology: Merge private data before embedded controls of a widget
From: Mengdong Lin <[email protected]>
For a widget ABI object, its private data sits before the embedded controls, so we should merge the private data blocks at first, and then the embedded controls.
Signed-off-by Mengdong Lin <[email protected]>
src/topology/dapm.c +15 -7
@@ -160,7 +160,21 @@ static int tplg_build_widget(snd_tplg_t *tplg, base = &elem->ref_list; -/* for each ref in this control elem */ +/* A widget's private data sits before the embedded controls. +* So merge the private data blocks at first +*/ +list_for_each (pos, base) { + ref = list_entry(pos, struct tplg_ref, list); + +if (ref->type !=SND_TPLG_TYPE_DATA ) +continue ; + + err =tplg_copy_data (tplg, elem, ref); +if (err <0 ) +return err; + } + +/* Merge the embedded controls */ list_for_each (pos, base) { ref = list_entry(pos, struct tplg_ref, list);
@@ -190,12 +204,6 @@ static int tplg_build_widget(snd_tplg_t *tplg, err =copy_dapm_control (elem, ref->elem);break ; -case SND_TPLG_TYPE_DATA : - err =tplg_copy_data (tplg, elem, ref); -if (err <0 ) -return err; -break ; -default :break ; }
Signature · 1 line
2.5.0
Quoted 7 lines · On Thu, 2016-11-24 at 09:33 +0800, [email protected] wrote:
From: Mengdong Lin <[email protected]>
For a widget ABI object, its private data sits before the embedded controls, so we should merge the private data blocks at first, and then the embedded controls.
Signed-off-by Mengdong Lin <[email protected]>
Both
Acked-by Liam Girdwood <[email protected]>
Quoted 8 lines · On Thu, 24 Nov 2016 02:33:52 +0100, [email protected] wrote:
From: Mengdong Lin <[email protected]>
For a widget ABI object, its private data sits before the embedded controls, so we should merge the private data blocks at first, and then the embedded controls.
Signed-off-by Mengdong Lin <[email protected]>
Applied both patches with Liam's ack now.
thanks,
Takashi