#7603 NORM 8.2.0 (: 2.6.25 audio performance regression

Zarro Boogs per Child bugtracker at laptop.org
Thu Jul 31 11:44:30 EDT 2008


#7603: 2.6.25 audio performance regression
-------------------------+--------------------------------------------------
   Reporter:  dsd        |       Owner:  dilinger              
       Type:  defect     |      Status:  new                   
   Priority:  normal     |   Milestone:  8.2.0 (was Update.2)  
  Component:  kernel     |     Version:  not specified         
 Resolution:             |    Keywords:  joyride-2181:- 8.2.0:?
Next_action:  never set  |    Verified:  0                     
  Blockedby:             |    Blocking:                        
-------------------------+--------------------------------------------------
Changes (by dsaxena):

 * cc: cjb (added)


Comment:

 I've reproduced the problem, and I'm also seeing (well, hearing) the same
 issue when I install  2.6.22-20080623.1.olpc.28f4cb6e780db07, the latest
 stable kernel. I don't see message from alsa-lib.

 From looking at the kernel output and top, it looks like the issue is
 mainly showing up when hald queries the battery status. Everytime I hear
 the the crackling/pops, I'm seeing the
 following:

 {{{
 [  476.152429] olpc-ec:  Task hald (1586) running cmd 0x15
 [  476.158343] olpc-ec:  received 0x13
 [  476.159743] olpc-ec:  Task hald (1586) running cmd 0x15
 [  476.168343] olpc-ec:  received 0x13
 [  476.178821] olpc-ec:  Task hald (1586) running cmd 0x16
 [  476.188343] olpc-ec:  received 0x62
 [  476.191384] olpc-ec:  Task hald (1586) running cmd 0x15
 [  476.198343] olpc-ec:  received 0x13
 [  476.202273] olpc-ec:  Task hald (1586) running cmd 0x10
 [  476.208343] olpc-ec:  received 0x55
 [  476.208343] olpc-ec:  received 0xc4
 [  476.211444] olpc-ec:  Task hald (1586) running cmd 0x15
 [  476.218343] olpc-ec:  received 0x13
 [  476.222644] olpc-ec:  Task hald (1586) running cmd 0x11
 [  476.228343] olpc-ec:  received 0x0
 [  476.228343] olpc-ec:  received 0x2
 [  476.231064] olpc-ec:  Task hald (1586) running cmd 0x15
 [  476.238343] olpc-ec:  received 0x13
 }}}

 Killing hald, on both 2.6.22 and 2.6.25 makes much of the crackling go
 away. If I do a 'cat' on any file in /sys/devices/platform/olpc-
 battery.0/power_supply/olpc-battery that triggers an EC command over and
 over while hald is stopped (or do cat /sys/devices/platform/olpc-
 battery.0/power_supply/olpc-battery/*), I hear the crack/pop/skip.

 Looking at the EC code, it's not completely surprising we're seeing this
 as the EC command path disables IRQs and then has various mdelay() calls
 which just spin during the delay period. This would explain why nice does
 not really make a difference as we're just not going to get rescheduled
 while IRQs are disabled.

 What surprises me is:

 1) I'm not seeing the same alsa messages as dsd. Am I doing something
 wrong ((I've enabled level 9 in /proc/kernel/printk and grep for alsa or
 underrun in /var/log/*" returns nothing)? Am I running into a different
 issue?

 2) Given that I can reproduce in 2.6.22 and the EC code is basically
 identical, why did we not catch this in earlier releases?

 I've also noticed that when I first startup TamTamMini,
 jffs2_garbage_collect_thread is running and I hear very garbled audio.
 Also, when hald is stopped, I ''think'' I still get problems once in a
 while, and looking at top, it seems to be when pdflush is running. I say
 "I think" b/c the drum beat samples are not very smooth to begin with, so
 I'm not really sure if I'm hearing something erroneous, if it is just the
 sample, or it's just my hearing not being that great. I'm going to setup
 another test case, playing either real music [no offense to TamTam
 developers :)] or a continuous tone, so it is much easier for me to detect
 erroneous output.

-- 
Ticket URL: <http://dev.laptop.org/ticket/7603#comment:4>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list