Skip to content

Commit f73332e

Browse files
RanderWanglgirdwood
authored andcommitted
dai: ALH set burst_elems
The burst length of GP-DMA should align to DMAT setting in Audio Link Hub, or XRUN will happen. We don't change DMAT setting since it is also used by cAVS FW. Signed-off-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
1 parent c6baa97 commit f73332e

File tree

5 files changed

+17
-0
lines changed
  • src
    • audio
    • platform
      • cannonlake/include/platform/drivers
      • icelake/include/platform/drivers
      • intel/cavs/lib
      • tigerlake/include/platform/drivers

5 files changed

+17
-0
lines changed

src/audio/dai.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,9 @@ static int dai_config(struct comp_dev *dev, struct sof_ipc_dai_config *config)
747747
*/
748748
dconfig->frame_fmt = SOF_IPC_FRAME_S32_LE;
749749

750+
dd->config.burst_elems =
751+
dd->dai->plat_data.fifo[dai->direction].depth;
752+
750753
/* As with HDA, the DMA channel is assigned in runtime,
751754
* not during topology parsing.
752755
*/

src/platform/cannonlake/include/platform/drivers/alh.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ static const uint8_t alh_handshake_map[64] = {
8484
-1, /* 63 - INVALID */
8585
};
8686

87+
#define ALH_GPDMA_BURST_LENGTH 4
88+
8789
#endif /* __PLATFORM_DRIVERS_ALH__ */
8890

8991
#else

src/platform/icelake/include/platform/drivers/alh.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ static const uint8_t alh_handshake_map[64] = {
8484
-1, /* 63 - INVALID */
8585
};
8686

87+
#define ALH_GPDMA_BURST_LENGTH 4
88+
8789
#endif /* __PLATFORM_DRIVERS_ALH__ */
8890

8991
#else

src/platform/intel/cavs/lib/dai.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ int dai_init(void)
156156
alh[i].index = (i / DAI_NUM_ALH_BI_DIR_LINKS_GROUP) << 8 |
157157
(i % DAI_NUM_ALH_BI_DIR_LINKS_GROUP);
158158
alh[i].drv = &alh_driver;
159+
160+
/* set burst length to align with DMAT value in the
161+
* Audio Link Hub.
162+
*/
163+
alh[i].plat_data.fifo[SOF_IPC_STREAM_PLAYBACK].depth =
164+
ALH_GPDMA_BURST_LENGTH;
165+
alh[i].plat_data.fifo[SOF_IPC_STREAM_CAPTURE].depth =
166+
ALH_GPDMA_BURST_LENGTH;
159167
spinlock_init(&alh[i].lock);
160168
}
161169
#endif

src/platform/tigerlake/include/platform/drivers/alh.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ static const uint8_t alh_handshake_map[64] = {
8484
-1, /* 63 - INVALID */
8585
};
8686

87+
#define ALH_GPDMA_BURST_LENGTH 4
88+
8789
#endif /* __PLATFORM_DRIVERS_ALH__ */
8890

8991
#else

0 commit comments

Comments
 (0)