On Thu, Mar 18, 2010 at 6:01 AM, Anders Eriksson <aeriksson@...> wrote:
>
> jarod@... said:
>> Which Fedora kernel did you pull the patches from and when? I've been
>> actively updating them today... :)
>
> Can't say for certain, but it was from a page similar to
> http://lists.fedoraproject.org/pipermail/scm-commits/2010-January/379502.html
>
> and I pulled it 13 Mars 17.24 GMT+1
Heh, yeah way outdated now. ;)
>> Best bet is actually to grab from my git tree, I'm pushing everything there
>> first, and using that to generate the patches for Fedora.
> At the time, git://git.wilsonet.com/linux-2.6-lirc.git/ didn't have any
> 2.6.33 tags in it, so i wnt googling and found the patch.
Ah, yeah, I should just remove that tree and replace it with a
pointer... Its now out on kernel.org:
http://git.kernel.org/?p=linux/kernel/git/jarod/linux-2.6-lirc.git;a=summary
> here's the mce table I ended up with:
> /* mce-mode imon mce remote key table */
> static const struct key_entry imon_mce_key_table[] = {
> /* keys sorted mostly by frequency of use to optimize lookups */
> { KE_KEY, 0x800ff415, { KEY_REWIND } },
> { KE_KEY, 0x800ff414, { KEY_FASTFORWARD } },
> { KE_KEY, 0x800ff41b, { KEY_PREVIOUS } },
> { KE_KEY, 0x800ff41a, { KEY_NEXT } },
>
> { KE_KEY, 0x800ff416, { KEY_PLAY } },
> { KE_KEY, 0x800ff418, { KEY_PAUSE } },
> { KE_KEY, 0x800ff418, { KEY_PAUSE } },
> { KE_KEY, 0x800ff419, { KEY_STOP } },
> { KE_KEY, 0x800ff417, { KEY_RECORD } },
>
> { KE_KEY, 0x800FF41E, { KEY_UP } },
> { KE_KEY, 0x800FF41F, { KEY_DOWN } },
> { KE_KEY, 0x800FF420, { KEY_LEFT } },
> { KE_KEY, 0x800FF421, { KEY_RIGHT } },
>
> { KE_KEY, 0x800FF424, { KEY_MENU } },
> { KE_KEY, 0x800FF41C, { KEY_PREVIOUS } },
>
> { KE_KEY, 0x800FF422, { KEY_OK } },
> /* the OK and Enter buttons decode to the same value
> { KE_KEY, 0x02000028, { KEY_OK } }, */
> { KE_KEY, 0x800FF423, { KEY_EXIT } },
> { KE_KEY, 0x02000029, { KEY_DELETE } },
>
> { KE_KEY, 0x800ff40E, { KEY_MUTE } },
> { KE_KEY, 0x800ff410, { KEY_VOLUMEUP } },
> { KE_KEY, 0x800ff411, { KEY_VOLUMEDOWN } },
> { KE_KEY, 0x800ff412, { KEY_CHANNELUP } },
> { KE_KEY, 0x800ff413, { KEY_CHANNELDOWN } },
>
> { KE_KEY, 0x800FF401, { KEY_NUMERIC_1 } },
> { KE_KEY, 0x800FF402, { KEY_NUMERIC_2 } },
> { KE_KEY, 0x800FF403, { KEY_NUMERIC_3 } },
> { KE_KEY, 0x800FF404, { KEY_NUMERIC_4 } },
> { KE_KEY, 0x800FF405, { KEY_NUMERIC_5 } },
> { KE_KEY, 0x800FF406, { KEY_NUMERIC_6 } },
> { KE_KEY, 0x800FF407, { KEY_NUMERIC_7 } },
> { KE_KEY, 0x800FF408, { KEY_NUMERIC_8 } },
> { KE_KEY, 0x800FF409, { KEY_NUMERIC_9 } },
> { KE_KEY, 0x800FF400, { KEY_NUMERIC_0 } },
>
> { KE_KEY, 0x800FF40A, { KEY_NUMERIC_STAR } },
> { KE_KEY, 0x800FF40B, { KEY_NUMERIC_POUND } },
>
> { KE_KEY, 0x800f8446, { KEY_TV } },
> { KE_KEY, 0x800f8447, { KEY_AUDIO } },
> { KE_KEY, 0x800f8448, { KEY_PVR } }, /* RecordedTV */
> { KE_KEY, 0x800f8449, { KEY_CAMERA } },
> { KE_KEY, 0x800f844a, { KEY_VIDEO } },
> { KE_KEY, 0x800f8424, { KEY_DVD } },
> { KE_KEY, 0x800f8425, { KEY_TUNER } }, /* LiveTV */
>
> { KE_KEY, 0x800FF466, { KEY_RED } },
> { KE_KEY, 0x800FF425, { KEY_GREEN } },
> { KE_KEY, 0x800FF468, { KEY_YELLOW } },
> { KE_KEY, 0x800FF41D, { KEY_BLUE } },
>
> { KE_KEY, 0x800ff40f, { KEY_INFO } },
> { KE_KEY, 0x800ff426, { KEY_EPG } }, /* Guide */
> { KE_KEY, 0x800f845a, { KEY_SUBTITLE } }, /* Caption */
>
> { KE_KEY, 0x800f840c, { KEY_POWER } },
> { KE_KEY, 0x800f840d, { KEY_PROG1 } }, /* Windows MCE button */
> { KE_END, 0 }
>
> };
>
>
> My remote only emits 0x800... codes so I had to fix all the 0x2... codes.
>
> Additionally, the 0x800.. codes had "f8" in them and i had to change that to
> FF as you can see above (My remote doesn't have the TV AUDIO etc keys, so
> they're untouched).
>
> And KEY_ENTER for some reason didn't make it to userspace (inputlirc), but
> changing it to KEY_OK did the trick (odd).
Hell. Yet another 0xffdc device that decodes things differently. I
really hate those things. I'm sure we can hack up something that works
for all of them...
So, note that my devices, the mce keys actually send two different
values, 0x800f04xx and 0x800f84xx, because 0x8000 is the mce toggle
bit, used to differentiate the start of a new key press. Does your
device also toggle between values of maybe 0x800f74xx and 0x800ff4xx?
You'd have to run with debugging enabled and look in dmesg to see the
different versions. The lookup for the keys is done by or'ing in the
0x8000 so we don't have to have both versions in the table.
--
Jarod Wilson
jarod@...
|