diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-06-24 01:05:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-24 03:06:39 -0400 |
commit | ac19ecc6fa57b0ea320f01831175ff163f47d6a2 (patch) | |
tree | e57248fd223eddb98a43eed6abbac704863a0abd | |
parent | 56fc08ca375491b965cb76fad65bfb98973e80d8 (diff) |
[PATCH] v4l: update for SAA7134 cards
This patch adds support for various SAA7134 cards and brings some fixes.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Fabrice Aeschbacher <fabrice.aeschbacher@laposte.net>
Signed-off-by: Hermann Pitton <hermann.pitton@onlinehome.de>.
Signed-off-by: Nickolay V Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/media/video/saa7134/saa6752hs.c | 21 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 163 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-dvb.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-empress.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-i2c.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-input.c | 112 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-oss.c | 16 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-tvaudio.c | 21 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-vbi.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 61 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 8 | ||||
-rw-r--r-- | drivers/media/video/tveeprom.c | 3 | ||||
-rw-r--r-- | drivers/media/video/v4l1-compat.c | 10 | ||||
-rw-r--r-- | include/media/tveeprom.h | 4 |
15 files changed, 333 insertions, 96 deletions
diff --git a/drivers/media/video/saa7134/saa6752hs.c b/drivers/media/video/saa7134/saa6752hs.c index 42c2b565c9fe..d14158b111bf 100644 --- a/drivers/media/video/saa7134/saa6752hs.c +++ b/drivers/media/video/saa7134/saa6752hs.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | /* Addresses to scan */ | 23 | /* Addresses to scan */ |
24 | static unsigned short normal_i2c[] = {0x20, I2C_CLIENT_END}; | 24 | static unsigned short normal_i2c[] = {0x20, I2C_CLIENT_END}; |
25 | static unsigned short normal_i2c_range[] = {I2C_CLIENT_END}; | ||
25 | I2C_CLIENT_INSMOD; | 26 | I2C_CLIENT_INSMOD; |
26 | 27 | ||
27 | MODULE_DESCRIPTION("device driver for saa6752hs MPEG2 encoder"); | 28 | MODULE_DESCRIPTION("device driver for saa6752hs MPEG2 encoder"); |
@@ -41,16 +42,16 @@ enum saa6752hs_videoformat { | |||
41 | 42 | ||
42 | static const struct v4l2_format v4l2_format_table[] = | 43 | static const struct v4l2_format v4l2_format_table[] = |
43 | { | 44 | { |
44 | [SAA6752HS_VF_D1] = { | 45 | [SAA6752HS_VF_D1] = |
45 | .fmt = { .pix = { .width = 720, .height = 576 }, }, }, | 46 | { .fmt = { .pix = { .width = 720, .height = 576 }}}, |
46 | [SAA6752HS_VF_2_3_D1] = { | 47 | [SAA6752HS_VF_2_3_D1] = |
47 | .fmt = { .pix = { .width = 480, .height = 576 }, }, }, | 48 | { .fmt = { .pix = { .width = 480, .height = 576 }}}, |
48 | [SAA6752HS_VF_1_2_D1] = { | 49 | [SAA6752HS_VF_1_2_D1] = |
49 | .fmt = { .pix = { .width = 352, .height = 576 }, }, }, | 50 | { .fmt = { .pix = { .width = 352, .height = 576 }}}, |
50 | [SAA6752HS_VF_SIF] = { | 51 | [SAA6752HS_VF_SIF] = |
51 | .fmt = { .pix = { .width = 352, .height = 288 }, }, }, | 52 | { .fmt = { .pix = { .width = 352, .height = 288 }}}, |
52 | [SAA6752HS_VF_UNKNOWN] = { | 53 | [SAA6752HS_VF_UNKNOWN] = |
53 | .fmt = { .pix = { .width = 0, .height = 0 }, }, }, | 54 | { .fmt = { .pix = { .width = 0, .height = 0}}}, |
54 | }; | 55 | }; |
55 | 56 | ||
56 | struct saa6752hs_state { | 57 | struct saa6752hs_state { |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index c51eb7f078d3..0c781e24c446 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -1,6 +1,6 @@ | |||
1 | 1 | ||
2 | /* | 2 | /* |
3 | * $Id: saa7134-cards.c,v 1.54 2005/03/07 12:01:51 kraxel Exp $ | 3 | * $Id: saa7134-cards.c,v 1.58 2005/06/07 18:05:00 nsh Exp $ |
4 | * | 4 | * |
5 | * device driver for philips saa7134 based TV cards | 5 | * device driver for philips saa7134 based TV cards |
6 | * card-specific stuff. | 6 | * card-specific stuff. |
@@ -165,7 +165,7 @@ struct saa7134_board saa7134_boards[] = { | |||
165 | .inputs = {{ | 165 | .inputs = {{ |
166 | .name = name_tv, | 166 | .name = name_tv, |
167 | .vmux = 1, | 167 | .vmux = 1, |
168 | .amux = LINE2, | 168 | .amux = TV, |
169 | .tv = 1, | 169 | .tv = 1, |
170 | },{ | 170 | },{ |
171 | .name = name_comp1, | 171 | .name = name_comp1, |
@@ -878,7 +878,7 @@ struct saa7134_board saa7134_boards[] = { | |||
878 | }, | 878 | }, |
879 | [SAA7134_BOARD_MANLI_MTV002] = { | 879 | [SAA7134_BOARD_MANLI_MTV002] = { |
880 | /* Ognjen Nastic <ognjen@logosoft.ba> */ | 880 | /* Ognjen Nastic <ognjen@logosoft.ba> */ |
881 | .name = "Manli MuchTV M-TV002", | 881 | .name = "Manli MuchTV M-TV002/Behold TV 403 FM", |
882 | .audio_clock = 0x00200000, | 882 | .audio_clock = 0x00200000, |
883 | .tuner_type = TUNER_PHILIPS_PAL, | 883 | .tuner_type = TUNER_PHILIPS_PAL, |
884 | .inputs = {{ | 884 | .inputs = {{ |
@@ -899,14 +899,10 @@ struct saa7134_board saa7134_boards[] = { | |||
899 | .name = name_radio, | 899 | .name = name_radio, |
900 | .amux = LINE2, | 900 | .amux = LINE2, |
901 | }, | 901 | }, |
902 | .mute = { | ||
903 | .name = name_mute, | ||
904 | .amux = LINE1, | ||
905 | }, | ||
906 | }, | 902 | }, |
907 | [SAA7134_BOARD_MANLI_MTV001] = { | 903 | [SAA7134_BOARD_MANLI_MTV001] = { |
908 | /* Ognjen Nastic <ognjen@logosoft.ba> UNTESTED */ | 904 | /* Ognjen Nastic <ognjen@logosoft.ba> UNTESTED */ |
909 | .name = "Manli MuchTV M-TV001", | 905 | .name = "Manli MuchTV M-TV001/Behold TV 401", |
910 | .audio_clock = 0x00200000, | 906 | .audio_clock = 0x00200000, |
911 | .tuner_type = TUNER_PHILIPS_PAL, | 907 | .tuner_type = TUNER_PHILIPS_PAL, |
912 | .inputs = {{ | 908 | .inputs = {{ |
@@ -923,6 +919,10 @@ struct saa7134_board saa7134_boards[] = { | |||
923 | .amux = LINE2, | 919 | .amux = LINE2, |
924 | .tv = 1, | 920 | .tv = 1, |
925 | }}, | 921 | }}, |
922 | .mute = { | ||
923 | .name = name_mute, | ||
924 | .amux = LINE1, | ||
925 | }, | ||
926 | }, | 926 | }, |
927 | [SAA7134_BOARD_TG3000TV] = { | 927 | [SAA7134_BOARD_TG3000TV] = { |
928 | /* TransGear 3000TV */ | 928 | /* TransGear 3000TV */ |
@@ -1078,7 +1078,6 @@ struct saa7134_board saa7134_boards[] = { | |||
1078 | .audio_clock = 0x00187de7, | 1078 | .audio_clock = 0x00187de7, |
1079 | .tuner_type = TUNER_PHILIPS_FM1256_IH3, | 1079 | .tuner_type = TUNER_PHILIPS_FM1256_IH3, |
1080 | .tda9887_conf = TDA9887_PRESENT, | 1080 | .tda9887_conf = TDA9887_PRESENT, |
1081 | .gpiomask = 0x3, | ||
1082 | .inputs = {{ | 1081 | .inputs = {{ |
1083 | .name = name_tv, | 1082 | .name = name_tv, |
1084 | .vmux = 1, | 1083 | .vmux = 1, |
@@ -1285,7 +1284,7 @@ struct saa7134_board saa7134_boards[] = { | |||
1285 | .gpio =0x8000, | 1284 | .gpio =0x8000, |
1286 | } | 1285 | } |
1287 | }, | 1286 | }, |
1288 | [SAA7134_BOARD_AVERMEDIA_307] = { | 1287 | [SAA7134_BOARD_AVERMEDIA_STUDIO_307] = { |
1289 | /* | 1288 | /* |
1290 | Nickolay V. Shmyrev <nshmyrev@yandex.ru> | 1289 | Nickolay V. Shmyrev <nshmyrev@yandex.ru> |
1291 | Lots of thanks to Andrey Zolotarev <zolotarev_andrey@mail.ru> | 1290 | Lots of thanks to Andrey Zolotarev <zolotarev_andrey@mail.ru> |
@@ -1323,6 +1322,35 @@ struct saa7134_board saa7134_boards[] = { | |||
1323 | .gpio = 0x01, | 1322 | .gpio = 0x01, |
1324 | }, | 1323 | }, |
1325 | }, | 1324 | }, |
1325 | [SAA7134_BOARD_AVERMEDIA_GO_007_FM] = { | ||
1326 | .name = "Avermedia AVerTV GO 007 FM", | ||
1327 | .audio_clock = 0x00187de7, | ||
1328 | .tuner_type = TUNER_PHILIPS_TDA8290, | ||
1329 | .gpiomask = 0x00300003, | ||
1330 | // .gpiomask = 0x8c240003, | ||
1331 | .inputs = {{ | ||
1332 | .name = name_tv, | ||
1333 | .vmux = 1, | ||
1334 | .amux = TV, | ||
1335 | .tv = 1, | ||
1336 | .gpio = 0x01, | ||
1337 | },{ | ||
1338 | .name = name_comp1, | ||
1339 | .vmux = 0, | ||
1340 | .amux = LINE2, | ||
1341 | .gpio = 0x02, | ||
1342 | },{ | ||
1343 | .name = name_svideo, | ||
1344 | .vmux = 6, | ||
1345 | .amux = LINE2, | ||
1346 | .gpio = 0x02, | ||
1347 | }}, | ||
1348 | .radio = { | ||
1349 | .name = name_radio, | ||
1350 | .amux = LINE1, | ||
1351 | .gpio = 0x00300001, | ||
1352 | }, | ||
1353 | }, | ||
1326 | [SAA7134_BOARD_AVERMEDIA_CARDBUS] = { | 1354 | [SAA7134_BOARD_AVERMEDIA_CARDBUS] = { |
1327 | /* Jon Westgate <oryn@oryn.fsck.tv> */ | 1355 | /* Jon Westgate <oryn@oryn.fsck.tv> */ |
1328 | .name = "AVerMedia Cardbus TV/Radio", | 1356 | .name = "AVerMedia Cardbus TV/Radio", |
@@ -1492,7 +1520,6 @@ struct saa7134_board saa7134_boards[] = { | |||
1492 | .audio_clock = 0x00187de7, | 1520 | .audio_clock = 0x00187de7, |
1493 | .tuner_type = TUNER_PHILIPS_FQ1216ME, | 1521 | .tuner_type = TUNER_PHILIPS_FQ1216ME, |
1494 | .tda9887_conf = TDA9887_PRESENT, | 1522 | .tda9887_conf = TDA9887_PRESENT, |
1495 | .gpiomask = 0x3, | ||
1496 | .inputs = {{ | 1523 | .inputs = {{ |
1497 | .name = name_tv, | 1524 | .name = name_tv, |
1498 | .vmux = 1, | 1525 | .vmux = 1, |
@@ -1546,7 +1573,82 @@ struct saa7134_board saa7134_boards[] = { | |||
1546 | // .gpio = 0x4000, | 1573 | // .gpio = 0x4000, |
1547 | }}, | 1574 | }}, |
1548 | }, | 1575 | }, |
1549 | }; | 1576 | [SAA7134_BOARD_AVERMEDIA_307] = { |
1577 | /* | ||
1578 | Davydov Vladimir <vladimir@iqmedia.com> | ||
1579 | */ | ||
1580 | .name = "Avermedia AVerTV 307", | ||
1581 | .audio_clock = 0x00187de7, | ||
1582 | .tuner_type = TUNER_PHILIPS_FQ1216ME, | ||
1583 | .tda9887_conf = TDA9887_PRESENT, | ||
1584 | .inputs = {{ | ||
1585 | .name = name_tv, | ||
1586 | .vmux = 1, | ||
1587 | .amux = TV, | ||
1588 | .tv = 1, | ||
1589 | },{ | ||
1590 | .name = name_comp1, | ||
1591 | .vmux = 0, | ||
1592 | .amux = LINE1, | ||
1593 | },{ | ||
1594 | .name = name_comp2, | ||
1595 | .vmux = 3, | ||
1596 | .amux = LINE1, | ||
1597 | },{ | ||
1598 | .name = name_svideo, | ||
1599 | .vmux = 8, | ||
1600 | .amux = LINE1, | ||
1601 | }}, | ||
1602 | }, | ||
1603 | [SAA7134_BOARD_ADS_INSTANT_TV] = { | ||
1604 | .name = "ADS Tech Instant TV (saa7135)", | ||
1605 | .audio_clock = 0x00187de7, | ||
1606 | .tuner_type = TUNER_PHILIPS_TDA8290, | ||
1607 | .inputs = {{ | ||
1608 | .name = name_tv, | ||
1609 | .vmux = 1, | ||
1610 | .amux = TV, | ||
1611 | .tv = 1, | ||
1612 | },{ | ||
1613 | .name = name_comp1, | ||
1614 | .vmux = 3, | ||
1615 | .amux = LINE2, | ||
1616 | },{ | ||
1617 | .name = name_svideo, | ||
1618 | .vmux = 8, | ||
1619 | .amux = LINE2, | ||
1620 | }}, | ||
1621 | }, | ||
1622 | [SAA7134_BOARD_KWORLD_VSTREAM_XPERT] = { | ||
1623 | .name = "Kworld/Tevion V-Stream Xpert TV PVR7134", | ||
1624 | .audio_clock = 0x00187de7, | ||
1625 | .tuner_type = TUNER_PHILIPS_PAL_I, | ||
1626 | .gpiomask = 0x0700, | ||
1627 | .inputs = {{ | ||
1628 | .name = name_tv, | ||
1629 | .vmux = 1, | ||
1630 | .amux = TV, | ||
1631 | .tv = 1, | ||
1632 | .gpio = 0x000, | ||
1633 | },{ | ||
1634 | .name = name_comp1, | ||
1635 | .vmux = 3, | ||
1636 | .amux = LINE1, | ||
1637 | .gpio = 0x200, //gpio by DScaler | ||
1638 | },{ | ||
1639 | .name = name_svideo, | ||
1640 | .vmux = 0, | ||
1641 | .amux = LINE1, | ||
1642 | .gpio = 0x200, | ||
1643 | }}, | ||
1644 | .radio = { | ||
1645 | .name = name_radio, | ||
1646 | .amux = LINE1, | ||
1647 | .gpio = 0x100, | ||
1648 | }, | ||
1649 | }, | ||
1650 | }; | ||
1651 | |||
1550 | const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); | 1652 | const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); |
1551 | 1653 | ||
1552 | /* ------------------------------------------------------------------ */ | 1654 | /* ------------------------------------------------------------------ */ |
@@ -1663,7 +1765,7 @@ struct pci_device_id saa7134_pci_tbl[] = { | |||
1663 | .driver_data = SAA7134_BOARD_ASUSTeK_TVFM7134, | 1765 | .driver_data = SAA7134_BOARD_ASUSTeK_TVFM7134, |
1664 | },{ | 1766 | },{ |
1665 | .vendor = PCI_VENDOR_ID_PHILIPS, | 1767 | .vendor = PCI_VENDOR_ID_PHILIPS, |
1666 | .device = PCI_DEVICE_ID_PHILIPS_SAA7133, | 1768 | .device = PCI_DEVICE_ID_PHILIPS_SAA7135, |
1667 | .subvendor = PCI_VENDOR_ID_ASUSTEK, | 1769 | .subvendor = PCI_VENDOR_ID_ASUSTEK, |
1668 | .subdevice = 0x4845, | 1770 | .subdevice = 0x4845, |
1669 | .driver_data = SAA7135_BOARD_ASUSTeK_TVFM7135, | 1771 | .driver_data = SAA7135_BOARD_ASUSTeK_TVFM7135, |
@@ -1824,6 +1926,12 @@ struct pci_device_id saa7134_pci_tbl[] = { | |||
1824 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, | 1926 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, |
1825 | .subvendor = 0x1461, /* Avermedia Technologies Inc */ | 1927 | .subvendor = 0x1461, /* Avermedia Technologies Inc */ |
1826 | .subdevice = 0x9715, | 1928 | .subdevice = 0x9715, |
1929 | .driver_data = SAA7134_BOARD_AVERMEDIA_STUDIO_307, | ||
1930 | },{ | ||
1931 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
1932 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, | ||
1933 | .subvendor = 0x1461, /* Avermedia Technologies Inc */ | ||
1934 | .subdevice = 0xa70a, | ||
1827 | .driver_data = SAA7134_BOARD_AVERMEDIA_307, | 1935 | .driver_data = SAA7134_BOARD_AVERMEDIA_307, |
1828 | },{ | 1936 | },{ |
1829 | .vendor = PCI_VENDOR_ID_PHILIPS, | 1937 | .vendor = PCI_VENDOR_ID_PHILIPS, |
@@ -1844,6 +1952,26 @@ struct pci_device_id saa7134_pci_tbl[] = { | |||
1844 | .subvendor = 0x5168, | 1952 | .subvendor = 0x5168, |
1845 | .subdevice = 0x0306, | 1953 | .subdevice = 0x0306, |
1846 | .driver_data = SAA7134_BOARD_FLYDVBTDUO, | 1954 | .driver_data = SAA7134_BOARD_FLYDVBTDUO, |
1955 | },{ | ||
1956 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
1957 | .device = PCI_DEVICE_ID_PHILIPS_SAA7133, | ||
1958 | .subvendor = 0x1461, /* Avermedia Technologies Inc */ | ||
1959 | .subdevice = 0xf31f, | ||
1960 | .driver_data = SAA7134_BOARD_AVERMEDIA_GO_007_FM, | ||
1961 | |||
1962 | },{ | ||
1963 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
1964 | .device = PCI_DEVICE_ID_PHILIPS_SAA7135, | ||
1965 | .subvendor = 0x1421, | ||
1966 | .subdevice = 0x0350, /* PCI version */ | ||
1967 | .driver_data = SAA7134_BOARD_ADS_INSTANT_TV, | ||
1968 | |||
1969 | },{ | ||
1970 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
1971 | .device = PCI_DEVICE_ID_PHILIPS_SAA7135, | ||
1972 | .subvendor = 0x1421, | ||
1973 | .subdevice = 0x0370, /* cardbus version */ | ||
1974 | .driver_data = SAA7134_BOARD_ADS_INSTANT_TV, | ||
1847 | 1975 | ||
1848 | },{ | 1976 | },{ |
1849 | /* --- boards without eeprom + subsystem ID --- */ | 1977 | /* --- boards without eeprom + subsystem ID --- */ |
@@ -1954,20 +2082,23 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
1954 | dev->has_remote = 1; | 2082 | dev->has_remote = 1; |
1955 | board_flyvideo(dev); | 2083 | board_flyvideo(dev); |
1956 | break; | 2084 | break; |
1957 | case SAA7134_BOARD_FLYTVPLATINUM_FM: | 2085 | case SAA7134_BOARD_FLYTVPLATINUM_FM: |
1958 | case SAA7134_BOARD_CINERGY400: | 2086 | case SAA7134_BOARD_CINERGY400: |
1959 | case SAA7134_BOARD_CINERGY600: | 2087 | case SAA7134_BOARD_CINERGY600: |
1960 | case SAA7134_BOARD_CINERGY600_MK3: | 2088 | case SAA7134_BOARD_CINERGY600_MK3: |
1961 | case SAA7134_BOARD_ECS_TVP3XP: | 2089 | case SAA7134_BOARD_ECS_TVP3XP: |
1962 | case SAA7134_BOARD_ECS_TVP3XP_4CB5: | 2090 | case SAA7134_BOARD_ECS_TVP3XP_4CB5: |
1963 | case SAA7134_BOARD_MD2819: | 2091 | case SAA7134_BOARD_MD2819: |
2092 | case SAA7134_BOARD_KWORLD_VSTREAM_XPERT: | ||
1964 | case SAA7134_BOARD_AVERMEDIA_STUDIO_305: | 2093 | case SAA7134_BOARD_AVERMEDIA_STUDIO_305: |
1965 | case SAA7134_BOARD_AVERMEDIA_305: | 2094 | case SAA7134_BOARD_AVERMEDIA_305: |
2095 | case SAA7134_BOARD_AVERMEDIA_STUDIO_307: | ||
1966 | case SAA7134_BOARD_AVERMEDIA_307: | 2096 | case SAA7134_BOARD_AVERMEDIA_307: |
2097 | case SAA7134_BOARD_AVERMEDIA_GO_007_FM: | ||
1967 | // case SAA7134_BOARD_SABRENT_SBTTVFM: /* not finished yet */ | 2098 | // case SAA7134_BOARD_SABRENT_SBTTVFM: /* not finished yet */ |
1968 | case SAA7134_BOARD_VIDEOMATE_TV_PVR: | 2099 | case SAA7134_BOARD_VIDEOMATE_TV_PVR: |
1969 | dev->has_remote = 1; | 2100 | case SAA7134_BOARD_MANLI_MTV001: |
1970 | break; | 2101 | case SAA7134_BOARD_MANLI_MTV002: |
1971 | case SAA7134_BOARD_AVACSSMARTTV: | 2102 | case SAA7134_BOARD_AVACSSMARTTV: |
1972 | dev->has_remote = 1; | 2103 | dev->has_remote = 1; |
1973 | break; | 2104 | break; |
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 634a2d25f2f5..f61ed1849a2a 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: saa7134-core.c,v 1.28 2005/02/22 09:56:29 kraxel Exp $ | 2 | * $Id: saa7134-core.c,v 1.30 2005/05/22 19:23:39 nsh Exp $ |
3 | * | 3 | * |
4 | * device driver for philips saa7134 based TV cards | 4 | * device driver for philips saa7134 based TV cards |
5 | * driver core | 5 | * driver core |
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index c2873ae029f9..aa8e2cf62d55 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: saa7134-dvb.c,v 1.12 2005/02/18 12:28:29 kraxel Exp $ | 2 | * $Id: saa7134-dvb.c,v 1.13 2005/06/12 04:19:19 mchehab Exp $ |
3 | * | 3 | * |
4 | * (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs] | 4 | * (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs] |
5 | * | 5 | * |
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index fa1357336907..c85348d0239f 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: saa7134-empress.c,v 1.10 2005/02/03 10:24:33 kraxel Exp $ | 2 | * $Id: saa7134-empress.c,v 1.11 2005/05/22 19:23:39 nsh Exp $ |
3 | * | 3 | * |
4 | * (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs] | 4 | * (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs] |
5 | * | 5 | * |
diff --git a/drivers/media/video/saa7134/saa7134-i2c.c b/drivers/media/video/saa7134/saa7134-i2c.c index 702bb63d9813..b6f002e8421d 100644 --- a/drivers/media/video/saa7134/saa7134-i2c.c +++ b/drivers/media/video/saa7134/saa7134-i2c.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: saa7134-i2c.c,v 1.10 2005/01/24 17:37:23 kraxel Exp $ | 2 | * $Id: saa7134-i2c.c,v 1.11 2005/06/12 01:36:14 mchehab Exp $ |
3 | * | 3 | * |
4 | * device driver for philips saa7134 based TV cards | 4 | * device driver for philips saa7134 based TV cards |
5 | * i2c interface support | 5 | * i2c interface support |
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index ca50cf531f20..aba2b9de60de 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: saa7134-input.c,v 1.16 2004/12/10 12:33:39 kraxel Exp $ | 2 | * $Id: saa7134-input.c,v 1.19 2005/06/07 18:02:26 nsh Exp $ |
3 | * | 3 | * |
4 | * handle saa7134 IR remotes via linux kernel input layer. | 4 | * handle saa7134 IR remotes via linux kernel input layer. |
5 | * | 5 | * |
@@ -308,6 +308,102 @@ static IR_KEYTAB_TYPE videomate_tv_pvr_codes[IR_KEYTAB_SIZE] = { | |||
308 | [ 32 ] = KEY_LANGUAGE, | 308 | [ 32 ] = KEY_LANGUAGE, |
309 | [ 33 ] = KEY_SLEEP, | 309 | [ 33 ] = KEY_SLEEP, |
310 | }; | 310 | }; |
311 | |||
312 | /* Michael Tokarev <mjt@tls.msk.ru> | ||
313 | http://www.corpit.ru/mjt/beholdTV/remote_control.jpg | ||
314 | keytable is used by MANLI MTV00[12] and BeholdTV 40[13] at | ||
315 | least, and probably other cards too. | ||
316 | The "ascii-art picture" below (in comments, first row | ||
317 | is the keycode in hex, and subsequent row(s) shows | ||
318 | the button labels (several variants when appropriate) | ||
319 | helps to descide which keycodes to assign to the buttons. | ||
320 | */ | ||
321 | static IR_KEYTAB_TYPE manli_codes[IR_KEYTAB_SIZE] = { | ||
322 | |||
323 | /* 0x1c 0x12 * | ||
324 | * FUNCTION POWER * | ||
325 | * FM (|) * | ||
326 | * */ | ||
327 | [ 0x1c ] = KEY_RADIO, /*XXX*/ | ||
328 | [ 0x12 ] = KEY_POWER, | ||
329 | |||
330 | /* 0x01 0x02 0x03 * | ||
331 | * 1 2 3 * | ||
332 | * * | ||
333 | * 0x04 0x05 0x06 * | ||
334 | * 4 5 6 * | ||
335 | * * | ||
336 | * 0x07 0x08 0x09 * | ||
337 | * 7 8 9 * | ||
338 | * */ | ||
339 | [ 0x01 ] = KEY_KP1, | ||
340 | [ 0x02 ] = KEY_KP2, | ||
341 | [ 0x03 ] = KEY_KP3, | ||
342 | [ 0x04 ] = KEY_KP4, | ||
343 | [ 0x05 ] = KEY_KP5, | ||
344 | [ 0x06 ] = KEY_KP6, | ||
345 | [ 0x07 ] = KEY_KP7, | ||
346 | [ 0x08 ] = KEY_KP8, | ||
347 | [ 0x09 ] = KEY_KP9, | ||
348 | |||
349 | /* 0x0a 0x00 0x17 * | ||
350 | * RECALL 0 +100 * | ||
351 | * PLUS * | ||
352 | * */ | ||
353 | [ 0x0a ] = KEY_AGAIN, /*XXX KEY_REWIND? */ | ||
354 | [ 0x00 ] = KEY_KP0, | ||
355 | [ 0x17 ] = KEY_DIGITS, /*XXX*/ | ||
356 | |||
357 | /* 0x14 0x10 * | ||
358 | * MENU INFO * | ||
359 | * OSD */ | ||
360 | [ 0x14 ] = KEY_MENU, | ||
361 | [ 0x10 ] = KEY_INFO, | ||
362 | |||
363 | /* 0x0b * | ||
364 | * Up * | ||
365 | * * | ||
366 | * 0x18 0x16 0x0c * | ||
367 | * Left Ok Right * | ||
368 | * * | ||
369 | * 0x015 * | ||
370 | * Down * | ||
371 | * */ | ||
372 | [ 0x0b ] = KEY_UP, /*XXX KEY_SCROLLUP? */ | ||
373 | [ 0x18 ] = KEY_LEFT, /*XXX KEY_BACK? */ | ||
374 | [ 0x16 ] = KEY_OK, /*XXX KEY_SELECT? KEY_ENTER? */ | ||
375 | [ 0x0c ] = KEY_RIGHT, /*XXX KEY_FORWARD? */ | ||
376 | [ 0x15 ] = KEY_DOWN, /*XXX KEY_SCROLLDOWN? */ | ||
377 | |||
378 | /* 0x11 0x0d * | ||
379 | * TV/AV MODE * | ||
380 | * SOURCE STEREO * | ||
381 | * */ | ||
382 | [ 0x11 ] = KEY_TV, /*XXX*/ | ||
383 | [ 0x0d ] = KEY_MODE, /*XXX there's no KEY_STEREO */ | ||
384 | |||
385 | /* 0x0f 0x1b 0x1a * | ||
386 | * AUDIO Vol+ Chan+ * | ||
387 | * TIMESHIFT??? * | ||
388 | * * | ||
389 | * 0x0e 0x1f 0x1e * | ||
390 | * SLEEP Vol- Chan- * | ||
391 | * */ | ||
392 | [ 0x0f ] = KEY_AUDIO, | ||
393 | [ 0x1b ] = KEY_VOLUMEUP, | ||
394 | [ 0x1a ] = KEY_CHANNELUP, | ||
395 | [ 0x0e ] = KEY_SLEEP, /*XXX maybe KEY_PAUSE */ | ||
396 | [ 0x1f ] = KEY_VOLUMEDOWN, | ||
397 | [ 0x1e ] = KEY_CHANNELDOWN, | ||
398 | |||
399 | /* 0x13 0x19 * | ||
400 | * MUTE SNAPSHOT* | ||
401 | * */ | ||
402 | [ 0x13 ] = KEY_MUTE, | ||
403 | [ 0x19 ] = KEY_RECORD, /*XXX*/ | ||
404 | |||
405 | // 0x1d unused ? | ||
406 | }; | ||
311 | /* ---------------------------------------------------------------------- */ | 407 | /* ---------------------------------------------------------------------- */ |
312 | 408 | ||
313 | static int build_key(struct saa7134_dev *dev) | 409 | static int build_key(struct saa7134_dev *dev) |
@@ -379,7 +475,7 @@ int saa7134_input_init1(struct saa7134_dev *dev) | |||
379 | switch (dev->board) { | 475 | switch (dev->board) { |
380 | case SAA7134_BOARD_FLYVIDEO2000: | 476 | case SAA7134_BOARD_FLYVIDEO2000: |
381 | case SAA7134_BOARD_FLYVIDEO3000: | 477 | case SAA7134_BOARD_FLYVIDEO3000: |
382 | case SAA7134_BOARD_FLYTVPLATINUM_FM: | 478 | case SAA7134_BOARD_FLYTVPLATINUM_FM: |
383 | ir_codes = flyvideo_codes; | 479 | ir_codes = flyvideo_codes; |
384 | mask_keycode = 0xEC00000; | 480 | mask_keycode = 0xEC00000; |
385 | mask_keydown = 0x0040000; | 481 | mask_keydown = 0x0040000; |
@@ -405,8 +501,12 @@ int saa7134_input_init1(struct saa7134_dev *dev) | |||
405 | polling = 50; // ms | 501 | polling = 50; // ms |
406 | break; | 502 | break; |
407 | case SAA7134_BOARD_MD2819: | 503 | case SAA7134_BOARD_MD2819: |
504 | case SAA7134_BOARD_KWORLD_VSTREAM_XPERT: | ||
408 | case SAA7134_BOARD_AVERMEDIA_305: | 505 | case SAA7134_BOARD_AVERMEDIA_305: |
409 | case SAA7134_BOARD_AVERMEDIA_307: | 506 | case SAA7134_BOARD_AVERMEDIA_307: |
507 | case SAA7134_BOARD_AVERMEDIA_STUDIO_305: | ||
508 | case SAA7134_BOARD_AVERMEDIA_STUDIO_307: | ||
509 | case SAA7134_BOARD_AVERMEDIA_GO_007_FM: | ||
410 | ir_codes = md2819_codes; | 510 | ir_codes = md2819_codes; |
411 | mask_keycode = 0x0007C8; | 511 | mask_keycode = 0x0007C8; |
412 | mask_keydown = 0x000010; | 512 | mask_keydown = 0x000010; |
@@ -415,6 +515,14 @@ int saa7134_input_init1(struct saa7134_dev *dev) | |||
415 | saa_setb(SAA7134_GPIO_GPMODE0, 0x4); | 515 | saa_setb(SAA7134_GPIO_GPMODE0, 0x4); |
416 | saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4); | 516 | saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4); |
417 | break; | 517 | break; |
518 | case SAA7134_BOARD_MANLI_MTV001: | ||
519 | case SAA7134_BOARD_MANLI_MTV002: | ||
520 | ir_codes = manli_codes; | ||
521 | mask_keycode = 0x001f00; | ||
522 | mask_keyup = 0x004000; | ||
523 | mask_keydown = 0x002000; | ||
524 | polling = 50; // ms | ||
525 | break; | ||
418 | case SAA7134_BOARD_VIDEOMATE_TV_PVR: | 526 | case SAA7134_BOARD_VIDEOMATE_TV_PVR: |
419 | ir_codes = videomate_tv_pvr_codes; | 527 | ir_codes = videomate_tv_pvr_codes; |
420 | mask_keycode = 0x00003F; | 528 | mask_keycode = 0x00003F; |
diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c index 6b6a643bf1cd..81732904623f 100644 --- a/drivers/media/video/saa7134/saa7134-oss.c +++ b/drivers/media/video/saa7134/saa7134-oss.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: saa7134-oss.c,v 1.13 2004/12/10 12:33:39 kraxel Exp $ | 2 | * $Id: saa7134-oss.c,v 1.14 2005/05/18 22:45:16 hhackmann Exp $ |
3 | * | 3 | * |
4 | * device driver for philips saa7134 based TV cards | 4 | * device driver for philips saa7134 based TV cards |
5 | * oss dsp interface | 5 | * oss dsp interface |
@@ -49,7 +49,6 @@ MODULE_PARM_DESC(oss_rate,"sample rate (valid are: 32000,48000)"); | |||
49 | 49 | ||
50 | static int dsp_buffer_conf(struct saa7134_dev *dev, int blksize, int blocks) | 50 | static int dsp_buffer_conf(struct saa7134_dev *dev, int blksize, int blocks) |
51 | { | 51 | { |
52 | blksize &= ~0xff; | ||
53 | if (blksize < 0x100) | 52 | if (blksize < 0x100) |
54 | blksize = 0x100; | 53 | blksize = 0x100; |
55 | if (blksize > 0x10000) | 54 | if (blksize > 0x10000) |
@@ -57,8 +56,6 @@ static int dsp_buffer_conf(struct saa7134_dev *dev, int blksize, int blocks) | |||
57 | 56 | ||
58 | if (blocks < 2) | 57 | if (blocks < 2) |
59 | blocks = 2; | 58 | blocks = 2; |
60 | while ((blksize * blocks) & ~PAGE_MASK) | ||
61 | blocks++; | ||
62 | if ((blksize * blocks) > 1024*1024) | 59 | if ((blksize * blocks) > 1024*1024) |
63 | blocks = 1024*1024 / blksize; | 60 | blocks = 1024*1024 / blksize; |
64 | 61 | ||
@@ -79,7 +76,7 @@ static int dsp_buffer_init(struct saa7134_dev *dev) | |||
79 | BUG(); | 76 | BUG(); |
80 | videobuf_dma_init(&dev->oss.dma); | 77 | videobuf_dma_init(&dev->oss.dma); |
81 | err = videobuf_dma_init_kernel(&dev->oss.dma, PCI_DMA_FROMDEVICE, | 78 | err = videobuf_dma_init_kernel(&dev->oss.dma, PCI_DMA_FROMDEVICE, |
82 | dev->oss.bufsize >> PAGE_SHIFT); | 79 | (dev->oss.bufsize + PAGE_SIZE) >> PAGE_SHIFT); |
83 | if (0 != err) | 80 | if (0 != err) |
84 | return err; | 81 | return err; |
85 | return 0; | 82 | return 0; |
@@ -163,10 +160,11 @@ static int dsp_rec_start(struct saa7134_dev *dev) | |||
163 | fmt |= 0x04; | 160 | fmt |= 0x04; |
164 | fmt |= (TV == dev->oss.input) ? 0xc0 : 0x80; | 161 | fmt |= (TV == dev->oss.input) ? 0xc0 : 0x80; |
165 | 162 | ||
166 | saa_writeb(SAA7134_NUM_SAMPLES0, (dev->oss.blksize & 0x0000ff)); | 163 | saa_writeb(SAA7134_NUM_SAMPLES0, ((dev->oss.blksize - 1) & 0x0000ff)); |
167 | saa_writeb(SAA7134_NUM_SAMPLES1, (dev->oss.blksize & 0x00ff00) >> 8); | 164 | saa_writeb(SAA7134_NUM_SAMPLES1, ((dev->oss.blksize - 1) & 0x00ff00) >> 8); |
168 | saa_writeb(SAA7134_NUM_SAMPLES2, (dev->oss.blksize & 0xff0000) >> 16); | 165 | saa_writeb(SAA7134_NUM_SAMPLES2, ((dev->oss.blksize - 1) & 0xff0000) >> 16); |
169 | saa_writeb(SAA7134_AUDIO_FORMAT_CTRL, fmt); | 166 | saa_writeb(SAA7134_AUDIO_FORMAT_CTRL, fmt); |
167 | |||
170 | break; | 168 | break; |
171 | case PCI_DEVICE_ID_PHILIPS_SAA7133: | 169 | case PCI_DEVICE_ID_PHILIPS_SAA7133: |
172 | case PCI_DEVICE_ID_PHILIPS_SAA7135: | 170 | case PCI_DEVICE_ID_PHILIPS_SAA7135: |
@@ -817,7 +815,7 @@ void saa7134_irq_oss_done(struct saa7134_dev *dev, unsigned long status) | |||
817 | reg = SAA7134_RS_BA1(6); | 815 | reg = SAA7134_RS_BA1(6); |
818 | } else { | 816 | } else { |
819 | /* even */ | 817 | /* even */ |
820 | if (0 == (dev->oss.dma_blk & 0x00)) | 818 | if (1 == (dev->oss.dma_blk & 0x01)) |
821 | reg = SAA7134_RS_BA2(6); | 819 | reg = SAA7134_RS_BA2(6); |
822 | } | 820 | } |
823 | if (0 == reg) { | 821 | if (0 == reg) { |
diff --git a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c index ecac13c006d5..3617e7f7a410 100644 --- a/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/drivers/media/video/saa7134/saa7134-tvaudio.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: saa7134-tvaudio.c,v 1.22 2005/01/07 13:11:19 kraxel Exp $ | 2 | * $Id: saa7134-tvaudio.c,v 1.25 2005/06/07 19:00:38 nsh Exp $ |
3 | * | 3 | * |
4 | * device driver for philips saa7134 based TV cards | 4 | * device driver for philips saa7134 based TV cards |
5 | * tv audio decoder (fm stereo, nicam, ...) | 5 | * tv audio decoder (fm stereo, nicam, ...) |
@@ -181,7 +181,8 @@ static void tvaudio_init(struct saa7134_dev *dev) | |||
181 | saa_writeb(SAA7134_AUDIO_CLOCK0, clock & 0xff); | 181 | saa_writeb(SAA7134_AUDIO_CLOCK0, clock & 0xff); |
182 | saa_writeb(SAA7134_AUDIO_CLOCK1, (clock >> 8) & 0xff); | 182 | saa_writeb(SAA7134_AUDIO_CLOCK1, (clock >> 8) & 0xff); |
183 | saa_writeb(SAA7134_AUDIO_CLOCK2, (clock >> 16) & 0xff); | 183 | saa_writeb(SAA7134_AUDIO_CLOCK2, (clock >> 16) & 0xff); |
184 | saa_writeb(SAA7134_AUDIO_PLL_CTRL, 0x01); | 184 | // frame locked audio was reported not to be reliable |
185 | saa_writeb(SAA7134_AUDIO_PLL_CTRL, 0x02); | ||
185 | 186 | ||
186 | saa_writeb(SAA7134_NICAM_ERROR_LOW, 0x14); | 187 | saa_writeb(SAA7134_NICAM_ERROR_LOW, 0x14); |
187 | saa_writeb(SAA7134_NICAM_ERROR_HIGH, 0x50); | 188 | saa_writeb(SAA7134_NICAM_ERROR_HIGH, 0x50); |
@@ -250,6 +251,11 @@ static void mute_input_7134(struct saa7134_dev *dev) | |||
250 | saa_andorb(SAA7134_AUDIO_FORMAT_CTRL, 0xc0, ausel); | 251 | saa_andorb(SAA7134_AUDIO_FORMAT_CTRL, 0xc0, ausel); |
251 | saa_andorb(SAA7134_ANALOG_IO_SELECT, 0x08, ics); | 252 | saa_andorb(SAA7134_ANALOG_IO_SELECT, 0x08, ics); |
252 | saa_andorb(SAA7134_ANALOG_IO_SELECT, 0x07, ocs); | 253 | saa_andorb(SAA7134_ANALOG_IO_SELECT, 0x07, ocs); |
254 | // for oss, we need to change the clock configuration | ||
255 | if (in->amux == TV) | ||
256 | saa_andorb(SAA7134_SIF_SAMPLE_FREQ, 0x03, 0x00); | ||
257 | else | ||
258 | saa_andorb(SAA7134_SIF_SAMPLE_FREQ, 0x03, 0x01); | ||
253 | 259 | ||
254 | /* switch gpio-connected external audio mux */ | 260 | /* switch gpio-connected external audio mux */ |
255 | if (0 == card(dev).gpiomask) | 261 | if (0 == card(dev).gpiomask) |
@@ -439,16 +445,15 @@ static int tvaudio_getstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *au | |||
439 | nicam = saa_readb(SAA7134_NICAM_STATUS); | 445 | nicam = saa_readb(SAA7134_NICAM_STATUS); |
440 | dprintk("getstereo: nicam=0x%x\n",nicam); | 446 | dprintk("getstereo: nicam=0x%x\n",nicam); |
441 | switch (nicam & 0x0b) { | 447 | switch (nicam & 0x0b) { |
448 | case 0x08: | ||
449 | retval = V4L2_TUNER_SUB_MONO; | ||
450 | break; | ||
442 | case 0x09: | 451 | case 0x09: |
443 | retval = V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2; | 452 | retval = V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2; |
444 | break; | 453 | break; |
445 | case 0x0a: | 454 | case 0x0a: |
446 | retval = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO; | 455 | retval = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO; |
447 | break; | 456 | break; |
448 | case 0x08: | ||
449 | default: | ||
450 | retval = V4L2_TUNER_SUB_MONO; | ||
451 | break; | ||
452 | } | 457 | } |
453 | break; | 458 | break; |
454 | } | 459 | } |
@@ -572,14 +577,14 @@ static int tvaudio_thread(void *data) | |||
572 | } else if (0 != dev->last_carrier) { | 577 | } else if (0 != dev->last_carrier) { |
573 | /* no carrier -- try last detected one as fallback */ | 578 | /* no carrier -- try last detected one as fallback */ |
574 | carrier = dev->last_carrier; | 579 | carrier = dev->last_carrier; |
575 | printk(KERN_WARNING "%s/audio: audio carrier scan failed, " | 580 | dprintk(KERN_WARNING "%s/audio: audio carrier scan failed, " |
576 | "using %d.%03d MHz [last detected]\n", | 581 | "using %d.%03d MHz [last detected]\n", |
577 | dev->name, carrier/1000, carrier%1000); | 582 | dev->name, carrier/1000, carrier%1000); |
578 | 583 | ||
579 | } else { | 584 | } else { |
580 | /* no carrier + no fallback -- use default */ | 585 | /* no carrier + no fallback -- use default */ |
581 | carrier = default_carrier; | 586 | carrier = default_carrier; |
582 | printk(KERN_WARNING "%s/audio: audio carrier scan failed, " | 587 | dprintk(KERN_WARNING "%s/audio: audio carrier scan failed, " |
583 | "using %d.%03d MHz [default]\n", | 588 | "using %d.%03d MHz [default]\n", |
584 | dev->name, carrier/1000, carrier%1000); | 589 | dev->name, carrier/1000, carrier%1000); |
585 | } | 590 | } |
diff --git a/drivers/media/video/saa7134/saa7134-vbi.c b/drivers/media/video/saa7134/saa7134-vbi.c index 03c350ffb2d8..3c33c591cc85 100644 --- a/drivers/media/video/saa7134/saa7134-vbi.c +++ b/drivers/media/video/saa7134/saa7134-vbi.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: saa7134-vbi.c,v 1.6 2004/12/10 12:33:39 kraxel Exp $ | 2 | * $Id: saa7134-vbi.c,v 1.7 2005/05/24 23:13:06 nsh Exp $ |
3 | * | 3 | * |
4 | * device driver for philips saa7134 based TV cards | 4 | * device driver for philips saa7134 based TV cards |
5 | * video4linux video interface | 5 | * video4linux video interface |
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 72f86736a795..c0a2ee520531 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: saa7134-video.c,v 1.28 2005/02/15 15:59:35 kraxel Exp $ | 2 | * $Id: saa7134-video.c,v 1.30 2005/06/07 19:00:38 nsh Exp $ |
3 | * | 3 | * |
4 | * device driver for philips saa7134 based TV cards | 4 | * device driver for philips saa7134 based TV cards |
5 | * video4linux video interface | 5 | * video4linux video interface |
@@ -31,8 +31,6 @@ | |||
31 | #include "saa7134-reg.h" | 31 | #include "saa7134-reg.h" |
32 | #include "saa7134.h" | 32 | #include "saa7134.h" |
33 | 33 | ||
34 | #define V4L2_I2C_CLIENTS 1 | ||
35 | |||
36 | /* ------------------------------------------------------------------ */ | 34 | /* ------------------------------------------------------------------ */ |
37 | 35 | ||
38 | static unsigned int video_debug = 0; | 36 | static unsigned int video_debug = 0; |
@@ -276,12 +274,12 @@ static struct saa7134_tvnorm tvnorms[] = { | |||
276 | 274 | ||
277 | .h_start = 0, | 275 | .h_start = 0, |
278 | .h_stop = 719, | 276 | .h_stop = 719, |
279 | .video_v_start = 23, | 277 | .video_v_start = 23, |
280 | .video_v_stop = 262, | 278 | .video_v_stop = 262, |
281 | .vbi_v_start_0 = 10, | 279 | .vbi_v_start_0 = 10, |
282 | .vbi_v_stop_0 = 21, | 280 | .vbi_v_stop_0 = 21, |
283 | .vbi_v_start_1 = 273, | 281 | .vbi_v_start_1 = 273, |
284 | .src_timing = 7, | 282 | .src_timing = 7, |
285 | 283 | ||
286 | .sync_control = 0x18, | 284 | .sync_control = 0x18, |
287 | .luma_control = 0x40, | 285 | .luma_control = 0x40, |
@@ -524,22 +522,7 @@ static void set_tvnorm(struct saa7134_dev *dev, struct saa7134_tvnorm *norm) | |||
524 | saa_writeb(SAA7134_RAW_DATA_GAIN, 0x40); | 522 | saa_writeb(SAA7134_RAW_DATA_GAIN, 0x40); |
525 | saa_writeb(SAA7134_RAW_DATA_OFFSET, 0x80); | 523 | saa_writeb(SAA7134_RAW_DATA_OFFSET, 0x80); |
526 | 524 | ||
527 | #ifdef V4L2_I2C_CLIENTS | ||
528 | saa7134_i2c_call_clients(dev,VIDIOC_S_STD,&norm->id); | 525 | saa7134_i2c_call_clients(dev,VIDIOC_S_STD,&norm->id); |
529 | #else | ||
530 | { | ||
531 | /* pass down info to the i2c chips (v4l1) */ | ||
532 | struct video_channel c; | ||
533 | memset(&c,0,sizeof(c)); | ||
534 | c.channel = dev->ctl_input; | ||
535 | c.norm = VIDEO_MODE_PAL; | ||
536 | if (norm->id & V4L2_STD_NTSC) | ||
537 | c.norm = VIDEO_MODE_NTSC; | ||
538 | if (norm->id & V4L2_STD_SECAM) | ||
539 | c.norm = VIDEO_MODE_SECAM; | ||
540 | saa7134_i2c_call_clients(dev,VIDIOCSCHAN,&c); | ||
541 | } | ||
542 | #endif | ||
543 | } | 526 | } |
544 | 527 | ||
545 | static void video_mux(struct saa7134_dev *dev, int input) | 528 | static void video_mux(struct saa7134_dev *dev, int input) |
@@ -1883,11 +1866,9 @@ static int video_do_ioctl(struct inode *inode, struct file *file, | |||
1883 | return -EINVAL; | 1866 | return -EINVAL; |
1884 | down(&dev->lock); | 1867 | down(&dev->lock); |
1885 | dev->ctl_freq = f->frequency; | 1868 | dev->ctl_freq = f->frequency; |
1886 | #ifdef V4L2_I2C_CLIENTS | 1869 | |
1887 | saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,f); | 1870 | saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,f); |
1888 | #else | 1871 | |
1889 | saa7134_i2c_call_clients(dev,VIDIOCSFREQ,&dev->ctl_freq); | ||
1890 | #endif | ||
1891 | saa7134_tvaudio_do_scan(dev); | 1872 | saa7134_tvaudio_do_scan(dev); |
1892 | up(&dev->lock); | 1873 | up(&dev->lock); |
1893 | return 0; | 1874 | return 0; |
@@ -2142,16 +2123,19 @@ static int radio_do_ioctl(struct inode *inode, struct file *file, | |||
2142 | t->rangelow = (int)(65*16); | 2123 | t->rangelow = (int)(65*16); |
2143 | t->rangehigh = (int)(108*16); | 2124 | t->rangehigh = (int)(108*16); |
2144 | 2125 | ||
2145 | #ifdef V4L2_I2C_CLIENTS | 2126 | saa7134_i2c_call_clients(dev, VIDIOC_G_TUNER, t); |
2146 | saa7134_i2c_call_clients(dev,VIDIOC_G_TUNER,t); | 2127 | |
2147 | #else | 2128 | return 0; |
2148 | { | 2129 | } |
2149 | struct video_tuner vt; | 2130 | case VIDIOC_S_TUNER: |
2150 | memset(&vt,0,sizeof(vt)); | 2131 | { |
2151 | saa7134_i2c_call_clients(dev,VIDIOCGTUNER,&vt); | 2132 | struct v4l2_tuner *t = arg; |
2152 | t->signal = vt.signal; | 2133 | |
2153 | } | 2134 | if (0 != t->index) |
2154 | #endif | 2135 | return -EINVAL; |
2136 | |||
2137 | saa7134_i2c_call_clients(dev,VIDIOC_S_TUNER,t); | ||
2138 | |||
2155 | return 0; | 2139 | return 0; |
2156 | } | 2140 | } |
2157 | case VIDIOC_ENUMINPUT: | 2141 | case VIDIOC_ENUMINPUT: |
@@ -2185,7 +2169,6 @@ static int radio_do_ioctl(struct inode *inode, struct file *file, | |||
2185 | return 0; | 2169 | return 0; |
2186 | } | 2170 | } |
2187 | case VIDIOC_S_AUDIO: | 2171 | case VIDIOC_S_AUDIO: |
2188 | case VIDIOC_S_TUNER: | ||
2189 | case VIDIOC_S_INPUT: | 2172 | case VIDIOC_S_INPUT: |
2190 | case VIDIOC_S_STD: | 2173 | case VIDIOC_S_STD: |
2191 | return 0; | 2174 | return 0; |
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index b808f18890b3..d6b1c0d4d0f9 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: saa7134.h,v 1.38 2005/03/07 12:01:51 kraxel Exp $ | 2 | * $Id: saa7134.h,v 1.41 2005/06/07 18:02:26 nsh Exp $ |
3 | * | 3 | * |
4 | * v4l2 device driver for philips saa7134 based TV cards | 4 | * v4l2 device driver for philips saa7134 based TV cards |
5 | * | 5 | * |
@@ -168,7 +168,7 @@ struct saa7134_format { | |||
168 | #define SAA7134_BOARD_SABRENT_SBTTVFM 42 | 168 | #define SAA7134_BOARD_SABRENT_SBTTVFM 42 |
169 | #define SAA7134_BOARD_ZOLID_XPERT_TV7134 43 | 169 | #define SAA7134_BOARD_ZOLID_XPERT_TV7134 43 |
170 | #define SAA7134_BOARD_EMPIRE_PCI_TV_RADIO_LE 44 | 170 | #define SAA7134_BOARD_EMPIRE_PCI_TV_RADIO_LE 44 |
171 | #define SAA7134_BOARD_AVERMEDIA_307 45 | 171 | #define SAA7134_BOARD_AVERMEDIA_STUDIO_307 45 |
172 | #define SAA7134_BOARD_AVERMEDIA_CARDBUS 46 | 172 | #define SAA7134_BOARD_AVERMEDIA_CARDBUS 46 |
173 | #define SAA7134_BOARD_CINERGY400_CARDBUS 47 | 173 | #define SAA7134_BOARD_CINERGY400_CARDBUS 47 |
174 | #define SAA7134_BOARD_CINERGY600_MK3 48 | 174 | #define SAA7134_BOARD_CINERGY600_MK3 48 |
@@ -179,6 +179,10 @@ struct saa7134_format { | |||
179 | #define SAA7135_BOARD_ASUSTeK_TVFM7135 53 | 179 | #define SAA7135_BOARD_ASUSTeK_TVFM7135 53 |
180 | #define SAA7134_BOARD_FLYTVPLATINUM_FM 54 | 180 | #define SAA7134_BOARD_FLYTVPLATINUM_FM 54 |
181 | #define SAA7134_BOARD_FLYDVBTDUO 55 | 181 | #define SAA7134_BOARD_FLYDVBTDUO 55 |
182 | #define SAA7134_BOARD_AVERMEDIA_307 56 | ||
183 | #define SAA7134_BOARD_AVERMEDIA_GO_007_FM 57 | ||
184 | #define SAA7134_BOARD_ADS_INSTANT_TV 58 | ||
185 | #define SAA7134_BOARD_KWORLD_VSTREAM_XPERT 59 | ||
182 | 186 | ||
183 | #define SAA7134_MAXBOARDS 8 | 187 | #define SAA7134_MAXBOARDS 8 |
184 | #define SAA7134_INPUT_MAX 8 | 188 | #define SAA7134_INPUT_MAX 8 |
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index 3d216973798c..cf069bf0d6ad 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c | |||
@@ -75,7 +75,7 @@ hauppauge_tuner_fmt[] = | |||
75 | { 0x00000007, "PAL(B/G)" }, | 75 | { 0x00000007, "PAL(B/G)" }, |
76 | { 0x00001000, "NTSC(M)" }, | 76 | { 0x00001000, "NTSC(M)" }, |
77 | { 0x00000010, "PAL(I)" }, | 77 | { 0x00000010, "PAL(I)" }, |
78 | { 0x00400000, "SECAM(L/L�)" }, | 78 | { 0x00400000, "SECAM(L/L´)" }, |
79 | { 0x00000e00, "PAL(D/K)" }, | 79 | { 0x00000e00, "PAL(D/K)" }, |
80 | { 0x03000000, "ATSC Digital" }, | 80 | { 0x03000000, "ATSC Digital" }, |
81 | }; | 81 | }; |
@@ -482,6 +482,7 @@ static unsigned short normal_i2c[] = { | |||
482 | 0xa0 >> 1, | 482 | 0xa0 >> 1, |
483 | I2C_CLIENT_END, | 483 | I2C_CLIENT_END, |
484 | }; | 484 | }; |
485 | static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; | ||
485 | I2C_CLIENT_INSMOD; | 486 | I2C_CLIENT_INSMOD; |
486 | 487 | ||
487 | struct i2c_driver i2c_driver_tveeprom; | 488 | struct i2c_driver i2c_driver_tveeprom; |
diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c index b0d4bcb027d0..70ecbdb80277 100644 --- a/drivers/media/video/v4l1-compat.c +++ b/drivers/media/video/v4l1-compat.c | |||
@@ -1,4 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: v4l1-compat.c,v 1.9 2005/06/12 04:19:19 mchehab Exp $ | ||
3 | * | ||
2 | * Video for Linux Two | 4 | * Video for Linux Two |
3 | * Backward Compatibility Layer | 5 | * Backward Compatibility Layer |
4 | * | 6 | * |
@@ -15,14 +17,11 @@ | |||
15 | * | 17 | * |
16 | */ | 18 | */ |
17 | 19 | ||
18 | #ifndef __KERNEL__ | ||
19 | #define __KERNEL__ | ||
20 | #endif | ||
21 | |||
22 | #include <linux/config.h> | 20 | #include <linux/config.h> |
23 | 21 | ||
24 | #include <linux/init.h> | 22 | #include <linux/init.h> |
25 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/moduleparam.h> | ||
26 | #include <linux/types.h> | 25 | #include <linux/types.h> |
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
28 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
@@ -787,12 +786,15 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
787 | !(qctrl2.flags & V4L2_CTRL_FLAG_DISABLED)) | 786 | !(qctrl2.flags & V4L2_CTRL_FLAG_DISABLED)) |
788 | aud->step = qctrl2.step; | 787 | aud->step = qctrl2.step; |
789 | aud->mode = 0; | 788 | aud->mode = 0; |
789 | |||
790 | memset(&tun2,0,sizeof(tun2)); | ||
790 | err = drv(inode, file, VIDIOC_G_TUNER, &tun2); | 791 | err = drv(inode, file, VIDIOC_G_TUNER, &tun2); |
791 | if (err < 0) { | 792 | if (err < 0) { |
792 | dprintk("VIDIOCGAUDIO / VIDIOC_G_TUNER: %d\n",err); | 793 | dprintk("VIDIOCGAUDIO / VIDIOC_G_TUNER: %d\n",err); |
793 | err = 0; | 794 | err = 0; |
794 | break; | 795 | break; |
795 | } | 796 | } |
797 | |||
796 | if (tun2.rxsubchans & V4L2_TUNER_SUB_LANG2) | 798 | if (tun2.rxsubchans & V4L2_TUNER_SUB_LANG2) |
797 | aud->mode = VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; | 799 | aud->mode = VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
798 | else if (tun2.rxsubchans & V4L2_TUNER_SUB_STEREO) | 800 | else if (tun2.rxsubchans & V4L2_TUNER_SUB_STEREO) |
diff --git a/include/media/tveeprom.h b/include/media/tveeprom.h index 627603e561a6..5c4fe30e8d1d 100644 --- a/include/media/tveeprom.h +++ b/include/media/tveeprom.h | |||
@@ -1,3 +1,7 @@ | |||
1 | /* | ||
2 | * $Id: tveeprom.h,v 1.2 2005/06/12 04:19:19 mchehab Exp $ | ||
3 | */ | ||
4 | |||
1 | struct tveeprom { | 5 | struct tveeprom { |
2 | u32 has_radio; | 6 | u32 has_radio; |
3 | 7 | ||