Skip to contentSkip to conversation

saa7134 - ir remote for sinovideo 1300

PATCH Krzysztof Halasa 1 participant 2 messages Jul 17, 2009 – Jul 19, 2009 1 message not in the archive Media (V4L/DVB)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 9 lines · James Guo

Have a tv tuner believe to be sinovideo 1300, and the remote has h-338 in the back, the tuner is detected as saa7134 proteus 2309, and working fine, the patch is for the remote.

following buttons supposed to be working: all the number button, channel up and down, volumn up and down, off, mute, full screen, recall, snapshot, tv. Some buttons do not have valid entry for tvtime, so I did not map them(record, stop ...)

Quoted 5 lines

to apply, use command
modprobe saa7134 card=157
if it does not work, use
modprobe saa7134 card=157 ir_debug=1
and send me the output of dmesg(after modprobe and after a button is pressed)

I think we should add something printing changes on the GPIO line (and current time). That should be easy, will try to have something soon. That would show what code exactly a remote is using, at last.

Signature · 1 line
Krzysztof Halasa
#2 lore raw
In reply to a message not in the archive
Quoted 3 lines · James Guo

Have a tv tuner believe to be sinovideo 1300, and the remote has h-338 in the back, the tuner is detected as saa7134 proteus 2309, and working fine, the patch is for the remote.

Since we don't know what exact encoding does it use... Can you test with the attached patch? You have to add/substitute your card ID in place of AVERMEDIA_SUPER_007 and "modprobe saa7134 gpio_tracking=1".

Press a single RC button.

It should produce a lot of messages like:

$ dmesg | grep GPIO:
saa7133[0] GPIO: time=1248041038.165525 mode=0x0000000 in=0x0040000 out=0x0000000 [pre-init]
saa7133[0] GPIO: time=1248041061.000769 mode=0x0200000 in=0x0000000 out=0x0200000 [GPIO18 IRQ]
saa7133[0] GPIO: time=1248041061.001691 mode=0x0200000 in=0x0040000 out=0x0200000 [GPIO18 IRQ]
saa7133[0] GPIO: time=1248041061.002539 mode=0x0200000 in=0x0000000 out=0x0200000 [GPIO18 IRQ]
saa7133[0] GPIO: time=1248041061.004376 mode=0x0200000 in=0x0040000 out=0x0200000 [GPIO18 IRQ]
saa7133[0] GPIO: time=1248041061.005198 mode=0x0200000 in=0x0000000 out=0x0200000 [GPIO18 IRQ]
saa7133[0] GPIO: time=1248041061.006124 mode=0x0200000 in=0x0040000 out=0x0200000 [GPIO18 IRQ]
saa7133[0] GPIO: time=1248041061.007858 mode=0x0200000 in=0x0000000 out=0x0200000 [GPIO18 IRQ]
saa7133[0] GPIO: time=1248041061.009672 mode=0x0200000 in=0x0040000 out=0x0200000 [GPIO18 IRQ]

If you send all of that to me I should be able to figure out the code used.

Signature · 1 line
Krzysztof Halasa
drivers/media/video/saa7134/saa7134-cards.c +1 -0
index fdb1944..73de219 100644
@@ -6105,6 +6105,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
 	case SAA7134_BOARD_AVERMEDIA_307:
 	case SAA7134_BOARD_AVERMEDIA_STUDIO_507:
 	case SAA7134_BOARD_AVERMEDIA_GO_007_FM:
+	case SAA7134_BOARD_AVERMEDIA_SUPER_007:
 	case SAA7134_BOARD_AVERMEDIA_777:
 	case SAA7134_BOARD_AVERMEDIA_M135A:
 /*      case SAA7134_BOARD_SABRENT_SBTTVFM:  */ /* not finished yet */
drivers/media/video/saa7134/saa7134-core.c +22 -25

73 lines not on this page · raw message

drivers/media/video/saa7134/saa7134-input.c +6 -0
index 8a106d3..9d5a433 100644
@@ -483,6 +483,12 @@ int saa7134_input_init1(struct saa7134_dev *dev)
 		saa_setb(SAA7134_GPIO_GPMODE1, 0x1);
 		saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1);
 		break;
+	case SAA7134_BOARD_AVERMEDIA_SUPER_007:
+		ir_codes     = ir_codes_avermedia;
+		mask_keyup   = 0x40000; /* show falling edge of GPIO18 */
+		mask_keydown = 0x40000; /* show raising edge of GPIO18 */
+		rc5_gpio     = 1;
+		break;
 	case SAA7134_BOARD_KWORLD_TERMINATOR:
 		ir_codes     = ir_codes_pixelview;
 		mask_keycode = 0x00001f;