Commit 36f6bb97 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Mauro Carvalho Chehab

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: default avatarGilberto <gilberto@sistemafenix.com.br>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent bf1ece6a
...@@ -147,3 +147,4 @@ ...@@ -147,3 +147,4 @@
146 -> ASUSTeK P7131 Analog 146 -> ASUSTeK P7131 Analog
147 -> Asus Tiger 3in1 [1043:4878] 147 -> Asus Tiger 3in1 [1043:4878]
148 -> Encore ENLTV-FM v5.3 [1a7f:2008] 148 -> Encore ENLTV-FM v5.3 [1a7f:2008]
149 -> Avermedia PCI pure analog (M135A) [1461:f11d]
...@@ -103,6 +103,56 @@ IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE] = { ...@@ -103,6 +103,56 @@ IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE] = {
EXPORT_SYMBOL_GPL(ir_codes_avermedia_dvbt); EXPORT_SYMBOL_GPL(ir_codes_avermedia_dvbt);
/* Mauro Carvalho Chehab <mchehab@infradead.org> */
IR_KEYTAB_TYPE ir_codes_avermedia_m135a[IR_KEYTAB_SIZE] = {
[0x00] = KEY_POWER2,
[0x2e] = KEY_DOT, /* '.' */
[0x01] = KEY_MODE, /* TV/FM */
[0x05] = KEY_1,
[0x06] = KEY_2,
[0x07] = KEY_3,
[0x09] = KEY_4,
[0x0a] = KEY_5,
[0x0b] = KEY_6,
[0x0d] = KEY_7,
[0x0e] = KEY_8,
[0x0f] = KEY_9,
[0x11] = KEY_0,
[0x13] = KEY_RIGHT, /* -> */
[0x12] = KEY_LEFT, /* <- */
[0x17] = KEY_SLEEP, /* Capturar Imagem */
[0x10] = KEY_SHUFFLE, /* Amostra */
/* FIXME: The keys bellow aren't ok */
[0x43] = KEY_CHANNELUP,
[0x42] = KEY_CHANNELDOWN,
[0x1f] = KEY_VOLUMEUP,
[0x1e] = KEY_VOLUMEDOWN,
[0x0c] = KEY_ENTER,
[0x14] = KEY_MUTE,
[0x08] = KEY_AUDIO,
[0x03] = KEY_TEXT,
[0x04] = KEY_EPG,
[0x2b] = KEY_TV2, /* TV2 */
[0x1d] = KEY_RED,
[0x1c] = KEY_YELLOW,
[0x41] = KEY_GREEN,
[0x40] = KEY_BLUE,
[0x1a] = KEY_PLAYPAUSE,
[0x19] = KEY_RECORD,
[0x18] = KEY_PLAY,
[0x1b] = KEY_STOP,
};
EXPORT_SYMBOL_GPL(ir_codes_avermedia_m135a);
/* Attila Kondoros <attila.kondoros@chello.hu> */ /* Attila Kondoros <attila.kondoros@chello.hu> */
IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE] = { IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE] = {
......
...@@ -3671,6 +3671,40 @@ struct saa7134_board saa7134_boards[] = { ...@@ -3671,6 +3671,40 @@ struct saa7134_board saa7134_boards[] = {
.tv = 1, .tv = 1,
}}, }},
}, },
[SAA7134_BOARD_AVERMEDIA_M135A] = {
.name = "Avermedia PCI pure analog (M135A)",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_TDA8290,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tuner_config = 2,
.gpiomask = 0x020200000,
.inputs = {{
.name = name_tv,
.vmux = 1,
.amux = TV,
.tv = 1,
}, {
.name = name_comp1,
.vmux = 3,
.amux = LINE1,
}, {
.name = name_svideo,
.vmux = 8,
.amux = LINE1,
} },
.radio = {
.name = name_radio,
.amux = TV,
.gpio = 0x00200000,
},
.mute = {
.name = name_mute,
.amux = TV,
.gpio = 0x01,
},
},
[SAA7134_BOARD_BEHOLD_401] = { [SAA7134_BOARD_BEHOLD_401] = {
/* Beholder Intl. Ltd. 2008 */ /* Beholder Intl. Ltd. 2008 */
/*Dmitry Belimov <d.belimov@gmail.com> */ /*Dmitry Belimov <d.belimov@gmail.com> */
...@@ -4846,6 +4880,12 @@ struct pci_device_id saa7134_pci_tbl[] = { ...@@ -4846,6 +4880,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
.driver_data = SAA7134_BOARD_AVERMEDIA_GO_007_FM, .driver_data = SAA7134_BOARD_AVERMEDIA_GO_007_FM,
},{ },{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x1461, /* Avermedia Technologies Inc */
.subdevice = 0xf11d,
.driver_data = SAA7134_BOARD_AVERMEDIA_M135A,
}, {
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7130, .device = PCI_DEVICE_ID_PHILIPS_SAA7130,
.subvendor = PCI_VENDOR_ID_PHILIPS, .subvendor = PCI_VENDOR_ID_PHILIPS,
...@@ -5702,6 +5742,7 @@ int saa7134_board_init1(struct saa7134_dev *dev) ...@@ -5702,6 +5742,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
case SAA7134_BOARD_AVERMEDIA_STUDIO_507: case SAA7134_BOARD_AVERMEDIA_STUDIO_507:
case SAA7134_BOARD_AVERMEDIA_GO_007_FM: case SAA7134_BOARD_AVERMEDIA_GO_007_FM:
case SAA7134_BOARD_AVERMEDIA_777: case SAA7134_BOARD_AVERMEDIA_777:
case SAA7134_BOARD_AVERMEDIA_M135A:
/* case SAA7134_BOARD_SABRENT_SBTTVFM: */ /* not finished yet */ /* case SAA7134_BOARD_SABRENT_SBTTVFM: */ /* not finished yet */
case SAA7134_BOARD_VIDEOMATE_TV_PVR: case SAA7134_BOARD_VIDEOMATE_TV_PVR:
case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS: case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS:
......
...@@ -401,6 +401,12 @@ int saa7134_input_init1(struct saa7134_dev *dev) ...@@ -401,6 +401,12 @@ int saa7134_input_init1(struct saa7134_dev *dev)
saa_setb(SAA7134_GPIO_GPMODE0, 0x4); saa_setb(SAA7134_GPIO_GPMODE0, 0x4);
saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4); saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4);
break; break;
case SAA7134_BOARD_AVERMEDIA_M135A:
ir_codes = ir_codes_avermedia_m135a;
mask_keydown = 0x0040000;
mask_keycode = 0x00013f;
nec_gpio = 1;
break;
case SAA7134_BOARD_AVERMEDIA_777: case SAA7134_BOARD_AVERMEDIA_777:
case SAA7134_BOARD_AVERMEDIA_A16AR: case SAA7134_BOARD_AVERMEDIA_A16AR:
ir_codes = ir_codes_avermedia; ir_codes = ir_codes_avermedia;
......
...@@ -271,6 +271,7 @@ struct saa7134_format { ...@@ -271,6 +271,7 @@ struct saa7134_format {
#define SAA7134_BOARD_ASUSTeK_P7131_ANALOG 146 #define SAA7134_BOARD_ASUSTeK_P7131_ANALOG 146
#define SAA7134_BOARD_ASUSTeK_TIGER_3IN1 147 #define SAA7134_BOARD_ASUSTeK_TIGER_3IN1 147
#define SAA7134_BOARD_ENCORE_ENLTV_FM53 148 #define SAA7134_BOARD_ENCORE_ENLTV_FM53 148
#define SAA7134_BOARD_AVERMEDIA_M135A 149
#define SAA7134_MAXBOARDS 8 #define SAA7134_MAXBOARDS 8
#define SAA7134_INPUT_MAX 8 #define SAA7134_INPUT_MAX 8
......
...@@ -110,6 +110,7 @@ void ir_rc5_timer_keyup(unsigned long data); ...@@ -110,6 +110,7 @@ void ir_rc5_timer_keyup(unsigned long data);
extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE];
extern IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE];
extern IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE];
extern IR_KEYTAB_TYPE ir_codes_avermedia_m135a[IR_KEYTAB_SIZE];
extern IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE];
extern IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE];
extern IR_KEYTAB_TYPE ir_codes_pixelview_new[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_pixelview_new[IR_KEYTAB_SIZE];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment