aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-06-26 16:03:00 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:37:10 -0400
commit36f6bb97caa772d7dc42250db74253e0867a444a (patch)
tree995f45571dae16a24c8a6ace84dd2ad834f6324f /drivers/media
parentbf1ece6a4f30f05b227f2ec59fa0d45b5db186d2 (diff)
V4L/DVB (9060): saa7134: Add support for Avermedia PCI pure analog (M135A)
Thanks to Sistema Fenix (http://www.sistemafenix.com.br/) for sponsoring this development. Signed-off-by: Gilberto <gilberto@sistemafenix.com.br> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/common/ir-keymaps.c50
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c41
-rw-r--r--drivers/media/video/saa7134/saa7134-input.c6
-rw-r--r--drivers/media/video/saa7134/saa7134.h1
4 files changed, 98 insertions, 0 deletions
diff --git a/drivers/media/common/ir-keymaps.c b/drivers/media/common/ir-keymaps.c
index 891f3b30be06..f061dfbc9271 100644
--- a/drivers/media/common/ir-keymaps.c
+++ b/drivers/media/common/ir-keymaps.c
@@ -103,6 +103,56 @@ IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE] = {
103 103
104EXPORT_SYMBOL_GPL(ir_codes_avermedia_dvbt); 104EXPORT_SYMBOL_GPL(ir_codes_avermedia_dvbt);
105 105
106/* Mauro Carvalho Chehab <mchehab@infradead.org> */
107IR_KEYTAB_TYPE ir_codes_avermedia_m135a[IR_KEYTAB_SIZE] = {
108 [0x00] = KEY_POWER2,
109 [0x2e] = KEY_DOT, /* '.' */
110 [0x01] = KEY_MODE, /* TV/FM */
111
112 [0x05] = KEY_1,
113 [0x06] = KEY_2,
114 [0x07] = KEY_3,
115 [0x09] = KEY_4,
116 [0x0a] = KEY_5,
117 [0x0b] = KEY_6,
118 [0x0d] = KEY_7,
119 [0x0e] = KEY_8,
120 [0x0f] = KEY_9,
121 [0x11] = KEY_0,
122
123 [0x13] = KEY_RIGHT, /* -> */
124 [0x12] = KEY_LEFT, /* <- */
125
126 [0x17] = KEY_SLEEP, /* Capturar Imagem */
127 [0x10] = KEY_SHUFFLE, /* Amostra */
128
129 /* FIXME: The keys bellow aren't ok */
130
131 [0x43] = KEY_CHANNELUP,
132 [0x42] = KEY_CHANNELDOWN,
133 [0x1f] = KEY_VOLUMEUP,
134 [0x1e] = KEY_VOLUMEDOWN,
135 [0x0c] = KEY_ENTER,
136
137 [0x14] = KEY_MUTE,
138 [0x08] = KEY_AUDIO,
139
140 [0x03] = KEY_TEXT,
141 [0x04] = KEY_EPG,
142 [0x2b] = KEY_TV2, /* TV2 */
143
144 [0x1d] = KEY_RED,
145 [0x1c] = KEY_YELLOW,
146 [0x41] = KEY_GREEN,
147 [0x40] = KEY_BLUE,
148
149 [0x1a] = KEY_PLAYPAUSE,
150 [0x19] = KEY_RECORD,
151 [0x18] = KEY_PLAY,
152 [0x1b] = KEY_STOP,
153};
154EXPORT_SYMBOL_GPL(ir_codes_avermedia_m135a);
155
106/* Attila Kondoros <attila.kondoros@chello.hu> */ 156/* Attila Kondoros <attila.kondoros@chello.hu> */
107IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE] = { 157IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE] = {
108 158
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index 3ad5b941dfb9..a16ddb21288f 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -3671,6 +3671,40 @@ struct saa7134_board saa7134_boards[] = {
3671 .tv = 1, 3671 .tv = 1,
3672 }}, 3672 }},
3673 }, 3673 },
3674 [SAA7134_BOARD_AVERMEDIA_M135A] = {
3675 .name = "Avermedia PCI pure analog (M135A)",
3676 .audio_clock = 0x00187de7,
3677 .tuner_type = TUNER_PHILIPS_TDA8290,
3678 .radio_type = UNSET,
3679 .tuner_addr = ADDR_UNSET,
3680 .radio_addr = ADDR_UNSET,
3681 .tuner_config = 2,
3682 .gpiomask = 0x020200000,
3683 .inputs = {{
3684 .name = name_tv,
3685 .vmux = 1,
3686 .amux = TV,
3687 .tv = 1,
3688 }, {
3689 .name = name_comp1,
3690 .vmux = 3,
3691 .amux = LINE1,
3692 }, {
3693 .name = name_svideo,
3694 .vmux = 8,
3695 .amux = LINE1,
3696 } },
3697 .radio = {
3698 .name = name_radio,
3699 .amux = TV,
3700 .gpio = 0x00200000,
3701 },
3702 .mute = {
3703 .name = name_mute,
3704 .amux = TV,
3705 .gpio = 0x01,
3706 },
3707 },
3674 [SAA7134_BOARD_BEHOLD_401] = { 3708 [SAA7134_BOARD_BEHOLD_401] = {
3675 /* Beholder Intl. Ltd. 2008 */ 3709 /* Beholder Intl. Ltd. 2008 */
3676 /*Dmitry Belimov <d.belimov@gmail.com> */ 3710 /*Dmitry Belimov <d.belimov@gmail.com> */
@@ -4847,6 +4881,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
4847 4881
4848 },{ 4882 },{
4849 .vendor = PCI_VENDOR_ID_PHILIPS, 4883 .vendor = PCI_VENDOR_ID_PHILIPS,
4884 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
4885 .subvendor = 0x1461, /* Avermedia Technologies Inc */
4886 .subdevice = 0xf11d,
4887 .driver_data = SAA7134_BOARD_AVERMEDIA_M135A,
4888 }, {
4889 .vendor = PCI_VENDOR_ID_PHILIPS,
4850 .device = PCI_DEVICE_ID_PHILIPS_SAA7130, 4890 .device = PCI_DEVICE_ID_PHILIPS_SAA7130,
4851 .subvendor = PCI_VENDOR_ID_PHILIPS, 4891 .subvendor = PCI_VENDOR_ID_PHILIPS,
4852 .subdevice = 0x2004, 4892 .subdevice = 0x2004,
@@ -5702,6 +5742,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
5702 case SAA7134_BOARD_AVERMEDIA_STUDIO_507: 5742 case SAA7134_BOARD_AVERMEDIA_STUDIO_507:
5703 case SAA7134_BOARD_AVERMEDIA_GO_007_FM: 5743 case SAA7134_BOARD_AVERMEDIA_GO_007_FM:
5704 case SAA7134_BOARD_AVERMEDIA_777: 5744 case SAA7134_BOARD_AVERMEDIA_777:
5745 case SAA7134_BOARD_AVERMEDIA_M135A:
5705/* case SAA7134_BOARD_SABRENT_SBTTVFM: */ /* not finished yet */ 5746/* case SAA7134_BOARD_SABRENT_SBTTVFM: */ /* not finished yet */
5706 case SAA7134_BOARD_VIDEOMATE_TV_PVR: 5747 case SAA7134_BOARD_VIDEOMATE_TV_PVR:
5707 case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS: 5748 case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS:
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index f1767309b1e8..0fded7511eaf 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -401,6 +401,12 @@ int saa7134_input_init1(struct saa7134_dev *dev)
401 saa_setb(SAA7134_GPIO_GPMODE0, 0x4); 401 saa_setb(SAA7134_GPIO_GPMODE0, 0x4);
402 saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4); 402 saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4);
403 break; 403 break;
404 case SAA7134_BOARD_AVERMEDIA_M135A:
405 ir_codes = ir_codes_avermedia_m135a;
406 mask_keydown = 0x0040000;
407 mask_keycode = 0x00013f;
408 nec_gpio = 1;
409 break;
404 case SAA7134_BOARD_AVERMEDIA_777: 410 case SAA7134_BOARD_AVERMEDIA_777:
405 case SAA7134_BOARD_AVERMEDIA_A16AR: 411 case SAA7134_BOARD_AVERMEDIA_A16AR:
406 ir_codes = ir_codes_avermedia; 412 ir_codes = ir_codes_avermedia;
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index 982003d49dda..caf055ce3106 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -271,6 +271,7 @@ struct saa7134_format {
271#define SAA7134_BOARD_ASUSTeK_P7131_ANALOG 146 271#define SAA7134_BOARD_ASUSTeK_P7131_ANALOG 146
272#define SAA7134_BOARD_ASUSTeK_TIGER_3IN1 147 272#define SAA7134_BOARD_ASUSTeK_TIGER_3IN1 147
273#define SAA7134_BOARD_ENCORE_ENLTV_FM53 148 273#define SAA7134_BOARD_ENCORE_ENLTV_FM53 148
274#define SAA7134_BOARD_AVERMEDIA_M135A 149
274 275
275#define SAA7134_MAXBOARDS 8 276#define SAA7134_MAXBOARDS 8
276#define SAA7134_INPUT_MAX 8 277#define SAA7134_INPUT_MAX 8