mirror of https://github.com/thesofproject/sof.git
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:
parent
67e954668e
commit
5d42e0fdf0
|
@ -743,6 +743,9 @@ static void ssp_start(struct dai *dai, int direction)
|
||||||
ssp_update_bits(dai, SSRSA, 0x1 << 8, 0x1 << 8);
|
ssp_update_bits(dai, SSRSA, 0x1 << 8, 0x1 << 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* wait to get valid fifo status */
|
||||||
|
wait_delay(PLATFORM_SSP_DELAY);
|
||||||
|
|
||||||
spin_unlock(&dai->lock);
|
spin_unlock(&dai->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -754,7 +757,7 @@ static void ssp_stop(struct dai *dai, int direction)
|
||||||
spin_lock(&dai->lock);
|
spin_lock(&dai->lock);
|
||||||
|
|
||||||
/* wait to get valid fifo status */
|
/* wait to get valid fifo status */
|
||||||
wait_delay(PLATFORM_SSP_STOP_DELAY);
|
wait_delay(PLATFORM_SSP_DELAY);
|
||||||
|
|
||||||
/* stop Rx if neeed */
|
/* stop Rx if neeed */
|
||||||
if (direction == DAI_DIR_CAPTURE &&
|
if (direction == DAI_DIR_CAPTURE &&
|
||||||
|
|
|
@ -142,8 +142,8 @@ struct sof;
|
||||||
/* the watermark for the SSP fifo depth setting */
|
/* the watermark for the SSP fifo depth setting */
|
||||||
#define SSP_FIFO_WATERMARK 8
|
#define SSP_FIFO_WATERMARK 8
|
||||||
|
|
||||||
/* minimal SSP port stop delay in cycles */
|
/* minimal SSP port delay in cycles */
|
||||||
#define PLATFORM_SSP_STOP_DELAY 2400
|
#define PLATFORM_SSP_DELAY 2400
|
||||||
|
|
||||||
/* timer driven scheduling start offset in microseconds */
|
/* timer driven scheduling start offset in microseconds */
|
||||||
#define PLATFORM_TIMER_START_OFFSET 100
|
#define PLATFORM_TIMER_START_OFFSET 100
|
||||||
|
|
|
@ -143,8 +143,8 @@ struct sof;
|
||||||
/* the watermark for the SSP fifo depth setting */
|
/* the watermark for the SSP fifo depth setting */
|
||||||
#define SSP_FIFO_WATERMARK 8
|
#define SSP_FIFO_WATERMARK 8
|
||||||
|
|
||||||
/* minimal SSP port stop delay in cycles */
|
/* minimal SSP port delay in cycles */
|
||||||
#define PLATFORM_SSP_STOP_DELAY 3000
|
#define PLATFORM_SSP_DELAY 3000
|
||||||
|
|
||||||
/* timer driven scheduling start offset in microseconds */
|
/* timer driven scheduling start offset in microseconds */
|
||||||
#define PLATFORM_TIMER_START_OFFSET 100
|
#define PLATFORM_TIMER_START_OFFSET 100
|
||||||
|
|
|
@ -143,8 +143,8 @@ struct sof;
|
||||||
/* the watermark for the SSP fifo depth setting */
|
/* the watermark for the SSP fifo depth setting */
|
||||||
#define SSP_FIFO_WATERMARK 8
|
#define SSP_FIFO_WATERMARK 8
|
||||||
|
|
||||||
/* minimal SSP port stop delay in cycles */
|
/* minimal SSP port delay in cycles */
|
||||||
#define PLATFORM_SSP_STOP_DELAY 4800
|
#define PLATFORM_SSP_DELAY 4800
|
||||||
|
|
||||||
/* timer driven scheduling start offset in microseconds */
|
/* timer driven scheduling start offset in microseconds */
|
||||||
#define PLATFORM_TIMER_START_OFFSET 100
|
#define PLATFORM_TIMER_START_OFFSET 100
|
||||||
|
|
|
@ -146,8 +146,8 @@ struct sof;
|
||||||
/* the watermark for the SSP fifo depth setting */
|
/* the watermark for the SSP fifo depth setting */
|
||||||
#define SSP_FIFO_WATERMARK 8
|
#define SSP_FIFO_WATERMARK 8
|
||||||
|
|
||||||
/* minimal SSP port stop delay in cycles */
|
/* minimal SSP port delay in cycles */
|
||||||
#define PLATFORM_SSP_STOP_DELAY 3000
|
#define PLATFORM_SSP_DELAY 3000
|
||||||
|
|
||||||
/* timer driven scheduling start offset in microseconds */
|
/* timer driven scheduling start offset in microseconds */
|
||||||
#define PLATFORM_TIMER_START_OFFSET 100
|
#define PLATFORM_TIMER_START_OFFSET 100
|
||||||
|
|
Loading…
Reference in New Issue