Joachim is right, the process is checking if the volume has changed every microsecond, this is known to cause problems in some setups.

if you just change that value to a more reasonable one, it should be fine. usleep(10000) should work fine.

it is right that this is not the best way to do this, but at the time I wrote this, it worked fine.

glad to hear someone is using osdsh! i'll try to set it up in my work machine to see what i can do to fix this bug.

thanks!!


El 19/10/2008, a las 03:29 p.m., Joachim Breitner escribió:

Hi,

Am Sonntag, den 19.10.2008, 22:20 +0200 schrieb Moritz Molle:
Joachim Breitner wrote:
Am Sonntag, den 19.10.2008, 02:05 +0200 schrieb Moritz Molle:

If you configure osdsh to show audio-mixer changes (osdctl -m 1), it eats up 100% of cpu. This is because in mixerwatch.c there is a line which looks
like so:

usleep(1);

This is wrong, because this doesn't really sleep at all. It should be sleep(1) without the 'u' for sleeping a hole second. Or the mixerchanges should be
polled via 'poll()' oder 'select()' which i tried for a patch, but
unfortunately didn't succeed.

here, I get the mixer setting displayed all right. Are you sure you use
the right command switch? According to the docs, -m sets the mixer
device.

(In that case, it should give a proper warning about "1" not being a
mixer)

No. With osdSH the -m switch chooses the mixer device, but with osdCTL you activate the capturing of changes on that device by specifying - m 1.
(-m 0 deactivates it). If you don't activate it, there shouldn't be
anything displayed if you change the volume.

The capturing of that volume changes is done by polling the values in an
infinite loop which includes that usleep(1) call (mixerwatch.c). But
this way it polls the values 1000'000 times per second, which doesn't
seem reasonable and costs enormously much cpu-time.


please keep the bug report in CC.

You are right, I could reproduce it (after loading snd-mixer-oss), and
sorry for the osdsh/osdctl confusion.

I’m CC’ing osdsh upstreams maintainer – Heron, could you please comment
on that issue?

Greetings,
Joachim

--
Joachim "nomeata" Breitner
Debian Developer
 [EMAIL PROTECTED] | ICQ# 74513189 | GPG-Keyid: 4743206C
 JID: [EMAIL PROTECTED] | http://people.debian.org/~nomeata

Heron Ordoñez Guillén
[EMAIL PROTECTED]






--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to