Getting precise frame counts in alsa drivers on imx6q platform

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Getting precise frame counts in alsa drivers on imx6q platform

906 次查看
fred35
Contributor I

I am running a Yocto kernel (3.14.52 with PREEMPT_RT patch) on an imx6q board with 2 audio outputs :

- hdmi (via HDMI phy transmitter)

- jack ( via TLV320DAC32 chip)

The middleware running on top of the kernel (and the alsa lib) needs accurate delay (difference between hardware pointer and application pointer) to synchronize video rendering with audio stream.

Unfortunately, the hardware pointer is updated each time a DMA transfer has been completely done. This gives an unacceptable step effect.

The hardware can not provide a frame count of the audio rendering. Besides, there is not possibility to get a progress estimation of the DMA transfer. In these conditions, it is not amazing that  the residue granularity in the driver/alsa framework is set to DMA_RESIDUE_GRANULARITY_SEGMENT and not DMA_RESIDUE_GRANULARITY_BURST.

I have found a solution based on capturing timestamps to retrieve frame count, knowing the frame rate.

Did anyone experiment a more pretty solution?

Thank you.

标记 (1)
0 项奖励
回复
0 回复数