cavs: ssp: add delay after start

Adds delay after starting SSP interface.
It allows for SSP in slave mode to nicely
synchronize with clock and frame inputs.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
Tomasz Lauda 2019-06-04 15:56:16 +02:00 committed by Tomasz Lauda
parent 67e954668e
commit 5d42e0fdf0
5 changed files with 12 additions and 9 deletions

View File

@ -743,6 +743,9 @@ static void ssp_start(struct dai *dai, int direction)
ssp_update_bits(dai, SSRSA, 0x1 << 8, 0x1 << 8);
}
/* wait to get valid fifo status */
wait_delay(PLATFORM_SSP_DELAY);
spin_unlock(&dai->lock);
}
@ -754,7 +757,7 @@ static void ssp_stop(struct dai *dai, int direction)
spin_lock(&dai->lock);
/* wait to get valid fifo status */
wait_delay(PLATFORM_SSP_STOP_DELAY);
wait_delay(PLATFORM_SSP_DELAY);
/* stop Rx if neeed */
if (direction == DAI_DIR_CAPTURE &&

View File

@ -142,8 +142,8 @@ struct sof;
/* the watermark for the SSP fifo depth setting */
#define SSP_FIFO_WATERMARK 8
/* minimal SSP port stop delay in cycles */
#define PLATFORM_SSP_STOP_DELAY 2400
/* minimal SSP port delay in cycles */
#define PLATFORM_SSP_DELAY 2400
/* timer driven scheduling start offset in microseconds */
#define PLATFORM_TIMER_START_OFFSET 100

View File

@ -143,8 +143,8 @@ struct sof;
/* the watermark for the SSP fifo depth setting */
#define SSP_FIFO_WATERMARK 8
/* minimal SSP port stop delay in cycles */
#define PLATFORM_SSP_STOP_DELAY 3000
/* minimal SSP port delay in cycles */
#define PLATFORM_SSP_DELAY 3000
/* timer driven scheduling start offset in microseconds */
#define PLATFORM_TIMER_START_OFFSET 100

View File

@ -143,8 +143,8 @@ struct sof;
/* the watermark for the SSP fifo depth setting */
#define SSP_FIFO_WATERMARK 8
/* minimal SSP port stop delay in cycles */
#define PLATFORM_SSP_STOP_DELAY 4800
/* minimal SSP port delay in cycles */
#define PLATFORM_SSP_DELAY 4800
/* timer driven scheduling start offset in microseconds */
#define PLATFORM_TIMER_START_OFFSET 100

View File

@ -146,8 +146,8 @@ struct sof;
/* the watermark for the SSP fifo depth setting */
#define SSP_FIFO_WATERMARK 8
/* minimal SSP port stop delay in cycles */
#define PLATFORM_SSP_STOP_DELAY 3000
/* minimal SSP port delay in cycles */
#define PLATFORM_SSP_DELAY 3000
/* timer driven scheduling start offset in microseconds */
#define PLATFORM_TIMER_START_OFFSET 100