subtle bug with alsa driver backend or mxs-dac driver.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

subtle bug with alsa driver backend or mxs-dac driver.

1,717 Views
Felix1z
Contributor I

I'm hunting for subtle bug, happened under certain conditions:

 -- if application is LATE to feed alsa through snd_pcm_writei, the driver spits "DAC Underflow" . 

 after several underflows, entire sound subsystem stops working. alsa snd_pcm_writei returns -EAGAIN even after relaunching application. The only remedy is reboot.

I suspect that either AUDIOOUT fifo or DMA is stuck in error condition, and there is no code to recover from it. 

Has anyone experienced this issue?

LTIB kernel 2.6.31. all default parameters for imx233evk

Labels (1)
0 Kudos
Reply
2 Replies

1,146 Views
Felix1z
Contributor I

Attached errata (#2349 The DAC DMA halts unexpectedly) seems to describe exactly what's going on, but suggested workaround doesn't solve the issue! 

Can any freescale engineers confirm the proper workaround?

0 Kudos
Reply

1,146 Views
Felix1z
Contributor I

Attached is sample program to recreate the issue. To compile you will need to change your ltib location and compiler names.

In this program i'm opening alsa device, with stream parameters of 44100, 16bit stereo. I'm feeding the driver with 100mS packets, but i'm waiting 105mS between them, so every 5 mS there will be pause and DMA will underflow. The program runs fine for 10-15 seconds (you hear 100mS beeps), and then sound stops. Relaunching program doesn't solve the issue. Only rebooting helps.

Same program runs fine on linux pc.

0 Kudos
Reply