* Peter Ujfalusi peter.ujfalusi@ti.com [161205 01:35]:
On 12/04/2016 03:33 AM, Matt Ranostay wrote:
- Also setting of the QoS latency for the FIFO which varies upon the buffer
*/
- size. Approximately 2.3 milliseconds per FIFO location.
void omap_mcbsp_start(struct omap_mcbsp *mcbsp, int tx, int rx) { int enable_srg = 0;
int latency = mcbsp->pdata->buffer_size * 23;
I think this is not correct. The McBSP FIFO time depends on the sample rate and on the number of channels the audio is using. With 8KHz mono you have 12 times more time per FIFO element compared to 48KHz stereo.
As it has been discussed with Tony we should calculate the QoS latency in hw_params:
Ok yeah missed that part of the thread but it makes sense. Just one question should the latency value be only based on the TX FIFO threshold? I assume capture and transmit have two different settings.
Yes, I believe we should apply the lowest QoS when both direction is active. If the second stream needs lower QoS, we should switch to use that, if it would need longer, we should keep the QoS placed for the first stream.
Sounds good to me.
Regards,
Tony