From: "Jonas Mark (ST-FIR/ENG1)" <Mark.Jonas@de.bosch.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>, Heiko Schocher <hs@denx.de>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"GUAN Ben (ST-FIR/ENG1-Zhu)" <Ben.Guan@cn.bosch.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Thierry Reding <thierry.reding@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Boris Brezillon" <boris.brezillon@free-electrons.com>,
Rob Herring <robh+dt@kernel.org>,
Manfred Schlaegl <manfred.schlaegl@gmx.at>,
"Mark Rutland" <mark.rutland@arm.com>,
"Jonas Mark (ST-FIR/ENG1)" <Mark.Jonas@de.bosch.com>
Subject: AW: [PATCH] Input: pwm-beeper: support customized freq for SND_BELL
Date: Wed, 8 Feb 2017 10:11:21 +0000 [thread overview]
Message-ID: <850c2508720a41b3bfb95cd7093433a4@SI-MBX1030.de.bosch.com> (raw)
In-Reply-To: <20170207181309.GC38092@dtor-ws>
Hello Dmitry,
> > extend the pwm-beeper driver to support customized frequency
> > for SND_BELL from device tree.
>
> No, SND_BELL is literally SND_TONE @1000Hz. There should be no
> customizing. If applications want to use different frequency then should
> be using SND_TONE.
We are not aiming for an application shortcut here. Instead, changing the bell frequency shall be a system setting. That is, every application which wants to make a bell sound shall use the alternative frequency.
The reason why we are deviating from the default 1000 Hz is that on our hardware we are using a loudspeaker which is rated for 2.7 kHz. That is, it will only sound at the specified volume and frequency if you feed it with a 2.7 kHz square wave. If you deviate from it, e.g. by using 1000 Hz, the output will be dim and squeaky. Worst case, SND_BELL would be completely silent on our system. So the only bell sound we can reliably generate on our system has 2.7 kHz.
The good news for everybody else's systems is that the patch does not change the default behavior. If not specified in the DT, the frequency will still be 1000 Hz. But other systems which are similarly challenged could now offer a reasonable bell sound, too.
Can you point me to a specification or standard which defines that SND_BELL has to be 1000 Hz without any exception?
I did some research on that topic and was not able to discover such a specification or standard. What I did find though was that the ASCII or Unicode BEL character is most likely very closely related to SND_BELL. And for BEL there is no frequency specified. Historically it once was a real bell which was rung. The intention was to notify the human on the other end of a teletype to have a look at it. And that is guaranteed with 1000 Hz as well as with 2.7 kHz as long as the sound is perceptible to the human ear.
https://en.wikipedia.org/wiki/Bell_character
Regards,
Mark
next prev parent reply other threads:[~2017-02-08 10:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 5:21 Heiko Schocher
2017-02-07 18:13 ` Dmitry Torokhov
2017-02-08 10:11 ` Jonas Mark (ST-FIR/ENG1) [this message]
2017-02-14 4:27 ` Dmitry Torokhov
2017-02-14 5:02 ` Heiko Schocher
2017-02-10 15:48 ` Rob Herring
2017-02-13 6:12 ` Heiko Schocher
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=850c2508720a41b3bfb95cd7093433a4@SI-MBX1030.de.bosch.com \
--to=mark.jonas@de.bosch.com \
--cc=Ben.Guan@cn.bosch.com \
--cc=boris.brezillon@free-electrons.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=hs@denx.de \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred.schlaegl@gmx.at \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=thierry.reding@gmail.com \
/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
all inboxes | Powered by JetHome®