#7603 NORM 8.2.0 (: 2.6.25 audio performance regression
Zarro Boogs per Child
bugtracker at laptop.org
Fri Aug 1 17:23:31 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:
-------------------------+--------------------------------------------------
Comment(by dsaxena):
Replying to [comment:10 dsd]:
> I think this is responsible:
>
http://gitweb.freedesktop.org/?p=hal/hal.git;a=commit;h=7430beeb6c6fd6c8e51c24df20fd53c526aed6e8
So looks like couple of options here:
* Back out the above change so we can do a custom hald build for now.
Not the best long term solution but would gives us something that works
now...
* Fixup the above in HAL so that if the battery device does have a
uevent, we don't poke at it continuously.
* The EC code should probably rewritten to it does not hold a lock and
disable IRQs for so long, but this is also a long-term project, not
something to get done by next wed's build.
I'm looking into the non-hald pops right now. Installing update.1 and
trying to see what has changed in TamTam. One commit that stands out:
{{{
ommit 35fdf3ba130c95f2528b38b54f6e4c9448540f4c
Author: James <olpc at localhost.localdomain>
Date: Wed Feb 21 04:35:16 2007 -0500
adding self-scheduler
diff --git a/Util/Clooper/aclient.cpp b/Util/Clooper/aclient.cpp
index f53655a..d5da736 100644
--- a/Util/Clooper/aclient.cpp
+++ b/Util/Clooper/aclient.cpp
@@ -5,6 +5,7 @@
#include <time.h>
#include <unistd.h>
#include <sys/time.h>
+#include <sched.h>
#include <vector>
#include <map>
@@ -18,7 +19,7 @@
unsigned int SAMPLE_RATE = 16000;
-snd_pcm_uframes_t PERIODS_PER_BUFFER = 4;
+snd_pcm_uframes_t PERIODS_PER_BUFFER = 2;
snd_pcm_uframes_t PERIOD_SIZE = (1<<8);
static int setparams (snd_pcm_t * phandle )
@@ -52,6 +53,23 @@ static int setswparams(snd_pcm_t *phandle)
return 0;
}
+static void setscheduler(void)
+{
+ struct sched_param sched_param;
+
+ if (sched_getparam(0, &sched_param) < 0) {
+ printf("Scheduler getparam failed...\n");
+ return;
+ }
+ sched_param.sched_priority = sched_get_priority_max(SCHED_RR);
: + if
(!sched_setscheduler(0, SCHED_RR, &sched_param)) {
+ printf("Scheduler set to Round Robin with priority
%i...\n", sched_param.
+ fflush(stdout);
+ return;
+ }
+ printf("!!!Scheduler set to Round Robin with priority %i
FAILED!!!\n", sched_para
+}
+
static double pytime(const struct timeval * tv)
{
return (double) tv->tv_sec + (double) tv->tv_usec / 1000000.0;
@@ -390,6 +408,8 @@ struct TamTamSound
buf[i*2] = buf[i*2+1] = 0.5 * sin( i / (float)nframes * 10.0
* M_PI);
}
+ setscheduler();
+
while (PERF_STATUS == CONTINUE)
{
int err = 0;
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/7603#comment:14>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list