i.MX8MN: SAI: First playback failure, second succeeds
Hi,
I am trying to get audio playback to work on i.MX8MN board with an ES9080 DAC (with a not yet upstreamed driver).
The first playback after a POR fails most of the time (about 70%):
speaker-test -t sine -f 2000 -c 4 -F S32_LE -D hw:3
speaker-test 1.2.6
Playback device is hw:3 Stream parameters are 48000Hz, S32_LE, 4 channels Sine wave rate is 2000.0000Hz Rate set to 48000Hz (requested 48000Hz) Buffer size range from 6 to 32768 Period size range from 3 to 4095 Using max buffer size 32768 Periods = 4 was set period_size = 2048 was set buffer_size = 32768 0 - Front Left Write error: -5,Input/output error xrun_recovery failed: -5,Input/output error Transfer failed: Input/output error
However, the second attempt always succeeds.
I dumped the E9080 registers and they match the good and failure cases.
Any suggestions as to where I should look?
Thanks
On Wed, Jan 25, 2023 at 5:29 AM Fabio Estevam festevam@gmail.com wrote:
Hi,
I am trying to get audio playback to work on i.MX8MN board with an ES9080 DAC (with a not yet upstreamed driver).
The first playback after a POR fails most of the time (about 70%):
speaker-test -t sine -f 2000 -c 4 -F S32_LE -D hw:3
speaker-test 1.2.6
Playback device is hw:3 Stream parameters are 48000Hz, S32_LE, 4 channels Sine wave rate is 2000.0000Hz Rate set to 48000Hz (requested 48000Hz) Buffer size range from 6 to 32768 Period size range from 3 to 4095 Using max buffer size 32768 Periods = 4 was set period_size = 2048 was set buffer_size = 32768 0 - Front Left Write error: -5,Input/output error xrun_recovery failed: -5,Input/output error Transfer failed: Input/output error
However, the second attempt always succeeds.
I dumped the E9080 registers and they match the good and failure cases.
Hi,
Can you also dump SAI registers ?
Hi Daniel,
On Wed, Jan 25, 2023 at 5:43 AM Daniel Baluta daniel.baluta@gmail.com wrote:
Can you also dump SAI registers ?
They also match in the working and non-working cases.
I have also tried applying your patch: https://lore.kernel.org/lkml/20190308173904.27298-1-daniel.baluta@nxp.com/
but it did not help.
Thanks
Hi Daniel,
On Wed, Jan 25, 2023 at 11:51 PM Fabio Estevam festevam@gmail.com wrote:
They also match in the working and non-working cases.
I have also tried applying your patch: https://lore.kernel.org/lkml/20190308173904.27298-1-daniel.baluta@nxp.com/
but it did not help.
It is working now. The error was caused by an out-of-tree patch to handle MCLK.
Without such a patch, it works well.
Thanks
participants (2)
-
Daniel Baluta
-
Fabio Estevam