]> err.no Git - linux-2.6/commitdiff
V4L/DVB (4812): Detect presence of IR receiver/IR transmitter in tveeprom
authorHans Verkuil <hverkuil@xs4all.nl>
Sun, 12 Nov 2006 12:28:46 +0000 (09:28 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 10 Dec 2006 10:51:17 +0000 (08:51 -0200)
Thanks to input from Steven Toth from Hauppauge the tveeprom module has
been extended to detect the presence of an IR transmitter (aka IR-blaster).

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/tveeprom.c
include/media/tveeprom.h

index 6b9ef731b83aabc917bb64d6a4a5823791c7b2a2..2624e3f7dd29e2763fdd82406d7ea4a4cdedd5d8 100644 (file)
@@ -430,7 +430,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
                        tvee->has_radio = eeprom_data[i+len-1];
                        /* old style tag, don't know how to detect
                        IR presence, mark as unknown. */
-                       tvee->has_ir = 2;
+                       tvee->has_ir = -1;
                        tvee->model =
                                eeprom_data[i+8] +
                                (eeprom_data[i+9] << 8);
@@ -653,13 +653,14 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
                        STRM(decoderIC, tvee->decoder_processor),
                        tvee->decoder_processor);
        }
-       if (tvee->has_ir == 2)
+       if (tvee->has_ir == -1)
                tveeprom_info("has %sradio\n",
                                tvee->has_radio ? "" : "no ");
        else
-               tveeprom_info("has %sradio, has %sIR remote\n",
+               tveeprom_info("has %sradio, has %sIR receiver, has %sIR transmitter\n",
                                tvee->has_radio ? "" : "no ",
-                               tvee->has_ir ? "" : "no ");
+                               (tvee->has_ir & 1) ? "" : "no ",
+                               (tvee->has_ir & 2) ? "" : "no ");
 }
 EXPORT_SYMBOL(tveeprom_hauppauge_analog);
 
index e9fc1a7854970aaccf6eb8252cbd3914c41bdfd9..5660ea24996b42f0634c5fb0a6267131d36fca25 100644 (file)
@@ -3,7 +3,7 @@
 
 struct tveeprom {
        u32 has_radio;
-       u32 has_ir;     /* 0: no IR, 1: IR present, 2: unknown */
+       u32 has_ir;     /* bit 0: IR receiver present, bit 1: IR transmitter (blaster) present. -1 == unknown */
        u32 has_MAC_address; /* 0: no MAC, 1: MAC present, 2: unknown */
 
        u32 tuner_type;