|
@@ -763,8 +763,12 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba
|
|
/* does block span more than 1 section */
|
|
/* does block span more than 1 section */
|
|
if (ba->offset >= block->offset && ba->offset < block_end) {
|
|
if (ba->offset >= block->offset && ba->offset < block_end) {
|
|
|
|
|
|
|
|
+ /* add block */
|
|
|
|
+ list_move(&block->list, &dsp->used_block_list);
|
|
|
|
+ list_add(&block->module_list, block_list);
|
|
/* align ba to block boundary */
|
|
/* align ba to block boundary */
|
|
- ba->offset = block->offset;
|
|
|
|
|
|
+ ba->size -= block_end - ba->offset;
|
|
|
|
+ ba->offset = block_end;
|
|
|
|
|
|
err = block_alloc_contiguous(dsp, ba, block_list);
|
|
err = block_alloc_contiguous(dsp, ba, block_list);
|
|
if (err < 0)
|
|
if (err < 0)
|