SolidRun / linux-fslc

Linux kernel source tree
Other
12 stars 26 forks source link

4.9.89 audio regression #56

Closed warped-rudi closed 6 years ago

warped-rudi commented 6 years ago

With 4.9.89 Kodi will no longer output any sound. The log says something like:

ERROR: CAESinkALSA - snd_pcm_writei(-5) Input/output error - trying to recover ERROR: CAESinkALSA::HandleError(snd_pcm_writei(1)) - snd_pcm_writei returned -5 (Input/output error) ERROR: CAESinkALSA - snd_pcm_writei(-32) Broken pipe - trying to recover ERROR: CAESinkALSA - snd_pcm_writei(-5) Input/output error - trying to recover ERROR: CAESinkALSA::HandleError(snd_pcm_writei(1)) - snd_pcm_writei returned -5 (Input/output error) ERROR: CAESinkALSA::HandleError(snd_pcm_writei(2)) - snd_pcm_writei returned -5 (Input/output error) ERROR: CAESinkALSA - snd_pcm_writei(-5) Input/output error - trying to recover ERROR: CAESinkALSA::HandleError(snd_pcm_writei(1)) - snd_pcm_writei returned -5 (Input/output error) ERROR: CAESinkALSA::HandleError(snd_pcm_writei(2)) - snd_pcm_writei returned -5 (Input/output error)

It seems to be a generic issue because this does not only happen on HDMI but on all audio devices. I'm trying to figure out which patch introduced this (not really bisecting, but going backwards one revision after the other).

jnettlet commented 6 years ago

check the sdma patches. There were conflicting merges. Nothing major but the mainline patches could be causing errors caused by NXP's firmware.

warped-rudi commented 6 years ago

Argg! Something is fundamentally wrong here. If I downgrade both imx-sdma.c and fsl-edma.c I get sound back. The change in imx-sdma.c looks fishy to me. The newly introduced function sdma_disable_channel_with_delay() is by no means equivalent to sdma_terminate_all() plus a delay of 1ms. Not sure what's wrong with fsl-edma.c. Still investigating...

BTW, thanks for the board. It arrived last week.

jnettlet commented 6 years ago

Most likely I will just revert those two commits. Personally I am not even sure why they were tagged to be brought back to the LTS kernels

On Sat, Mar 24, 2018 at 11:13 AM Rudi Ihle notifications@github.com wrote:

Argg! Something is fundamentally wrong here. If I downgrade both imx-sdma.c and fsl-edma.c I get sound back. The change in imx-sdma.c looks fishy to me. The newly introduced function sdma_disable_channel_with_delay() is by no means equivalent to sdma_terminate_all() plus a delay of 1ms. Not sure what's wrong with fsl-edma.c. Still investigating...

BTW, thanks for the board. It arrived last week.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SolidRun/linux-fslc/issues/56#issuecomment-375865419, or mute the thread https://github.com/notifications/unsubscribe-auth/AhtJbPz_3YJ7FFDKVClz-pl9krouFvoPks5thhxjgaJpZM4S5pyh .

warped-rudi commented 6 years ago

A little mistake on my side: fsl-edma.c is not involved. As for sdma_disable_channel_with_delay(): For me it looks like this functions should be named sdma_terminate_all_with_delay() and should wait that stupid millisecond after calling sdma_terminate_all() to do the real work...

jnettlet commented 6 years ago

I reverted the problematic patch. This seems to be an upstream problem since NXP has a completely different method for terminating the DMA channel. This is tested and fixed with the Reverted patch.