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).