* pcspkr.c
@ 2002-08-27 2:03 Paul Mackerras
2002-08-27 6:29 ` pcspkr.c Vojtech Pavlik
0 siblings, 1 reply; 2+ messages in thread
From: Paul Mackerras @ 2002-08-27 2:03 UTC (permalink / raw)
To: Vojtech Pavlik; +Cc: linuxppc-dev
Vojtech,
I like the way that the code for doing the beeps via the PC speaker
has been pulled out into its own little module.
We have a situation on PPC where we would want the PC speaker input
device to be compiled in to the kernel but only registered and
initialized on some machines but not on others. We can run the same
kernel binary on powermac, CHRP and PReP machines. The CHRP and PReP
machines have a PC-style southbridge, including the ISA timer/counter
that pcspkr.c uses. On powermacs there is no ISA bus, and to make a
beep it is necessary to push a suitable waveform out through the
audio.
So what we want is some way to decide at runtime whether to register
the pc-speaker input device or not.
Suggestions?
Thanks,
Paul.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: pcspkr.c
2002-08-27 2:03 pcspkr.c Paul Mackerras
@ 2002-08-27 6:29 ` Vojtech Pavlik
0 siblings, 0 replies; 2+ messages in thread
From: Vojtech Pavlik @ 2002-08-27 6:29 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Vojtech Pavlik, linuxppc-dev
On Tue, Aug 27, 2002 at 12:03:11PM +1000, Paul Mackerras wrote:
> Vojtech,
>
> I like the way that the code for doing the beeps via the PC speaker
> has been pulled out into its own little module.
>
> We have a situation on PPC where we would want the PC speaker input
> device to be compiled in to the kernel but only registered and
> initialized on some machines but not on others. We can run the same
> kernel binary on powermac, CHRP and PReP machines. The CHRP and PReP
> machines have a PC-style southbridge, including the ISA timer/counter
> that pcspkr.c uses. On powermacs there is no ISA bus, and to make a
> beep it is necessary to push a suitable waveform out through the
> audio.
>
> So what we want is some way to decide at runtime whether to register
> the pc-speaker input device or not.
>
> Suggestions?
1) Future grand vision: the arch-dependent code supplies a list of
devices present in the system in a generic format, and including or not
the speaker, based on what machine we're running on. The
hotplug/drivermodel core will then load or not load the pcspkr driver as
a module from initramfs.
2) Quick hack: I have no problem with an
#ifdef CONFIG_PPC
if (something)
return -ENODEV;
#endif
inside pcspkr_init()
--
Vojtech Pavlik
SuSE Labs
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-27 6:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-27 2:03 pcspkr.c Paul Mackerras
2002-08-27 6:29 ` pcspkr.c Vojtech Pavlik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).