Skip to content

Commit 3f3d7c0

Browse files
authored
Merge pull request #505 from RanderWang/link-dma-id
hda: set correct link dma channel
2 parents 8db46b4 + 9d62c12 commit 3f3d7c0

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/audio/dai.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,8 @@ static int dai_params(struct comp_dev *dev)
360360
return -EINVAL;
361361
}
362362

363-
/* get DMA channel, once the stream_tag is known */
364-
dd->chan = dma_channel_get(dd->dma, dev->params.stream_tag);
363+
/* get DMA channel, once the backend dma channel is known */
364+
dd->chan = dma_channel_get(dd->dma, dev->params.be_dma_ch);
365365
if (dd->chan < 0) {
366366
trace_dai_error("eDc");
367367
return -EINVAL;

src/audio/host.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,11 +515,10 @@ static int host_params(struct comp_dev *dev)
515515
host_elements_reset(dev);
516516
#endif
517517

518-
dev->params.stream_tag -= 1;
519518
/* get DMA channel from DMAC
520-
* note: stream_tag is ignored by dw-dma
519+
* note: host_dma_ch is ignored by dw-dma
521520
*/
522-
hd->chan = dma_channel_get(hd->dma, dev->params.stream_tag);
521+
hd->chan = dma_channel_get(hd->dma, dev->params.host_dma_ch);
523522
if (hd->chan < 0) {
524523
trace_host_error("eDC");
525524
return -ENODEV;

src/include/uapi/ipc.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,8 @@ struct sof_ipc_stream_params {
500500
enum sof_ipc_stream_direction direction;
501501
enum sof_ipc_frame frame_fmt;
502502
enum sof_ipc_buffer_format buffer_fmt;
503-
uint32_t stream_tag;
503+
uint32_t host_dma_ch;
504+
uint32_t be_dma_ch;
504505
uint32_t rate;
505506
uint32_t channels;
506507
uint32_t sample_valid_bytes;

0 commit comments

Comments
 (0)