Skip to content

Commit b5c58f1

Browse files
set_chmap could come tool early
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
1 parent 4dbc825 commit b5c58f1

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/audio/copier/copier.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,8 +788,13 @@ static int set_chmap(struct comp_dev *dev, const void *data, size_t data_size)
788788
return -EINVAL;
789789
}
790790

791-
/// !!! ADD COMMENT !!!
792-
assert(cd->dd[0]->dma_buffer);
791+
if (!cd->dd[0]->dma_buffer) {
792+
/// !!! ADD COMMENT !!!
793+
/// This is atomic !!!
794+
cd->dd[0]->chmap = chmap_cfg->channel_map;
795+
return 0;
796+
}
797+
793798
dma_buf_channels = audio_stream_get_channels(&cd->dd[0]->dma_buffer->stream);
794799

795800
if (cd->direction == SOF_IPC_STREAM_PLAYBACK) {

0 commit comments

Comments
 (0)