Skip to content

Commit

Permalink
Merge pull request #505 from RanderWang/link-dma-id
Browse files Browse the repository at this point in the history
hda: set correct link dma channel
  • Loading branch information
lgirdwood authored Oct 25, 2018
2 parents 8db46b4 + 9d62c12 commit 3f3d7c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/audio/dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ static int dai_params(struct comp_dev *dev)
return -EINVAL;
}

/* get DMA channel, once the stream_tag is known */
dd->chan = dma_channel_get(dd->dma, dev->params.stream_tag);
/* get DMA channel, once the backend dma channel is known */
dd->chan = dma_channel_get(dd->dma, dev->params.be_dma_ch);
if (dd->chan < 0) {
trace_dai_error("eDc");
return -EINVAL;
Expand Down
5 changes: 2 additions & 3 deletions src/audio/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,11 +515,10 @@ static int host_params(struct comp_dev *dev)
host_elements_reset(dev);
#endif

dev->params.stream_tag -= 1;
/* get DMA channel from DMAC
* note: stream_tag is ignored by dw-dma
* note: host_dma_ch is ignored by dw-dma
*/
hd->chan = dma_channel_get(hd->dma, dev->params.stream_tag);
hd->chan = dma_channel_get(hd->dma, dev->params.host_dma_ch);
if (hd->chan < 0) {
trace_host_error("eDC");
return -ENODEV;
Expand Down
3 changes: 2 additions & 1 deletion src/include/uapi/ipc.h
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,8 @@ struct sof_ipc_stream_params {
enum sof_ipc_stream_direction direction;
enum sof_ipc_frame frame_fmt;
enum sof_ipc_buffer_format buffer_fmt;
uint32_t stream_tag;
uint32_t host_dma_ch;
uint32_t be_dma_ch;
uint32_t rate;
uint32_t channels;
uint32_t sample_valid_bytes;
Expand Down

0 comments on commit 3f3d7c0

Please sign in to comment.