Skip to contentSkip to conversation

Alternative PC speaker drivers?

RFD Robert B. Hamilton 2 participants 3 messages Apr 21, 1999 – Apr 23, 1999 Sound

lore
Share & tools
lore
#0 lore raw

Just wondering: is anyone interested in exploring alternative methods for the pc speaker driver?

I've one idea, with some rudimentary code, thats been gathering dust for a while. It uses the real time clock for timing, along with udelay. It also has a (very) rudimentary soundcore interface. The only advantage it would have as an alternative to the existing driver is that the only kernel code it touches is in rtc.c, and then only to export a couple of functions. If I understand correctly the objections to the current driver, this means it *might* have the potential to have an outside chance of getting slipped into the cannonical kernel distribution.

Disadvantage: it sucks up cpu cycles like a black hole. One would need at least a 266 MHz processor, and even then not recommended on a heavily loaded machine. Sound quality is not quite as good as existing driver, although I've gotten functional speech using rsynth, and can also tweak Maelstrom, eg, to get reasonable sound.

Any comments, discussion, helpful advice, would be much appreciated.
--Robert

#1 lore raw

The PC speaker driver is a neat hack, but with the cost of low-end sound cards ($25-$30 in these parts for a SB16), I wonder if anyone would really use it.

Quoted 2 lines · Robert B. Hamilton

Just wondering: is anyone interested in exploring alternative methods for the pc speaker driver?

--
Jeff Tranter (mailto:[email protected] http://www.pobox.com/~tranter)
Currently running Linux 2.2.6 Learn more at http://www.linux.org

#2 lore raw
In reply to Robert B. Hamilton
Quoted 3 lines

The PC speaker driver is a neat hack, but with the cost of low-end sound cards ($25-$30 in these parts for a SB16), I wonder if anyone would really use it.

Certainly that's true. Still, people might find a use for it as a "baseline" sound device (however crude) that is nearly guaranteed to be on every ix86 machine; and there is the occasional inquiry on l-k. So perhaps there is no good reason not to support it, *provided* the support can be done in a technically acceptable manner.

Which brings us back to my original note. Conventional wisdom has had it that the maximum 8192Hz rate of the RTC is too low to support the speaker driver. I don't think that is true any more. With faster cpus one can use udelay's to get a finer time resolution (although there are drawbacks). If this is possible then it is a much cleaner solution than the current method which varies the system clock frequency.

But I've only tested this on my computer, a K6, so I don't know how well it can work on others....I'd be willing to make the preliminary code available, and to work on midi, mixer and sequencer emulation, etc, if there were sufficient interest.....

----------------------------------------------------
Robert Hamilton
[email protected]