From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753911AbdBHKXD (ORCPT ); Wed, 8 Feb 2017 05:23:03 -0500 Received: from imta22.fe.bosch.de ([139.15.243.26]:42121 "EHLO imta22.fe.bosch.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752003AbdBHKVs (ORCPT ); Wed, 8 Feb 2017 05:21:48 -0500 X-Greylist: delayed 390 seconds by postgrey-1.27 at vger.kernel.org; Wed, 08 Feb 2017 05:21:47 EST From: "Jonas Mark (ST-FIR/ENG1)" To: Dmitry Torokhov , Heiko Schocher CC: "linux-input@vger.kernel.org" , "GUAN Ben (ST-FIR/ENG1-Zhu)" , "devicetree@vger.kernel.org" , Thierry Reding , "linux-kernel@vger.kernel.org" , "Boris Brezillon" , Rob Herring , Manfred Schlaegl , "Mark Rutland" , "Jonas Mark (ST-FIR/ENG1)" Subject: AW: [PATCH] Input: pwm-beeper: support customized freq for SND_BELL Thread-Topic: [PATCH] Input: pwm-beeper: support customized freq for SND_BELL Thread-Index: AQHSgQIVXvg+0+rSKUSTBAnUUnl45aFdyOSAgAD0aKA= Date: Wed, 8 Feb 2017 10:11:21 +0000 Message-ID: <850c2508720a41b3bfb95cd7093433a4@SI-MBX1030.de.bosch.com> References: <1486444894-18321-1-git-send-email-hs@denx.de> <20170207181309.GC38092@dtor-ws> In-Reply-To: <20170207181309.GC38092@dtor-ws> Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.19.142.69] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-8.0.0.1202-22870.006 X-TMASE-MatchedRID: J22NGy0hlAmU2fVedEQUOxWCVBr+Ay98C/ExpXrHizxaW2Ktn+I8/lmE vDqzEeg3RYbSh3pqvaKzevpSvnk3p32pZzb2Q0J8/YAykxO4ZBC0NJ9wxH7tk+p7wgGRqw6kekW kqRyavwBMDf4Fdf7vwkLdSSuQjH7i/qsdtiwogNweOxBpKRngPdFqG4/BpDVamruuQVTGGi481m i1m7eNeTNDyfi80CAwczVqmQFagAKXBXaJoB9JZ/7E6GNqs6ce3QfwsVk0UbtuRXh7bFKB7tlw7 kHH6JtVF55rmInKDRxYPtFaf3KEyV3ewD0AAdoTYDttQUGqHZU= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v18APsRd009773 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