All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert Graham <agraham@g-b.net>
To: mchehab@infradead.org
Cc: linux-kernel@vger.kernel.org, video4linux-list@redhat.com
Subject: [PATCH] V4L/DVB: SAA7134: Enable remote control support for Avermedia M102
Date: Sat, 08 Dec 2007 05:42:34 +0000	[thread overview]
Message-ID: <475A2ECA.6090508@g-b.net> (raw)

From: Albert Graham <agraham@g-b.net>

Signed-off-by: Albert Graham <agraham@g-b.net>

[PATCH] V4L/DVB: SAA7134: Enable remote control support for Avermedia M102

This patch enabled the IR remote control for the Avermedia M102 (card=110), 
which appears to be the same IR as the already supported device on the 
Avermedia AVerTV GO 007 FM (card=57) model, the code is two one liners which enable the
 IR for this device (subsystem: 1461:f31e)

I understand that this IR RC was previously supported by the lirc_gpio which is no longer
 supported in the kernel. The dmesg below show the device being detected and it works a expected.


dmesg output:

saa7133[0]: found at 0000:0a:04.0, rev: 209, irq: 23, latency: 64, mmio: 0xb3006000
saa7133[0]: subsystem: 1461:f31e, board: Avermedia M102 [card=110,autodetected]
saa7133[0]: board init: gpio is 7f0

---> input: saa7134 IR (Avermedia M102) as /class/input/input8 <-----

saa7133[0]: i2c eeprom 00: 61 14 1e f3 ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 20: ff d1 fe ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
tuner 1-004b: chip found @ 0x96 (saa7133[0])
tuner 1-004b: setting tuner address to 61
tuner 1-004b: type set to tda8290+75
firewire_core: created new fw device fw0 (0 config rom retries, S400)
tuner 1-004b: setting tuner address to 61
tuner 1-004b: type set to tda8290+75

lspci -v:

0a:04.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev d1)
        Subsystem: Avermedia Technologies Inc Unknown device f31e
        Flags: bus master, medium devsel, latency 64, IRQ 23
        Memory at b3006000 (32-bit, non-prefetchable) [size=2K]
        Capabilities: [40] Power Management version 2

uname -r:
2.6.23.8-63.local.fc8



diff -uNrp a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
--- a/drivers/media/video/saa7134/saa7134-cards.c       2007-10-09 21:31:38.000000000 +0100
+++ b/drivers/media/video/saa7134/saa7134-cards.c       2007-12-08 05:38:17.000000000 +0000
@@ -4440,6 +4440,7 @@ int saa7134_board_init1(struct saa7134_d
                break;
        case SAA7134_BOARD_AVERMEDIA_M102:
                /* enable tuner */
+               dev->has_remote = SAA7134_REMOTE_GPIO;
                saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,   0x8c040007, 0x8c040007);
                saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0c0007cd, 0x0c0007cd);
                break;
diff -uNrp a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
--- a/drivers/media/video/saa7134/saa7134-input.c       2007-10-09 21:31:38.000000000 +0100
+++ b/drivers/media/video/saa7134/saa7134-input.c       2007-12-08 05:38:17.000000000 +0000
@@ -246,6 +246,7 @@ int saa7134_input_init1(struct saa7134_d
        case SAA7134_BOARD_AVERMEDIA_STUDIO_307:
        case SAA7134_BOARD_AVERMEDIA_STUDIO_507:
        case SAA7134_BOARD_AVERMEDIA_GO_007_FM:
+        case SAA7134_BOARD_AVERMEDIA_M102:
                ir_codes     = ir_codes_avermedia;
                mask_keycode = 0x0007C8;
                mask_keydown = 0x000010;

----------- END -----------------





                 reply	other threads:[~2007-12-08  5:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=475A2ECA.6090508@g-b.net \
    --to=agraham@g-b.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.