* alsamixer crashes with SIGFPE
@ 2010-02-18 8:29 Florian Faber
2010-02-18 8:44 ` Clemens Ladisch
0 siblings, 1 reply; 4+ messages in thread
From: Florian Faber @ 2010-02-18 8:29 UTC (permalink / raw)
To: alsa-devel@alsa-project.org
Hi,
there are several spots in alsamixer's mixer_display.c that cause SIGFPE
through division by zero if (max-min) is zero:
bar_height = ((volumes[c] - min) * volume_height + max - min - 1) / (max
- min);
value = ((volumes[0] - min) * 100 + (max - min) / 2) / (max - min);
etc.
Flo
--
Machines can do the work, so people have time to think.
public key DA43FEF4 x-hkp://wwwkeys.eu.pgp.net
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: alsamixer crashes with SIGFPE
2010-02-18 8:29 alsamixer crashes with SIGFPE Florian Faber
@ 2010-02-18 8:44 ` Clemens Ladisch
2010-02-18 8:51 ` Florian Faber
0 siblings, 1 reply; 4+ messages in thread
From: Clemens Ladisch @ 2010-02-18 8:44 UTC (permalink / raw)
To: Florian Faber; +Cc: alsa-devel@alsa-project.org
Florian Faber wrote:
> there are several spots in alsamixer's mixer_display.c that cause SIGFPE
> through division by zero if (max-min) is zero:
>
> bar_height = ((volumes[c] - min) * volume_height + max - min - 1) / (max - min);
> value = ((volumes[0] - min) * 100 + (max - min) / 2) / (max - min);
Thanks. With which hardware do you see this error?
Regards,
Clemens
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: alsamixer crashes with SIGFPE
2010-02-18 8:44 ` Clemens Ladisch
@ 2010-02-18 8:51 ` Florian Faber
2010-02-19 16:54 ` Clemens Ladisch
0 siblings, 1 reply; 4+ messages in thread
From: Florian Faber @ 2010-02-18 8:51 UTC (permalink / raw)
To: alsa-devel
Clemens,
>> bar_height = ((volumes[c] - min) * volume_height + max - min - 1) / (max - min);
>> value = ((volumes[0] - min) * 100 + (max - min) / 2) / (max - min);
>
> Thanks. With which hardware do you see this error?
I tried it with the hdspm driver after seeing all the complaints about
hdsp no longer working with 2.6.32.
Unfortunately cannot look into that as I no longer have hdsp cards around.
Flo
--
Machines can do the work, so people have time to think.
public key DA43FEF4 x-hkp://wwwkeys.eu.pgp.net
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: alsamixer crashes with SIGFPE
2010-02-18 8:51 ` Florian Faber
@ 2010-02-19 16:54 ` Clemens Ladisch
0 siblings, 0 replies; 4+ messages in thread
From: Clemens Ladisch @ 2010-02-19 16:54 UTC (permalink / raw)
To: Florian Faber; +Cc: alsa-devel
Florian Faber wrote:
>>> bar_height = ((volumes[c] - min) * volume_height + max - min - 1) / (max - min);
>>> value = ((volumes[0] - min) * 100 + (max - min) / 2) / (max - min);
>>
>> Thanks. With which hardware do you see this error?
>
> I tried it with the hdspm driver after seeing all the complaints about
> hdsp no longer working with 2.6.32.
That driver does not appear to have any controls where min==max.
Anyway, I've fixed alsamixer.
The hdsp problems are probably caused by the firmware loader change.
Regards,
Clemens
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-02-19 16:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-18 8:29 alsamixer crashes with SIGFPE Florian Faber
2010-02-18 8:44 ` Clemens Ladisch
2010-02-18 8:51 ` Florian Faber
2010-02-19 16:54 ` Clemens Ladisch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.