Quantcast
Viewing all articles
Browse latest Browse all 5120

Interfacing (DSI, CSI, I2C, etc.) • Re: Problem with HDMI VC4 audio (channel remapping)

My guess is a sample is being lost in the dma to hdmi audio fifo. That will result in a channel swap from that point onwards.
I'll need to check from logging whether when the underrun messages appear whether something unusual happens.
I'm suspecting it may trigger a dma channel abort, and restart which perhaps is where the sample gets lost.
IMHO generally xruns cannot be avoided, it's a standard situation. The difference is that restarting the stream avoids the channel swap on VC4 HDMI, whereas standard xrun handling as recommended by alsa does not avoid the channel swap.

Example of the recommended xrun handling is https://github.com/tiwai/alsa-lib/blob/ ... #L226-L246 - at xrun the driver calls snd_pcm_stop(SND_PCM_STATE_XRUN) (e.g. https://github.com/torvalds/linux/blob/ ... .c#L63-L66 ) , which returns SND_PCM_STATE_XRUN to the client, which subsequenty calls snd_pcm_prepare() of the driver. This sequence should avoid the channel swap too (but it does not).

Statistics: Posted by phofman — Tue Jan 30, 2024 6:03 pm



Viewing all articles
Browse latest Browse all 5120

Trending Articles