Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1580291

Re: [PATCH] Input: pwm-beeper: support customized freq for SND_BELL

From Dmitry Torokhov <dmitry.torokhov@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] Input: pwm-beeper: support customized freq for SND_BELL
Date 2017-02-14 05:30 +0100
Message-ID <taCUy-5bA-3@gated-at.bofh.it> (permalink)
References <t86vL-6Us-3@gated-at.bofh.it> <t8iwW-6k3-27@gated-at.bofh.it> <t8xFE-7xu-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Feb 08, 2017 at 10:11:21AM +0000, Jonas Mark (ST-FIR/ENG1) wrote:
> 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.

OK, fair enough. Please address Rob's comments on binding and resend.

Also I am not sure why you needed to change the switch statement around,
you only need to replace 1000 with value from the attribute.

Oh, and please use device_property_*() API instead of of_*().

Thanks.

-- 
Dmitry

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] Input: pwm-beeper: support customized freq for SND_BELL Heiko Schocher <hs@denx.de> - 2017-02-07 06:30 +0100
  Re: [PATCH] Input: pwm-beeper: support customized freq for SND_BELL Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-07 19:20 +0100
    AW: [PATCH] Input: pwm-beeper: support customized freq for SND_BELL "Jonas Mark (ST-FIR/ENG1)" <Mark.Jonas@de.bosch.com> - 2017-02-08 11:30 +0100
      Re: [PATCH] Input: pwm-beeper: support customized freq for SND_BELL Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-14 05:30 +0100
        Re: [PATCH] Input: pwm-beeper: support customized freq for SND_BELL Heiko Schocher <hs@denx.de> - 2017-02-14 06:10 +0100
  Re: [PATCH] Input: pwm-beeper: support customized freq for SND_BELL Rob Herring <robh@kernel.org> - 2017-02-10 18:00 +0100
    Re: [PATCH] Input: pwm-beeper: support customized freq for SND_BELL Heiko Schocher <hs@denx.de> - 2017-02-13 07:20 +0100

csiph-web