From: Stas Sergeev <stsp@aknet.ru>
To: dtor_core@ameritech.net
Cc: Linux kernel <linux-kernel@vger.kernel.org>, vojtech@suse.cz
Subject: Re: [patch 1/1] pc-speaker: add SND_SILENT
Date: Thu, 23 Mar 2006 21:03:06 +0300 [thread overview]
Message-ID: <4422E2DA.7050305@aknet.ru> (raw)
In-Reply-To: <d120d5000603230651p6b43aad9ocad1aa3c2b51b388@mail.gmail.com>
Hi.
[ adding LKML to CC and removing akpm as this went into a
discussion phase apparently ]
Dmitry Torokhov wrote:
> Yes, I remember. And after re-reading all of it now I still see that
> he wasn't really happy with the solution.
Yes, neither did I, but there always should be some
compromiss if the better solution is not found. :)
>> Well, the main reason behind that change, is that there is a PC-Speaker
>> PCM driver/emulator, snd-pcsp, pending in an ALSA CVS. I can't get it
>> included in kernel before there is a way to disable the pcspkr driver.
> Why can't you? We have ALSA and OSS together in the kernel just fine.
But the pcspkr driver is not an OSS, it is an "input" driver.
> If you are concerned about both modules baing active at the same time
> do not let user compile pcspkr if snd_pcsp is selected for now.
The problem is that the snd-pcsp doesn't replace pcspkr. And if I do
what you say, whoever opted to use snd-pcsp, will no longer be able
to hear the console beeps, and that I find a disadvantage.
I myself do not like the console beeps, but some people will really
complain. So I'd like to find another solution if possible, and the
input solution looked quite what I needed.
>> only to disable it. OTOH, if someone loads pcspkr while snd-pcsp is
>> running, the input subsystem notifies snd-pcsp so that it can immediately
>> disable pcspkr, to not let it to harm even in that case.
> Does it? How does it do it? There is no "new driver" event in the
> input subsystem...
But I register an input handler, and whenever the pcspkr driver is
loaded, my "connect" handler is invoked, and from there I send an
SND_SILENT.
> No, I don't want SND_SPKR_STARTED either.
OK, how about something under a SYN_CONFIG then?
> What you need is a way to
> disable a certain driver somehow and I think it is a task that belongs
> to driver core, not input or any other individual subsystem.
But what if I just want to grab SND_BELL so that it is delivered
exclusively to my driver? Intuitively, I'd use the input subsystem
for that, but unfortunately it simply doesn't have that grabbing
capability (I asked Vojtech to be sure - he confirmed that there
is none). Be there such a capability, that would be excellent, no
hacks will be needed. But if I modify the pcspkr driver to disable
it directly via some function call, then snd-pcsp will always load
pcspkr, which is highly undesireable. I am not sure what did you
mean about the driver core though.
> Because
> next time you want to disable for example a framebuffer driver because
> you have written better one and you are back to square 1.
The difference is that the snd-pcsp and pcspkr drivers are doing the
completely different tasks. snd-pcsp doesn't absolete pcspkr - being
an ALSA driver it only plays sound, but doesn't do the console beeps,
thats the problem. Somehow I have to make sure they both can peacefully
co-exist. Making them mutually exclusive is bad, and making them
dependant (by calling into each other directly) is also rather bad.
next parent reply other threads:[~2006-03-23 18:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200603220652.k2M6qZgi020656@shell0.pdx.osdl.net>
[not found] ` <d120d5000603221332n6a6f9208x5651dc9ec993f4bf@mail.gmail.com>
[not found] ` <4422318C.407@aknet.ru>
[not found] ` <d120d5000603230651p6b43aad9ocad1aa3c2b51b388@mail.gmail.com>
2006-03-23 18:03 ` Stas Sergeev [this message]
2006-03-23 18:12 ` [patch 1/1] pc-speaker: add SND_SILENT Dmitry Torokhov
2006-03-23 18:31 ` Stas Sergeev
2006-03-23 18:47 ` Dmitry Torokhov
2006-03-23 19:34 ` Stas Sergeev
2006-03-23 20:36 ` Dmitry Torokhov
2006-03-24 4:59 ` Stas Sergeev
[not found] <5TCqf-E6-49@gated-at.bofh.it>
[not found] ` <5TCqf-E6-51@gated-at.bofh.it>
[not found] ` <5TCqf-E6-53@gated-at.bofh.it>
[not found] ` <5TCqg-E6-55@gated-at.bofh.it>
[not found] ` <5TCqf-E6-47@gated-at.bofh.it>
2006-03-24 22:43 ` Bodo Eggert
2006-03-26 9:52 ` Stas Sergeev
2006-03-26 11:24 ` Bodo Eggert
2006-03-26 18:46 ` Jan Engelhardt
2006-03-26 20:15 ` Kyle Moffett
2006-03-27 16:34 ` Dmitry Torokhov
2006-03-27 17:36 ` Stas Sergeev
2006-04-08 8:02 ` Stas Sergeev
2006-03-28 18:31 ` Joseph Fannin
2006-03-28 18:43 ` Bodo Eggert
2006-03-28 18:51 ` Vojtech Pavlik
2006-03-30 23:07 ` Edgar Toernig
2006-03-31 7:46 ` Vojtech Pavlik
2006-03-31 21:06 ` Edgar Toernig
2006-04-01 6:11 ` Vojtech Pavlik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4422E2DA.7050305@aknet.ru \
--to=stsp@aknet.ru \
--cc=dtor_core@ameritech.net \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox