linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Karl Dahlke <eklhad@comcast.net>
Cc: vojtech@ucw.cz, linux-input@vger.kernel.org
Subject: Re: [PATCH] input/speaker: additional clicks and tones for future...
Date: Wed, 3 Dec 2014 14:52:29 -0800	[thread overview]
Message-ID: <20141203225229.GE16951@dtor-ws> (raw)
In-Reply-To: <20141103160258.eklhad@comcast.net>

On Wed, Dec 03, 2014 at 04:02:58PM -0500, Karl Dahlke wrote:
> Thank you for your thoughtful reply.
> 
> > I do not think it is a good idea to add SND_PULSE as it can be easily
> > implemented by SND_TONE.
> 
> It isn't that simple.
> Example: if a tone is playing for any reason the clicks do not interrupt
> the tone. (It would sound terrible, I've tried it).
> Clicks and tones are different in spirit and in implementation,
> almost orthogonal, and my code manages all this.

Even if it sounds horrible why would not you want feedback for key press
if there is tone? Would you not rather want to know that key press has
been registered?

> 
> > Also, what if you want clicks to go through sound card and not the speaker
> 
> But you see, in my world, I precisely don't want that to happen,
> because sometimes the sound card isn't working.

I understand that you might not want to use sound card, that does not
mean that nobody else would now want it. There are boxes without pcspkr
or where speaker is provided by different module.

> There are lots of reasons a sound card might not work,
> alsa and modules and pulseaudio are more finicky than you might think,
> not to mention the speech adapters that sit on top of them.
> If any link in this chain is broken, I get no speech, period.
> If I then don't get the clicks or tones either, I'm really lost at sea.

You should be able to work directly with ALSA though, right? That would
cut some of the stack away.

> Thus the modules that I write,
> and that other people write as well,
> specifically send small diagnostics through the pc speaker,
> because that just might be all the feedback we have.
> Here is a good example, grub, or maybe it's grub2,
> can't reasonably be expected to work through a sound card,
> so it can actually generate morse code at the pc speaker to help us load
> the desired OS.

But grub is not an OS, so naturally it does not have sound card
support. It also does not support any of the haptic devices that might
be connected to the box but that does not mean that haptic devices are
not suitable as feedback devices.

> It's just a different philosophy that we have I guess.
> So instead of reinventing these routines over and over I thought it might be
> useful to have some of this common functionality in the pcspkr driver
> in the kernel.
> I mean it's already halfway there, this is just the other half.
> All managed just like tones are managed today.
> It's just the icing on the cake.
> 

I am sorry, but I still believe that doing this in pcspkr/tty would be
doing this at the wrong level and userspace solution would be the right
one.  It does not need to use real sound card if you prefer not to, but
I do not think it should prohibit using it or any other device that can
provide adequate feedback.

Thanks.

-- 
Dmitry

  reply	other threads:[~2014-12-03 22:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-02  5:17 [PATCH] input/speaker: additional clicks and tones for future accessibility Karl Dahlke
2014-12-03 19:58 ` Dmitry Torokhov
2014-12-03 21:02   ` [PATCH] input/speaker: additional clicks and tones for future Karl Dahlke
2014-12-03 22:52     ` Dmitry Torokhov [this message]
2014-12-04  2:00       ` Karl Dahlke
2014-12-03 22:57   ` [PATCH] input/speaker: additional clicks and tones for future accessibility 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=20141203225229.GE16951@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=eklhad@comcast.net \
    --cc=linux-input@vger.kernel.org \
    --cc=vojtech@ucw.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;
as well as URLs for NNTP newsgroup(s).