Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
91651440
Commit
91651440
authored
Jan 21, 2012
by
Mauro Carvalho Chehab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[media] az6007: Fix IR handling
Signed-off-by:
Mauro Carvalho Chehab
<
mchehab@redhat.com
>
parent
711e1398
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
18 deletions
+13
-18
drivers/media/dvb/dvb-usb/az6007.c
drivers/media/dvb/dvb-usb/az6007.c
+13
-18
No files found.
drivers/media/dvb/dvb-usb/az6007.c
View file @
91651440
...
...
@@ -204,13 +204,7 @@ static int az6007_rc_query(struct dvb_usb_device *d, u32 * event, int *state)
struct
az6007_device_state
*
st
=
d
->
priv
;
struct
rc_map_table
*
keymap
=
d
->
props
.
rc
.
legacy
.
rc_map_table
;
int
i
;
/*
* FIXME: remove the following return to enabled remote querying
* The driver likely needs proper locking to avoid troubles between
* this call and other concurrent calls.
*/
return
0
;
unsigned
code
=
0
;
az6007_read
(
d
,
AZ6007_READ_IR
,
0
,
0
,
st
->
data
,
10
);
...
...
@@ -219,20 +213,21 @@ static int az6007_rc_query(struct dvb_usb_device *d, u32 * event, int *state)
return
0
;
}
/*
* FIXME: need to make something useful with the keycodes and to
* convert it to the non-legacy mode. Yet, it is producing some
* debug info already, like:
* 88 04 eb 02 fd ff 00 82 63 82 (terratec IR)
* 88 04 eb 03 fc 00 00 82 63 82 (terratec IR)
* 88 80 7e 0d f2 ff 00 82 63 82 (another NEC-extended based IR)
* I suspect that the IR data is at bytes 1 to 4, and byte 5 is parity
*/
deb_rc
(
"remote query key: %x %d
\n
"
,
st
->
data
[
1
],
st
->
data
[
1
]);
if
((
st
->
data
[
1
]
^
st
->
data
[
2
])
==
0xff
)
code
=
st
->
data
[
1
];
else
code
=
st
->
data
[
1
]
<<
8
|
st
->
data
[
2
];
if
((
st
->
data
[
3
]
^
st
->
data
[
4
])
==
0xff
)
code
=
code
<<
8
|
st
->
data
[
3
];
else
code
=
code
<<
16
|
st
->
data
[
3
]
<<
8
|
st
->
data
[
4
];
printk
(
"remote query key: %04x
\n
"
,
code
);
print_hex_dump_bytes
(
"Remote: "
,
DUMP_PREFIX_NONE
,
st
->
data
,
10
);
for
(
i
=
0
;
i
<
d
->
props
.
rc
.
legacy
.
rc_map_size
;
i
++
)
{
if
(
rc5_custom
(
&
keymap
[
i
])
==
st
->
data
[
1
]
)
{
if
(
rc5_custom
(
&
keymap
[
i
])
==
code
)
{
*
event
=
keymap
[
i
].
keycode
;
*
state
=
REMOTE_KEY_PRESSED
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment