[alsa-devel] [PATCH] ASoC: omap-mcbsp: Add PM QoS support for McBSP to prevent glitches

Tony Lindgren tony at atomide.com
Fri Sep 2 22:09:23 CEST 2016


* Peter Ujfalusi <peter.ujfalusi at ti.com> [160902 12:45]:
> On 09/02/2016 06:54 PM, Pavel Machek wrote:
> >>
> >> I wonder why we have not seen this before? I can not recall anything like this
> >> with n900 (Jarkko might know that better) neither with n9/n950. On the n9/n950
> >> I have even put the OMAP3 to OFF during audio playback with the
> > 
> > I was seeing something like that with 4.x kernel on Nokia N900.
> 
> So it must be possible to reproduce it on BeagleBoard-xm... I will try to get
> the PM working on it and let's see (hear).

Yeah you can do that quite easily with current mainline or next with
omap2plus_defconfig. Just use minimal modules and make sure *hci USB
kernel modules are not loaded. So root on MMC, not NFS. The same goes
for few other modules, at least hsi and isp used to block idle but I
have not checked the recent status for those.

Then just configure uart timeouts and enable off idle, see the script
below.

The playback test I use is just something like:

modprobe snd_soc_omap_mcbsp
modprobe snd_soc_twl4030
modprobe snd_soc_omap_twl4030
alsactl restore
watch -n5 grep core_pwrdm /sys/kernel/debug/pm_debug/count &
#mpg123 test.mp3
aplay test.wav
killall watch

Then you should see core_pwrdm ret counts increase during playback
after maybe 10 or 20 seconds into playing.

Note that I've been mostly using my torpedo board as it has smsc911x
on gpmc and allows off idle with NFSroot. Should be very similar
configuration as on beagleboard xm.

Regards,

Tony

8< ------------------
#!/bin/bash

uarts=$(find /sys/class/tty/tty[SO]*/device/power/ -type d)
for uart in $uarts; do
	echo 3000 > $uart/autosuspend_delay_ms 2>&1
done

uarts=$(find /sys/class/tty/tty[SO]*/power/ -type d 2>/dev/null)
for uart in $uarts; do
	echo enabled > $uart/wakeup 2>&1
	echo auto > $uart/control 2>&1
done

echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode


More information about the Alsa-devel mailing list