diff options
author | Herton Ronaldo Krzesinski <herton@mandriva.com.br> | 2010-05-08 01:23:37 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-06-01 00:21:52 -0400 |
commit | 9e1d9e7bac5c2bafc3c0c51db88c15f3fbcec83f (patch) | |
tree | 319a40ec1ff75b4a607f52812b7f9e295c1fae85 /drivers/media/video/saa7134/saa7134-cards.c | |
parent | e65f8c4e3eef3a0946f8e8fba1fb6aabde734f50 (diff) |
V4L/DVB: saa7134: add support for Avermedia M733A
This change adds support for Avermedia M733A. The original version for
linux 2.6.31 was sent to me from Avermedia, original author is unknown.
I ported it to current kernels, expanded and fixed key code handling for
RM-K6 remote control, and added an additional pci id also supported.
[mchehab@redhat.com: make checkpatch.pl happier]
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-cards.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 72700d4e3941..07f6bb8ef9d9 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -3897,6 +3897,40 @@ struct saa7134_board saa7134_boards[] = { | |||
3897 | .gpio = 0x01, | 3897 | .gpio = 0x01, |
3898 | }, | 3898 | }, |
3899 | }, | 3899 | }, |
3900 | [SAA7134_BOARD_AVERMEDIA_M733A] = { | ||
3901 | .name = "Avermedia PCI M733A", | ||
3902 | .audio_clock = 0x00187de7, | ||
3903 | .tuner_type = TUNER_PHILIPS_TDA8290, | ||
3904 | .radio_type = UNSET, | ||
3905 | .tuner_addr = ADDR_UNSET, | ||
3906 | .radio_addr = ADDR_UNSET, | ||
3907 | .tuner_config = 0, | ||
3908 | .gpiomask = 0x020200000, | ||
3909 | .inputs = {{ | ||
3910 | .name = name_tv, | ||
3911 | .vmux = 1, | ||
3912 | .amux = TV, | ||
3913 | .tv = 1, | ||
3914 | }, { | ||
3915 | .name = name_comp1, | ||
3916 | .vmux = 3, | ||
3917 | .amux = LINE1, | ||
3918 | }, { | ||
3919 | .name = name_svideo, | ||
3920 | .vmux = 8, | ||
3921 | .amux = LINE1, | ||
3922 | } }, | ||
3923 | .radio = { | ||
3924 | .name = name_radio, | ||
3925 | .amux = TV, | ||
3926 | .gpio = 0x00200000, | ||
3927 | }, | ||
3928 | .mute = { | ||
3929 | .name = name_mute, | ||
3930 | .amux = TV, | ||
3931 | .gpio = 0x01, | ||
3932 | }, | ||
3933 | }, | ||
3900 | [SAA7134_BOARD_BEHOLD_401] = { | 3934 | [SAA7134_BOARD_BEHOLD_401] = { |
3901 | /* Beholder Intl. Ltd. 2008 */ | 3935 | /* Beholder Intl. Ltd. 2008 */ |
3902 | /*Dmitry Belimov <d.belimov@gmail.com> */ | 3936 | /*Dmitry Belimov <d.belimov@gmail.com> */ |
@@ -5822,6 +5856,18 @@ struct pci_device_id saa7134_pci_tbl[] = { | |||
5822 | .driver_data = SAA7134_BOARD_AVERMEDIA_M135A, | 5856 | .driver_data = SAA7134_BOARD_AVERMEDIA_M135A, |
5823 | }, { | 5857 | }, { |
5824 | .vendor = PCI_VENDOR_ID_PHILIPS, | 5858 | .vendor = PCI_VENDOR_ID_PHILIPS, |
5859 | .device = PCI_DEVICE_ID_PHILIPS_SAA7133, | ||
5860 | .subvendor = 0x1461, /* Avermedia Technologies Inc */ | ||
5861 | .subdevice = 0x4155, | ||
5862 | .driver_data = SAA7134_BOARD_AVERMEDIA_M733A, | ||
5863 | }, { | ||
5864 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
5865 | .device = PCI_DEVICE_ID_PHILIPS_SAA7133, | ||
5866 | .subvendor = 0x1461, /* Avermedia Technologies Inc */ | ||
5867 | .subdevice = 0x4255, | ||
5868 | .driver_data = SAA7134_BOARD_AVERMEDIA_M733A, | ||
5869 | }, { | ||
5870 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
5825 | .device = PCI_DEVICE_ID_PHILIPS_SAA7130, | 5871 | .device = PCI_DEVICE_ID_PHILIPS_SAA7130, |
5826 | .subvendor = PCI_VENDOR_ID_PHILIPS, | 5872 | .subvendor = PCI_VENDOR_ID_PHILIPS, |
5827 | .subdevice = 0x2004, | 5873 | .subdevice = 0x2004, |
@@ -6786,6 +6832,7 @@ static int saa7134_tda8290_callback(struct saa7134_dev *dev, | |||
6786 | switch (dev->board) { | 6832 | switch (dev->board) { |
6787 | case SAA7134_BOARD_HAUPPAUGE_HVR1150: | 6833 | case SAA7134_BOARD_HAUPPAUGE_HVR1150: |
6788 | case SAA7134_BOARD_HAUPPAUGE_HVR1120: | 6834 | case SAA7134_BOARD_HAUPPAUGE_HVR1120: |
6835 | case SAA7134_BOARD_AVERMEDIA_M733A: | ||
6789 | /* tda8290 + tda18271 */ | 6836 | /* tda8290 + tda18271 */ |
6790 | ret = saa7134_tda8290_18271_callback(dev, command, arg); | 6837 | ret = saa7134_tda8290_18271_callback(dev, command, arg); |
6791 | break; | 6838 | break; |
@@ -7087,6 +7134,14 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
7087 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x0000C000, 0x0000C000); | 7134 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x0000C000, 0x0000C000); |
7088 | saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0000C000, 0x0000C000); | 7135 | saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0000C000, 0x0000C000); |
7089 | break; | 7136 | break; |
7137 | case SAA7134_BOARD_AVERMEDIA_M733A: | ||
7138 | saa7134_set_gpio(dev, 1, 1); | ||
7139 | msleep(10); | ||
7140 | saa7134_set_gpio(dev, 1, 0); | ||
7141 | msleep(10); | ||
7142 | saa7134_set_gpio(dev, 1, 1); | ||
7143 | dev->has_remote = SAA7134_REMOTE_GPIO; | ||
7144 | break; | ||
7090 | } | 7145 | } |
7091 | return 0; | 7146 | return 0; |
7092 | } | 7147 | } |