cavs: hda-dma: fix number of DMAs

The number of host and link DMAs need to be aligned on capture and
playback since they can be coupled/decoupled. The existing code
defined 8 link DMA channels for input and output which does not make
any sense.

This patch modifies the number of link DMAs to align with hardware
specs. The values were doubled-checked in the closed-source firmware,
there is no such thing as 8ch link DMA support.

cAVS 1.5/APL:
capture: 7 ch
playback: 6ch

cAVS 1.8+:
capture: 7ch
playbach: 9ch

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This commit is contained in:
Pierre-Louis Bossart 2021-09-23 16:12:27 -05:00 committed by Liam Girdwood
parent b3c9ec46d9
commit 3b3beb0b34
1 changed files with 7 additions and 5 deletions

View File

@ -19,15 +19,17 @@
#if CONFIG_APOLLOLAKE
#define DMAC0_CLASS 1
#define DMAC1_CLASS 2
#define DMAC_HOST_IN_CHANNELS_COUNT 7
#define DMAC_HOST_OUT_CHANNELS_COUNT 6
#define DMAC_LINK_IN_CHANNELS_COUNT 8
#define DMAC_LINK_OUT_CHANNELS_COUNT 8
#define DMAC_LINK_IN_CHANNELS_COUNT 7
#define DMAC_LINK_OUT_CHANNELS_COUNT 6
#elif CONFIG_CANNONLAKE || CONFIG_ICELAKE || CONFIG_TIGERLAKE
#define DMAC0_CLASS 6
#define DMAC1_CLASS 7
#define DMAC_HOST_IN_CHANNELS_COUNT 7
#define DMAC_HOST_OUT_CHANNELS_COUNT 9
#define DMAC_LINK_IN_CHANNELS_COUNT 9
#define DMAC_LINK_OUT_CHANNELS_COUNT 7
#define DMAC_LINK_IN_CHANNELS_COUNT 7
#define DMAC_LINK_OUT_CHANNELS_COUNT 9
#elif CONFIG_SUECREEK
#define DMAC0_CLASS 6
#define DMAC1_CLASS 7
@ -193,7 +195,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.caps = DMA_CAP_HDA,
.devs = DMA_DEV_HOST,
.base = GTW_HOST_IN_STREAM_BASE(0),
.channels = 7,
.channels = DMAC_HOST_IN_CHANNELS_COUNT,
.chan_size = GTW_HOST_IN_STREAM_SIZE,
},
.ops = &hda_host_dma_ops,