Skip to contentSkip to conversation

New PC-Speaker driver

ANNOUNCE Stas Sergeev 8 participants 12 messages Aug 14, 2002 – Aug 23, 2002

lore
Share & tools
lore
#0 lore raw

Hello.

Quoted 4 lines · Denis Vlasenko
Quoted 3 lines

The latest patch for 2.4.18 kernel
is available here:
http://www.geocities.com/stssppnn/pcsp.html

Tested. Works for playing MP3s.

Thanks for your testing, indeed my primary goal was to make the sound quality acceptable even for playing MP3s.
With the motherboard's output attached to an external speakers the quality is definitely acceptable, but for the internal beeper I am not shure if it is possible to really enjoy MP3s however:)

#1 lore raw
Quoted 6 lines · On Wed, 14 Aug 2002 20:58:20 +0400 Stas Sergeev <[email protected]> wrote:

Hello.

Quoted 3 lines · Denis Vlasenko
Quoted 3 lines

The latest patch for 2.4.18 kernel
is available here:
http://www.geocities.com/stssppnn/pcsp.html

Quoted 8 lines
Quoted 1 line

Tested. Works for playing MP3s.

Thanks for your testing, indeed my primary goal was to make the sound quality acceptable even for playing MP3s.
With the motherboard's output attached to an external speakers the quality is definitely acceptable, but for the internal beeper I am not shure if it is possible to really enjoy MP3s however:)

I can get some pretty decent sound out of it, but I also get some horrible noise. Even if I send the driver a stream of zeroes, as soon as it's opened it starts generating some horrible clicks and a high-pitched whine.

Do I blame my motherboard (actually, a laptop)? Is there any way to fix this, or at least improve it?

#2 lore raw
Quoted 6 lines · Andrew Rodland
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines

The latest patch for 2.4.18 kernel
is available here:
http://www.geocities.com/stssppnn/pcsp.html

Tested. Works for playing MP3s.

Quoted 7 lines
Quoted 7 lines

Thanks for your testing, indeed my primary goal was to make the sound quality acceptable even for playing MP3s.
With the motherboard's output attached to an external speakers the quality is definitely acceptable, but for the internal beeper I am not shure if it is possible to really enjoy MP3s however:)

I'm afraid I'll disappoint you guys but chances of getting this into mainline are slim for the following reasons:

1.New motherboards have built-in sound, it may be crappy but definitely
better than PC speaker.
2.PC speaker hardware is not standardized enough. It is designed to beep reliably,
but no manufacturer tests it for good frequency diagram and such. Since they may be wired differently, you can't be sure which way you can force maximum amplitude on a particular mobo (there are 2 or 3 ways to reach max on different mobos. Or so I read in a magazine a long ago).
3.It loads CPU enormously. Even more so considering that some recent chipsets _emulate_
speaker via their integrated sound and SMM mode (ick).

These are typical symptoms:

Quoted 7 lines

I can get some pretty decent sound out of it, but I also get some horrible noise. Even if I send the driver a stream of zeroes, as soon as it's opened it starts generating some horrible clicks and a high-pitched whine.

Do I blame my motherboard (actually, a laptop)? Is there any way to fix this, or at least improve it?

In short: making it work right on wide variety of hardware is next to impossible and even then results are mediocre (low volume, radio quality).

Of course I understand the desire to make simple hardware do nice and unexpected things which it even wasn't designed to do. :-) Maybe ALSA team have some member crazy enough to join you.
--
vda

#3 lore raw
Quoted 15 lines · Denis Vlasenko
Quoted 6 lines · Andrew Rodland
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines

The latest patch for 2.4.18 kernel
is available here:
http://www.geocities.com/stssppnn/pcsp.html

Tested. Works for playing MP3s.

Quoted 7 lines
Quoted 7 lines

Thanks for your testing, indeed my primary goal was to make the sound quality acceptable even for playing MP3s.
With the motherboard's output attached to an external speakers the quality is definitely acceptable, but for the internal beeper I am not shure if it is possible to really enjoy MP3s however:)

Quoted 5 lines

I'm afraid I'll disappoint you guys but chances of getting this into mainline are slim for the following reasons:

1.New motherboards have built-in sound, it may be crappy but definitely
better than PC speaker.

Non argument. What about old motherboards? What about modern motherboards that don't have sound, and yes, they do exist.

Quoted 5 lines

2.PC speaker hardware is not standardized enough. It is designed to beep reliably,
but no manufacturer tests it for good frequency diagram and such. Since they may be wired differently, you can't be sure which way you can force maximum amplitude on a particular mobo (there are 2 or 3 ways to reach max on different mobos. Or so I read in a magazine a long ago).

Non argument. What about that hardware that it works fine on?

Quoted 2 lines

3.It loads CPU enormously. Even more so considering that some recent chipsets _emulate_
speaker via their integrated sound and SMM mode (ick).

Non argument. What about if you have cycles to burn, but no sound hardware?

Quoted 11 lines

These are typical symptoms:

Quoted 7 lines

I can get some pretty decent sound out of it, but I also get some horrible noise. Even if I send the driver a stream of zeroes, as soon as it's opened it starts generating some horrible clicks and a high-pitched whine.

Do I blame my motherboard (actually, a laptop)? Is there any way to fix this, or at least improve it?

In short: making it work right on wide variety of hardware is next to impossible and even then results are mediocre (low volume, radio quality).

So what? If it works on *your* hardware then you want the option.

Quoted 3 lines

Of course I understand the desire to make simple hardware do nice and unexpected things which it even wasn't designed to do. :-) Maybe ALSA team have some member crazy enough to join you.

You simply argued that because it might not work well for everybody, then nobody should have it. I hope you see the fallacy.

I have two machines here that want it, and on which it works fine. One of them is a modern server.

It's a small patch and decently coded. Sure, it could use a little more work, but that is exactly what it will get if it's in mainline. I'm in favor of seeing this in mainline.

Signature · 1 line
Daniel
#4 lore raw

There are easier equivalent ways to accurately measure the IRQ behaviour. Flip the state of a parallel port pin when you mask interrupts. You can even slap an oscilloscope on it that way

#5 lore raw
Quoted 3 lines · Alan Cox

There are easier equivalent ways to accurately measure the IRQ behaviour. Flip the state of a parallel port pin when you mask interrupts. You can even slap an oscilloscope on it that way

Right, I'll just go get my oscilloscope now...

In fact I relied on the technique you mentioned a great deal when I was doing realtime work with PCs. With a multi-trace digital scope the effect is something like a poor-man's logic analyser with a resolution of 10 us or so.

Another technique I can recommend highly is panicking by halting in a tight loop with the speaker set to emit some tone. It may be annoying for the guy at the next bench but in some code, such as transitioning to/from virtual86 mode, there aren't a lot of alternatives.

Signature · 1 line
Daniel
#6 lore raw
In reply to Daniel Phillips
Quoted 6 lines · Daniel Phillips
Quoted 3 lines

Of course I understand the desire to make simple hardware do nice and unexpected things which it even wasn't designed to do. :-) Maybe ALSA team have some member crazy enough to join you.

You simply argued that because it might not work well for everybody, then nobody should have it. I hope you see the fallacy.

It won't work well for everybody, then it won't live in mainline. Because newcomers will enable it, be pissed off with crap sound etc... "Political" reasons I'm afraid...

I don't say that driver is useless or something similar. I'd object to such statement myself. It is fun to play with.

Keeping it as a separate patch is completely sane thing to do.

Quoted 6 lines

I have two machines here that want it, and on which it works fine. One of them is a modern server.

It's a small patch and decently coded. Sure, it could use a little more work, but that is exactly what it will get if it's in mainline. I'm in favor of seeing this in mainline.

Me too, but my initials are not LT :(
--
vda

#7 lore raw
Quoted 1 line · Denis Vlasenko

Keeping it as a separate patch is completely sane thing to do.

No it's not, it will rot and not be maintained as it should be.

Signature · 1 line
Daniel
#8 lore raw
In reply to Denis Vlasenko
Quoted 1 line · Denis Vlasenko

It won't work well for everybody, then it won't live in mainline.

Bad reason. You can select IDE without the fixes for your particular buggy IDE adapter and have it eat the disks. Still, turning off RZ1000 and CMDxxx fixes is possible for those that know they have a good adapter.

So, no need to reject the speaker driver for "crap sound". It'll be usable with a good speaker, and the config help text can simply state that it is a last-resort driver which might work badly because it pushes the hardware.

Quoted 2 lines

Because newcomers will enable it, be pissed off with crap sound etc... "Political" reasons I'm afraid...

The senseless cpu usage for something as simple as sound is worse. Consider putting a old voice modem on a serial port and connect a speaker to the phone output...

Helge Hafting

#9 lore raw
Quoted 2 lines · Helge Hafting

The senseless cpu usage for something as simple as sound is worse.

Sound is simple? Okaaaay....

I first coded this technique up on a 20 MHz 386, running with a 20 KHz interrupt. My current machine is more than 1,000 times faster.

If you can spare the 3-5% cpu anyway, who cares? And finally, nobody is forcing anybody to configure this driver.

Signature · 1 line
Daniel
#10 lore raw
In reply to Daniel Phillips

Hi!

Quoted 4 lines
Quoted 2 lines

In short: making it work right on wide variety of hardware is next to impossible and even then results are mediocre (low volume, radio quality).

So what? If it works on *your* hardware then you want the option.

It will work well enough to be used for speech synthesis on most hw. It only eats CPU when in use. [Integrating festival into kernel for *speaking* panics?]

Pavel

Signature · 2 lines
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.
#11 lore raw
In reply to Andrew Rodland
Quoted 7 lines · Andrew Rodland

I can get some pretty decent sound out of it, but I also get some horrible noise. Even if I send the driver a stream of zeroes, as soon as it's opened it starts generating some horrible clicks and a high-pitched whine.

Do I blame my motherboard (actually, a laptop)? Is there any way to fix this, or at least improve it?

Adding a capacitor is supposed to help a PC speaker sound driver.