mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
topology: Fix to skip writing of header for compound elements
While calculating the size of data to be written into the topology binary file, the size of the compound elements is added as well. This results in wrong file offset calculation and topology build failure. The compound elements shouldn't be written to the topology as these are already embedded as part of other elements. So, skip adding the size of compound elements to the file offset size calculation. Signed-off-by: GuruprasadX Pawse <guruprasadx.pawse@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
794390adfa
commit
dc68f69a66
1 changed files with 4 additions and 0 deletions
|
|
@ -95,6 +95,10 @@ static int write_elem_block(snd_tplg_t *tplg,
|
|||
list_for_each(pos, base) {
|
||||
/* find elems with the same index to make a block */
|
||||
elem = list_entry(pos, struct tplg_elem, list);
|
||||
|
||||
if (elem->compound_elem)
|
||||
continue;
|
||||
|
||||
elem_next = list_entry(pos->next, struct tplg_elem, list);
|
||||
block_size += elem->size;
|
||||
count++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue