tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: spkr vs spkr_synth module



On Mon, 12 Dec 2016, Christos Zoulas wrote:

On Dec 12, 10:21pm, nat%netbsd.org@localhost (Nathanial Sloss) wrote:
-- Subject: Re: spkr vs spkr_synth module

| As for the module I think more platforms have audio than pcppi, so that spkr
| synth should be the prominent one.
|
| And as for wskbd I was thinking that the bell function should use the speaker
| ioctl. Opening /dev/speaker would either use pcppi or spkr_synth if they were
| available.

I was thinking of having /dev/speaker0, /dev/speaker1 etc and
ln -s /dev/speaker0 /dev/speaker for compatibility. I.e. on pcppi machines
allow both speakers to attach.

For that to work, we should create a spkr_bus attachment, which would be provided by both pcppi and audio drivers, and have a _single_ spkr driver which attaches at spkr_bus. For modules, we'd also need to solve the problem of

	config(1) doesn't let you have "pseudo-root <attribute>"

It would also probably require some changes in subr_autoconf.c for config_{init,fini}_component's "frobbing" (inserting and removing) of new config structures (cf_driver, cf_attach, cf_data).

(This issue arose some time ago when I attempted to modularize the ld driver and all of its attachment points. It also exists as entry #11 in src/doc/TODO.modules file.)


+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+


Home | Main Index | Thread Index | Old Index