[alsa-devel] [PATCH 1/2] ASoC: rt5645: Adds push button support for rt5650
Mark Brown
broonie at kernel.org
Tue Apr 21 12:48:14 CEST 2015
On Tue, Apr 21, 2015 at 02:08:18AM +0000, Bard Liao wrote:
> > > - { 0xdd, 0x001b },
> > That's a bit weird, why is this in here?
> The default value of register 0xdd is different between rt5645 and rt5650.
> And it is for button detection configuration. That's why I put it in this
> patch instead of a separate patch.
OK, you probaly want to move to separate default tables per device.
This is something that should have been called out in the commit log.
> > > + switch (btn_type) {
> > > + case 0x8000:
> > > + case 0x4000:
> > > + case 0x2000:
> > > + report |= SND_JACK_BTN_0;
> > > + break;
> > Why do we mash all these values together?
> rt5650 can report the action of button (one click, double click or hold).
> That is basically for Windows OS. For linux, we only care about whether
> the button is pressed or released. So all of the three actions are treated
> as button pressed.
OK, can we have a comment for that please? We might want to extend this
in the future as the userspace ABI grows richer (and depending on how
things get reported we may need to synthesize at least a double press
for userspace).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150421/53cdd0f4/attachment.sig>
More information about the Alsa-devel
mailing list