Skip to content

Commit e3420cf

Browse files
authored
Merge pull request #145 from zhigang-wu/topic/test
define the ssp fifo depth macro to be generic
2 parents a2cfd8c + a35bcd5 commit e3420cf

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

src/drivers/apl-ssp.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,10 @@ static inline int ssp_set_config(struct dai *dai,
574574
goto out;
575575
}
576576

577-
tft = MIN(8, sample_width * active_tx_slots);
578-
rft = MIN(8, sample_width * active_rx_slots);
577+
tft = MIN(SSP_FIFO_DEPTH - SSP_FIFO_WATERMARK,
578+
sample_width * active_tx_slots);
579+
rft = MIN(SSP_FIFO_DEPTH - SSP_FIFO_WATERMARK,
580+
sample_width * active_rx_slots);
579581

580582
sscr3 |= SSCR3_TX(tft) | SSCR3_RX(rft);
581583

src/platform/apollolake/include/platform/platform.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ struct sof;
121121
/* minimal L1 exit time in cycles */
122122
#define PLATFORM_FORCE_L1_EXIT_TIME 585
123123

124+
/* the SSP port fifo depth */
125+
#define SSP_FIFO_DEPTH 16
126+
127+
/* the watermark for the SSP fifo depth setting */
128+
#define SSP_FIFO_WATERMARK 8
129+
124130
/* Platform defined panic code */
125131
static inline void platform_panic(uint32_t p)
126132
{

src/platform/cannonlake/include/platform/platform.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ struct sof;
118118
/* minimal L1 exit time in cycles */
119119
#define PLATFORM_FORCE_L1_EXIT_TIME 482
120120

121+
/* the SSP port fifo depth */
122+
#define SSP_FIFO_DEPTH 16
123+
124+
/* the watermark for the SSP fifo depth setting */
125+
#define SSP_FIFO_WATERMARK 8
126+
121127
/* Platform defined trace code */
122128
static inline void platform_panic(uint32_t p)
123129
{

0 commit comments

Comments
 (0)