On Mon, 29 Oct 2018 15:42:49 +0100 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi all,
Am 29.10.2018 um 13:50 schrieb H. Nikolaus Schaller hns@goldelico.com:
Am 29.10.2018 um 12:44 schrieb Michael Mrozek EvilDragon@openpandora.org:
Hi,
AESS / Audio is one of the biggest remaining issues we have on the Pyra. Everything else seems to work good enough for a start now, but missing audio on a gaming handheld is a bit annoying :)
With some kernel version, speaker output stopped completely, but Nikolaus is currently looking into what changed with each kernel version and when exactly it stopped working to get this to work again, at least.
Ok, here is the result:
letux-4.16-rc3 is the last version where audio works fine letux-4.16-rc4 makes the play command stop after some random time (ca. 1 .. 8 seconds) and audio sounds fluttering like a damaged capstan
In letux-4.17 and later there is no sound from the handsfree speakers any more, but headsets work. At least sometimes.
I have tried to find diffs for twl6040 or generally sound/ or mcpdm driver or device tree changes. But there aren't any.
What I did ffind is a diff in the letux_defconfig:
-# CONFIG_CPU_IDLE is not set +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y +# CONFIG_CPU_IDLE_GOV_LADDER is not set +CONFIG_CPU_IDLE_GOV_MENU=y +CONFIG_DT_IDLE_STATES=y
+# +# ARM CPU Idle Drivers +# +CONFIG_ARM_CPUIDLE=y
+CONFIG_VIDEOBUF2_V4L2=m
Could CPU_IDLE break the twl6040 audio subsystem? No idea. Therefore, I tried to remove it from 4.19.
And ... it makes audio work!
So we have a simple fix for 4.19. Although no explanation. And no idea how to make it work with CONFIG_CPU_IDLE=y.
What about simply adding pm_qos stuff like in omap-mcbsp.c to omap-abe-twl6030.c? If used harsh enough it should prevent any cpu idling. This as a first step. As a second step, RTFM again and check what can be idled and what not.
Well, no hardware here to test it myself.
Regards, Andreas