alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* i.MX8MN: SAI: First playback failure, second succeeds
@ 2023-01-25  3:27 Fabio Estevam
  2023-01-25  8:43 ` Daniel Baluta
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2023-01-25  3:27 UTC (permalink / raw)
  To: Shengjiu Wang, Daniel Baluta; +Cc: Linux-ALSA, Mark Brown

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: i.MX8MN: SAI: First playback failure, second succeeds
  2023-01-25  3:27 i.MX8MN: SAI: First playback failure, second succeeds Fabio Estevam
@ 2023-01-25  8:43 ` Daniel Baluta
  2023-01-26  2:51   ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Baluta @ 2023-01-25  8:43 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Daniel Baluta, Linux-ALSA, Mark Brown, Shengjiu Wang

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 ?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: i.MX8MN: SAI: First playback failure, second succeeds
  2023-01-25  8:43 ` Daniel Baluta
@ 2023-01-26  2:51   ` Fabio Estevam
  2023-01-28 17:41     ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2023-01-26  2:51 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: Daniel Baluta, Linux-ALSA, Mark Brown, Shengjiu Wang

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: i.MX8MN: SAI: First playback failure, second succeeds
  2023-01-26  2:51   ` Fabio Estevam
@ 2023-01-28 17:41     ` Fabio Estevam
  0 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2023-01-28 17:41 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: Daniel Baluta, Linux-ALSA, Mark Brown, Shengjiu Wang

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-28 17:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-25  3:27 i.MX8MN: SAI: First playback failure, second succeeds Fabio Estevam
2023-01-25  8:43 ` Daniel Baluta
2023-01-26  2:51   ` Fabio Estevam
2023-01-28 17:41     ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).