Commit 330a115a authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Linus Torvalds

[PATCH] v4l: SAA7134 Update

- Corrected all cards marked as 7135 cards to 7133.
- Add new card support for Compro VideoMate TV Gold+II.
- Add new card support for Kworld Xpert TV PVR7134
- Add new card support for Typhoon DVB-T Cardbus.
- Changes to comply with CodingStyle: // comments converted to /* */
- Remove irq2_mask field from saa7134_dev structure.
- Collect all the bits needed in saa7134_hwinit2() instead.
- Distinguish the different variants of the Medion MD7134 modules via eeprom
- moved Philips FMD1216 radio specific setup to saa7134-core.c
- Fix kernel compile error with CONFIG_MODULES=n
- Cleanup tuner private calls.
- Some Indent fixes.
Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
Signed-off-by: default avatarMichael Krufky <mkrufky@m1k.net>
Signed-off-by: default avatarHannibal <hannibal@megapolis.pl>
Signed-off-by: default avatarElshin Roman <roxmail@list.ru>
Signed-off-by: default avatarHermann Pitton <hermann.pitton@onlinehome.de>
Signed-off-by: default avatarJuergen Orschiedt <jorschiedt@web.de>
Signed-off-by: default avatarHartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 85369df3
/* /*
* $Id: saa7134-cards.c,v 1.58 2005/06/07 18:05:00 nsh Exp $ * $Id: saa7134-cards.c,v 1.80 2005/07/07 01:49:30 mkrufky Exp $
* *
* device driver for philips saa7134 based TV cards * device driver for philips saa7134 based TV cards
* card-specific stuff. * card-specific stuff.
...@@ -47,6 +46,10 @@ struct saa7134_board saa7134_boards[] = { ...@@ -47,6 +46,10 @@ struct saa7134_board saa7134_boards[] = {
.name = "UNKNOWN/GENERIC", .name = "UNKNOWN/GENERIC",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_ABSENT, .tuner_type = TUNER_ABSENT,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = "default", .name = "default",
.vmux = 0, .vmux = 0,
...@@ -58,6 +61,10 @@ struct saa7134_board saa7134_boards[] = { ...@@ -58,6 +61,10 @@ struct saa7134_board saa7134_boards[] = {
.name = "Proteus Pro [philips reference design]", .name = "Proteus Pro [philips reference design]",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_comp1, .name = name_comp1,
.vmux = 0, .vmux = 0,
...@@ -83,6 +90,10 @@ struct saa7134_board saa7134_boards[] = { ...@@ -83,6 +90,10 @@ struct saa7134_board saa7134_boards[] = {
.name = "LifeView FlyVIDEO3000", .name = "LifeView FlyVIDEO3000",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.gpiomask = 0xe000, .gpiomask = 0xe000,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -117,12 +128,21 @@ struct saa7134_board saa7134_boards[] = { ...@@ -117,12 +128,21 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE2, .amux = LINE2,
.gpio = 0x2000, .gpio = 0x2000,
}, },
.mute = {
.name = name_mute,
.amux = TV,
.gpio = 0x8000,
},
}, },
[SAA7134_BOARD_FLYVIDEO2000] = { [SAA7134_BOARD_FLYVIDEO2000] = {
/* "TC Wan" <tcwan@cs.usm.my> */ /* "TC Wan" <tcwan@cs.usm.my> */
.name = "LifeView FlyVIDEO2000", .name = "LifeView FlyVIDEO2000",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_LG_PAL_NEW_TAPC, .tuner_type = TUNER_LG_PAL_NEW_TAPC,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.gpiomask = 0xe000, .gpiomask = 0xe000,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -162,6 +182,10 @@ struct saa7134_board saa7134_boards[] = { ...@@ -162,6 +182,10 @@ struct saa7134_board saa7134_boards[] = {
.name = "LifeView FlyTV Platinum Mini", .name = "LifeView FlyTV Platinum Mini",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_TDA8290, .tuner_type = TUNER_PHILIPS_TDA8290,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
...@@ -183,6 +207,10 @@ struct saa7134_board saa7134_boards[] = { ...@@ -183,6 +207,10 @@ struct saa7134_board saa7134_boards[] = {
.name = "LifeView FlyTV Platinum FM", .name = "LifeView FlyTV Platinum FM",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_TDA8290, .tuner_type = TUNER_PHILIPS_TDA8290,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.gpiomask = 0x1E000, /* Set GP16 and unused 15,14,13 to Output */ .gpiomask = 0x1E000, /* Set GP16 and unused 15,14,13 to Output */
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -200,29 +228,38 @@ struct saa7134_board saa7134_boards[] = { ...@@ -200,29 +228,38 @@ struct saa7134_board saa7134_boards[] = {
*/ .name = name_comp1, /* Composite signal on S-Video input */ */ .name = name_comp1, /* Composite signal on S-Video input */
.vmux = 0, .vmux = 0,
.amux = LINE2, .amux = LINE2,
// .gpio = 0x4000, /* .gpio = 0x4000, */
},{ },{
.name = name_comp2, /* Composite input */ .name = name_comp2, /* Composite input */
.vmux = 3, .vmux = 3,
.amux = LINE2, .amux = LINE2,
// .gpio = 0x4000, /* .gpio = 0x4000, */
},{ },{
.name = name_svideo, /* S-Video signal on S-Video input */ .name = name_svideo, /* S-Video signal on S-Video input */
.vmux = 8, .vmux = 8,
.amux = LINE2, .amux = LINE2,
// .gpio = 0x4000, /* .gpio = 0x4000, */
}}, }},
.radio = { .radio = {
.name = name_radio, .name = name_radio,
.amux = TV, .amux = TV,
.gpio = 0x00000, /* GP16=0 selects FM radio antenna */ .gpio = 0x00000, /* GP16=0 selects FM radio antenna */
}, },
.mute = {
.name = name_mute,
.amux = TV,
.gpio = 0x10000,
},
}, },
[SAA7134_BOARD_EMPRESS] = { [SAA7134_BOARD_EMPRESS] = {
/* "Gert Vervoort" <gert.vervoort@philips.com> */ /* "Gert Vervoort" <gert.vervoort@philips.com> */
.name = "EMPRESS", .name = "EMPRESS",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_comp1, .name = name_comp1,
.vmux = 0, .vmux = 0,
...@@ -249,6 +286,10 @@ struct saa7134_board saa7134_boards[] = { ...@@ -249,6 +286,10 @@ struct saa7134_board saa7134_boards[] = {
.name = "SKNet Monster TV", .name = "SKNet Monster TV",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_NTSC_M, .tuner_type = TUNER_PHILIPS_NTSC_M,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
...@@ -272,6 +313,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -272,6 +313,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Tevion MD 9717", .name = "Tevion MD 9717",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
...@@ -306,6 +350,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -306,6 +350,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "KNC One TV-Station RDS / Typhoon TV Tuner RDS", .name = "KNC One TV-Station RDS / Typhoon TV Tuner RDS",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -341,6 +388,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -341,6 +388,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "KNC One TV-Station DVR", .name = "KNC One TV-Station DVR",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.gpiomask = 0x820000, .gpiomask = 0x820000,
.inputs = {{ .inputs = {{
...@@ -372,6 +422,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -372,6 +422,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Terratec Cinergy 400 TV", .name = "Terratec Cinergy 400 TV",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
...@@ -386,15 +439,18 @@ struct saa7134_board saa7134_boards[] = { ...@@ -386,15 +439,18 @@ struct saa7134_board saa7134_boards[] = {
.vmux = 8, .vmux = 8,
.amux = LINE1, .amux = LINE1,
},{ },{
.name = name_comp2, // CVideo over SVideo Connector .name = name_comp2, /* CVideo over SVideo Connector */
.vmux = 0, .vmux = 0,
.amux = LINE1, .amux = LINE1,
}} }}
}, },
[SAA7134_BOARD_MD5044] = { [SAA7134_BOARD_MD5044] = {
.name = "Medion 5044", .name = "Medion 5044",
.audio_clock = 0x00187de7, // was: 0x00200000, .audio_clock = 0x00187de7, /* was: 0x00200000, */
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -429,6 +485,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -429,6 +485,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Kworld/KuroutoShikou SAA7130-TVPCI", .name = "Kworld/KuroutoShikou SAA7130-TVPCI",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_NTSC_M, .tuner_type = TUNER_PHILIPS_NTSC_M,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_svideo, .name = name_svideo,
.vmux = 8, .vmux = 8,
...@@ -448,6 +507,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -448,6 +507,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Terratec Cinergy 600 TV", .name = "Terratec Cinergy 600 TV",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -463,7 +525,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -463,7 +525,7 @@ struct saa7134_board saa7134_boards[] = {
.vmux = 8, .vmux = 8,
.amux = LINE1, .amux = LINE1,
},{ },{
.name = name_comp2, // CVideo over SVideo Connector .name = name_comp2, /* CVideo over SVideo Connector */
.vmux = 0, .vmux = 0,
.amux = LINE1, .amux = LINE1,
}}, }},
...@@ -474,9 +536,11 @@ struct saa7134_board saa7134_boards[] = { ...@@ -474,9 +536,11 @@ struct saa7134_board saa7134_boards[] = {
}, },
[SAA7134_BOARD_MD7134] = { [SAA7134_BOARD_MD7134] = {
.name = "Medion 7134", .name = "Medion 7134",
//.audio_clock = 0x00200000,
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3, .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.mpeg = SAA7134_MPEG_DVB, .mpeg = SAA7134_MPEG_DVB,
.inputs = {{ .inputs = {{
...@@ -504,6 +568,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -504,6 +568,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Typhoon TV+Radio 90031", .name = "Typhoon TV+Radio 90031",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -528,6 +595,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -528,6 +595,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "ELSA EX-VISION 300TV", .name = "ELSA EX-VISION 300TV",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_HITACHI_NTSC, .tuner_type = TUNER_HITACHI_NTSC,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_svideo, .name = name_svideo,
.vmux = 8, .vmux = 8,
...@@ -547,6 +617,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -547,6 +617,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "ELSA EX-VISION 500TV", .name = "ELSA EX-VISION 500TV",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_HITACHI_NTSC, .tuner_type = TUNER_HITACHI_NTSC,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_svideo, .name = name_svideo,
.vmux = 7, .vmux = 7,
...@@ -567,6 +640,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -567,6 +640,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "ASUS TV-FM 7134", .name = "ASUS TV-FM 7134",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -587,10 +663,13 @@ struct saa7134_board saa7134_boards[] = { ...@@ -587,10 +663,13 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE1, .amux = LINE1,
}, },
}, },
[SAA7135_BOARD_ASUSTeK_TVFM7135] = { [SAA7134_BOARD_ASUSTeK_TVFM7135] = {
.name = "ASUS TV-FM 7135", .name = "ASUS TV-FM 7135",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_TDA8290, .tuner_type = TUNER_PHILIPS_TDA8290,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.gpiomask = 0x200000, .gpiomask = 0x200000,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -614,11 +693,19 @@ struct saa7134_board saa7134_boards[] = { ...@@ -614,11 +693,19 @@ struct saa7134_board saa7134_boards[] = {
.amux = TV, .amux = TV,
.gpio = 0x200000, .gpio = 0x200000,
}, },
.mute = {
.name = name_mute,
.gpio = 0x0000,
},
}, },
[SAA7134_BOARD_VA1000POWER] = { [SAA7134_BOARD_VA1000POWER] = {
.name = "AOPEN VA1000 POWER", .name = "AOPEN VA1000 POWER",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_NTSC, .tuner_type = TUNER_PHILIPS_NTSC,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_svideo, .name = name_svideo,
.vmux = 8, .vmux = 8,
...@@ -639,6 +726,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -639,6 +726,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "10MOONS PCI TV CAPTURE CARD", .name = "10MOONS PCI TV CAPTURE CARD",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_LG_PAL_NEW_TAPC, .tuner_type = TUNER_LG_PAL_NEW_TAPC,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.gpiomask = 0xe000, .gpiomask = 0xe000,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -678,6 +768,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -678,6 +768,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "BMK MPEX No Tuner", .name = "BMK MPEX No Tuner",
.audio_clock = 0x200000, .audio_clock = 0x200000,
.tuner_type = TUNER_ABSENT, .tuner_type = TUNER_ABSENT,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_comp1, .name = name_comp1,
.vmux = 4, .vmux = 4,
...@@ -706,6 +799,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -706,6 +799,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Compro VideoMate TV", .name = "Compro VideoMate TV",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_NTSC_M, .tuner_type = TUNER_PHILIPS_NTSC_M,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_svideo, .name = name_svideo,
.vmux = 8, .vmux = 8,
...@@ -726,6 +822,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -726,6 +822,9 @@ struct saa7134_board saa7134_boards[] = {
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_NTSC_M, .tuner_type = TUNER_PHILIPS_NTSC_M,
.gpiomask = 0x800c0000, .gpiomask = 0x800c0000,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_svideo, .name = name_svideo,
.vmux = 8, .vmux = 8,
...@@ -742,17 +841,22 @@ struct saa7134_board saa7134_boards[] = { ...@@ -742,17 +841,22 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE2, .amux = LINE2,
.gpio = 0x08c20012, .gpio = 0x08c20012,
.tv = 1, .tv = 1,
}}, }}, /* radio and probably mute is missing */
}, },
[SAA7134_BOARD_CRONOS_PLUS] = { [SAA7134_BOARD_CRONOS_PLUS] = {
/* gpio pins: /*
gpio pins:
0 .. 3 BASE_ID 0 .. 3 BASE_ID
4 .. 7 PROTECT_ID 4 .. 7 PROTECT_ID
8 .. 11 USER_OUT 8 .. 11 USER_OUT
12 .. 13 USER_IN 12 .. 13 USER_IN
14 .. 15 VIDIN_SEL */ 14 .. 15 VIDIN_SEL
*/
.name = "Matrox CronosPlus", .name = "Matrox CronosPlus",
.tuner_type = TUNER_ABSENT, .tuner_type = TUNER_ABSENT,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.gpiomask = 0xcf00, .gpiomask = 0xcf00,
.inputs = {{ .inputs = {{
.name = name_comp1, .name = name_comp1,
...@@ -780,6 +884,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -780,6 +884,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "AverMedia M156 / Medion 2819", .name = "AverMedia M156 / Medion 2819",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -809,6 +916,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -809,6 +916,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "BMK MPEX Tuner", .name = "BMK MPEX Tuner",
.audio_clock = 0x200000, .audio_clock = 0x200000,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_comp1, .name = name_comp1,
.vmux = 1, .vmux = 1,
...@@ -829,15 +939,19 @@ struct saa7134_board saa7134_boards[] = { ...@@ -829,15 +939,19 @@ struct saa7134_board saa7134_boards[] = {
[SAA7134_BOARD_ASUSTEK_TVFM7133] = { [SAA7134_BOARD_ASUSTEK_TVFM7133] = {
.name = "ASUS TV-FM 7133", .name = "ASUS TV-FM 7133",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
// probably wrong, the 7133 one is the NTSC version ... /* probably wrong, the 7133 one is the NTSC version ...
// .tuner_type = TUNER_PHILIPS_FM1236_MK3 * .tuner_type = TUNER_PHILIPS_FM1236_MK3 */
.tuner_type = TUNER_LG_NTSC_NEW_TAPC, .tuner_type = TUNER_LG_NTSC_NEW_TAPC,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
.amux = TV, .amux = TV,
.tv = 1, .tv = 1,
},{ },{
.name = name_comp1, .name = name_comp1,
.vmux = 4, .vmux = 4,
...@@ -856,6 +970,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -856,6 +970,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Pinnacle PCTV Stereo (saa7134)", .name = "Pinnacle PCTV Stereo (saa7134)",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_MT2032, .tuner_type = TUNER_MT2032,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER, .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -881,6 +998,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -881,6 +998,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Manli MuchTV M-TV002/Behold TV 403 FM", .name = "Manli MuchTV M-TV002/Behold TV 403 FM",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_svideo, .name = name_svideo,
.vmux = 8, .vmux = 8,
...@@ -905,6 +1025,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -905,6 +1025,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Manli MuchTV M-TV001/Behold TV 401", .name = "Manli MuchTV M-TV001/Behold TV 401",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_svideo, .name = name_svideo,
.vmux = 8, .vmux = 8,
...@@ -929,6 +1052,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -929,6 +1052,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Nagase Sangyo TransGear 3000TV", .name = "Nagase Sangyo TransGear 3000TV",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_NTSC_M, .tuner_type = TUNER_PHILIPS_NTSC_M,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
...@@ -946,8 +1072,11 @@ struct saa7134_board saa7134_boards[] = { ...@@ -946,8 +1072,11 @@ struct saa7134_board saa7134_boards[] = {
}, },
[SAA7134_BOARD_ECS_TVP3XP] = { [SAA7134_BOARD_ECS_TVP3XP] = {
.name = "Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM) ", .name = "Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM) ",
.audio_clock = 0x187de7, // xtal 32.1 MHz .audio_clock = 0x187de7, /* xtal 32.1 MHz */
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
...@@ -980,6 +1109,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -980,6 +1109,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM)", .name = "Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM)",
.audio_clock = 0x187de7, .audio_clock = 0x187de7,
.tuner_type = TUNER_PHILIPS_NTSC, .tuner_type = TUNER_PHILIPS_NTSC,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
...@@ -1013,6 +1145,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1013,6 +1145,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "AVACS SmartTV", .name = "AVACS SmartTV",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
...@@ -1047,6 +1182,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1047,6 +1182,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "AVerMedia DVD EZMaker", .name = "AVerMedia DVD EZMaker",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_ABSENT, .tuner_type = TUNER_ABSENT,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_comp1, .name = name_comp1,
.vmux = 3, .vmux = 3,
...@@ -1060,6 +1198,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1060,6 +1198,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Noval Prime TV 7133", .name = "Noval Prime TV 7133",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_ALPS_TSBH1_NTSC, .tuner_type = TUNER_ALPS_TSBH1_NTSC,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_comp1, .name = name_comp1,
.vmux = 3, .vmux = 3,
...@@ -1077,6 +1218,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1077,6 +1218,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "AverMedia AverTV Studio 305", .name = "AverMedia AverTV Studio 305",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FM1256_IH3, .tuner_type = TUNER_PHILIPS_FM1256_IH3,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -1105,10 +1249,13 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1105,10 +1249,13 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE1, .amux = LINE1,
}, },
}, },
[SAA7133_BOARD_UPMOST_PURPLE_TV] = { [SAA7134_BOARD_UPMOST_PURPLE_TV] = {
.name = "UPMOST PURPLE TV", .name = "UPMOST PURPLE TV",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FM1236_MK3, .tuner_type = TUNER_PHILIPS_FM1236_MK3,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -1126,6 +1273,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1126,6 +1273,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Items MuchTV Plus / IT-005", .name = "Items MuchTV Plus / IT-005",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 3, .vmux = 3,
...@@ -1149,6 +1299,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1149,6 +1299,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Terratec Cinergy 200 TV", .name = "Terratec Cinergy 200 TV",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
...@@ -1163,7 +1316,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1163,7 +1316,7 @@ struct saa7134_board saa7134_boards[] = {
.vmux = 8, .vmux = 8,
.amux = LINE1, .amux = LINE1,
},{ },{
.name = name_comp2, // CVideo over SVideo Connector .name = name_comp2, /* CVideo over SVideo Connector */
.vmux = 0, .vmux = 0,
.amux = LINE1, .amux = LINE1,
}}, }},
...@@ -1177,6 +1330,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1177,6 +1330,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Compro VideoMate TV PVR/FM", .name = "Compro VideoMate TV PVR/FM",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_NTSC_M, .tuner_type = TUNER_PHILIPS_NTSC_M,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.gpiomask = 0x808c0080, .gpiomask = 0x808c0080,
.inputs = {{ .inputs = {{
.name = name_svideo, .name = name_svideo,
...@@ -1211,6 +1367,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1211,6 +1367,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Sabrent SBT-TVFM (saa7130)", .name = "Sabrent SBT-TVFM (saa7130)",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_NTSC_M, .tuner_type = TUNER_PHILIPS_NTSC_M,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_comp1, .name = name_comp1,
.vmux = 1, .vmux = 1,
...@@ -1235,6 +1394,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1235,6 +1394,9 @@ struct saa7134_board saa7134_boards[] = {
.name = ":Zolid Xpert TV7134", .name = ":Zolid Xpert TV7134",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_NTSC, .tuner_type = TUNER_PHILIPS_NTSC,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_svideo, .name = name_svideo,
.vmux = 8, .vmux = 8,
...@@ -1255,6 +1417,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1255,6 +1417,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Empire PCI TV-Radio LE", .name = "Empire PCI TV-Radio LE",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.gpiomask = 0x4000, .gpiomask = 0x4000,
.inputs = {{ .inputs = {{
.name = name_tv_mono, .name = name_tv_mono,
...@@ -1292,6 +1457,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1292,6 +1457,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Avermedia AVerTV Studio 307", .name = "Avermedia AVerTV Studio 307",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FM1256_IH3, .tuner_type = TUNER_PHILIPS_FM1256_IH3,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.gpiomask = 0x03, .gpiomask = 0x03,
.inputs = {{ .inputs = {{
...@@ -1321,13 +1489,21 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1321,13 +1489,21 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE1, .amux = LINE1,
.gpio = 0x01, .gpio = 0x01,
}, },
.mute = {
.name = name_mute,
.amux = LINE1,
.gpio = 0x00,
},
}, },
[SAA7134_BOARD_AVERMEDIA_GO_007_FM] = { [SAA7134_BOARD_AVERMEDIA_GO_007_FM] = {
.name = "Avermedia AVerTV GO 007 FM", .name = "Avermedia AVerTV GO 007 FM",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_TDA8290, .tuner_type = TUNER_PHILIPS_TDA8290,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.gpiomask = 0x00300003, .gpiomask = 0x00300003,
// .gpiomask = 0x8c240003, /* .gpiomask = 0x8c240003, */
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
...@@ -1350,16 +1526,24 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1350,16 +1526,24 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE1, .amux = LINE1,
.gpio = 0x00300001, .gpio = 0x00300001,
}, },
.mute = {
.name = name_mute,
.amux = TV,
.gpio = 0x01,
},
}, },
[SAA7134_BOARD_AVERMEDIA_CARDBUS] = { [SAA7134_BOARD_AVERMEDIA_CARDBUS] = {
/* Jon Westgate <oryn@oryn.fsck.tv> */ /* Kees.Blom@cwi.nl */
.name = "AVerMedia Cardbus TV/Radio", .name = "AVerMedia Cardbus TV/Radio (E500)",
.audio_clock = 0x00200000, .audio_clock = 0x187de7,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_TDA8290,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
.amux = LINE2, .amux = TV,
.tv = 1, .tv = 1,
},{ },{
.name = name_comp1, .name = name_comp1,
...@@ -1368,7 +1552,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1368,7 +1552,7 @@ struct saa7134_board saa7134_boards[] = {
},{ },{
.name = name_svideo, .name = name_svideo,
.vmux = 8, .vmux = 8,
.amux = LINE2, .amux = LINE1,
}}, }},
.radio = { .radio = {
.name = name_radio, .name = name_radio,
...@@ -1379,6 +1563,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1379,6 +1563,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Terratec Cinergy 400 mobile", .name = "Terratec Cinergy 400 mobile",
.audio_clock = 0x187de7, .audio_clock = 0x187de7,
.tuner_type = TUNER_ALPS_TSBE5_PAL, .tuner_type = TUNER_ALPS_TSBE5_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -1404,6 +1591,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1404,6 +1591,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Terratec Cinergy 600 TV MK3", .name = "Terratec Cinergy 600 TV MK3",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -1419,7 +1609,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1419,7 +1609,7 @@ struct saa7134_board saa7134_boards[] = {
.vmux = 8, .vmux = 8,
.amux = LINE1, .amux = LINE1,
},{ },{
.name = name_comp2, // CVideo over SVideo Connector .name = name_comp2, /* CVideo over SVideo Connector */
.vmux = 0, .vmux = 0,
.amux = LINE1, .amux = LINE1,
}}, }},
...@@ -1433,10 +1623,13 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1433,10 +1623,13 @@ struct saa7134_board saa7134_boards[] = {
.name = "Compro VideoMate Gold+ Pal", .name = "Compro VideoMate Gold+ Pal",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.gpiomask = 0x1ce780, .gpiomask = 0x1ce780,
.inputs = {{ .inputs = {{
.name = name_svideo, .name = name_svideo,
.vmux = 0, // CVideo over SVideo Connector - ok? .vmux = 0, /* CVideo over SVideo Connector - ok? */
.amux = LINE1, .amux = LINE1,
.gpio = 0x008080, .gpio = 0x008080,
},{ },{
...@@ -1466,6 +1659,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1466,6 +1659,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Pinnacle PCTV 300i DVB-T + PAL", .name = "Pinnacle PCTV 300i DVB-T + PAL",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_MT2032, .tuner_type = TUNER_MT2032,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER, .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
.mpeg = SAA7134_MPEG_DVB, .mpeg = SAA7134_MPEG_DVB,
.inputs = {{ .inputs = {{
...@@ -1492,6 +1688,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1492,6 +1688,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "ProVideo PV952", .name = "ProVideo PV952",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = {{ .inputs = {{
.name = name_comp1, .name = name_comp1,
...@@ -1519,6 +1718,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1519,6 +1718,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "AverMedia AverTV/305", .name = "AverMedia AverTV/305",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FQ1216ME, .tuner_type = TUNER_PHILIPS_FQ1216ME,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -1545,32 +1747,49 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1545,32 +1747,49 @@ struct saa7134_board saa7134_boards[] = {
}, },
[SAA7134_BOARD_FLYDVBTDUO] = { [SAA7134_BOARD_FLYDVBTDUO] = {
/* LifeView FlyDVB-T DUO */ /* LifeView FlyDVB-T DUO */
/* "Nico Sabbi <nsabbi@tiscali.it> */ /* "Nico Sabbi <nsabbi@tiscali.it> Hartmut Hackmann hartmut.hackmann@t-online.de*/
.name = "LifeView FlyDVB-T DUO", .name = "LifeView FlyDVB-T DUO",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_TDA8290, .tuner_type = TUNER_PHILIPS_TDA8290,
// .gpiomask = 0xe000, .radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.mpeg = SAA7134_MPEG_DVB,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
.amux = TV, .amux = TV,
// .gpio = 0x0000,
.tv = 1, .tv = 1,
},{ },{
.name = name_comp1, /* Composite signal on S-Video input */ .name = name_comp1, /* Composite signal on S-Video input */
.vmux = 0, .vmux = 0,
.amux = LINE2, .amux = LINE2,
// .gpio = 0x4000,
},{ },{
.name = name_comp2, /* Composite input */ .name = name_comp2, /* Composite input */
.vmux = 3, .vmux = 3,
.amux = LINE2, .amux = LINE2,
// .gpio = 0x4000,
},{ },{
.name = name_svideo, /* S-Video signal on S-Video input */ .name = name_svideo, /* S-Video signal on S-Video input */
.vmux = 8, .vmux = 8,
.amux = LINE2, .amux = LINE2,
// .gpio = 0x4000, }},
},
[SAA7134_BOARD_PHILIPS_TOUGH] = {
.name = "Philips TOUGH DVB-T reference design",
.tuner_type = TUNER_ABSENT,
.audio_clock = 0x00187de7,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.mpeg = SAA7134_MPEG_DVB,
.inputs = {{
.name = name_comp1,
.vmux = 0,
.amux = LINE1,
},{
.name = name_svideo,
.vmux = 8,
.amux = LINE1,
}}, }},
}, },
[SAA7134_BOARD_AVERMEDIA_307] = { [SAA7134_BOARD_AVERMEDIA_307] = {
...@@ -1580,6 +1799,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1580,6 +1799,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "Avermedia AVerTV 307", .name = "Avermedia AVerTV 307",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FQ1216ME, .tuner_type = TUNER_PHILIPS_FQ1216ME,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -1604,6 +1826,9 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1604,6 +1826,9 @@ struct saa7134_board saa7134_boards[] = {
.name = "ADS Tech Instant TV (saa7135)", .name = "ADS Tech Instant TV (saa7135)",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_TDA8290, .tuner_type = TUNER_PHILIPS_TDA8290,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
...@@ -1623,6 +1848,130 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1623,6 +1848,130 @@ struct saa7134_board saa7134_boards[] = {
.name = "Kworld/Tevion V-Stream Xpert TV PVR7134", .name = "Kworld/Tevion V-Stream Xpert TV PVR7134",
.audio_clock = 0x00187de7, .audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_PAL_I, .tuner_type = TUNER_PHILIPS_PAL_I,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.gpiomask = 0x0700,
.inputs = {{
.name = name_tv,
.vmux = 1,
.amux = TV,
.tv = 1,
.gpio = 0x000,
},{
.name = name_comp1,
.vmux = 3,
.amux = LINE1,
.gpio = 0x200, /* gpio by DScaler */
},{
.name = name_svideo,
.vmux = 0,
.amux = LINE1,
.gpio = 0x200,
}},
.radio = {
.name = name_radio,
.amux = LINE1,
.gpio = 0x100,
},
.mute = {
.name = name_mute,
.amux = TV,
.gpio = 0x000,
},
},
[SAA7134_BOARD_THYPHOON_DVBT_DUO_CARDBUS] = {
.name = "Typhoon DVB-T Duo Digital/Analog Cardbus",
.audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_TDA8290,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.mpeg = SAA7134_MPEG_DVB,
/* .gpiomask = 0xe000, */
.inputs = {{
.name = name_tv,
.vmux = 1,
.amux = TV,
/* .gpio = 0x0000, */
.tv = 1,
},{
.name = name_comp1, /* Composite signal on S-Video input */
.vmux = 0,
.amux = LINE2,
/* .gpio = 0x4000, */
},{
.name = name_comp2, /* Composite input */
.vmux = 3,
.amux = LINE2,
/* .gpio = 0x4000, */
},{
.name = name_svideo, /* S-Video signal on S-Video input */
.vmux = 8,
.amux = LINE2,
/* .gpio = 0x4000, */
}},
.radio = {
.name = name_radio,
.amux = LINE2,
},
.mute = {
.name = name_mute,
.amux = LINE1,
},
},
[SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII] = {
.name = "Compro VideoMate TV Gold+II",
.audio_clock = 0x002187de7,
.tuner_type = TUNER_LG_PAL_NEW_TAPC,
.radio_type = TUNER_TEA5767,
.tuner_addr = 0x63,
.radio_addr = 0x60,
.gpiomask = 0x8c1880,
.inputs = {{
.name = name_svideo,
.vmux = 0,
.amux = LINE1,
.gpio = 0x800800,
},{
.name = name_comp1,
.vmux = 3,
.amux = LINE1,
.gpio = 0x801000,
},{
.name = name_tv,
.vmux = 1,
.amux = TV,
.tv = 1,
.gpio = 0x800000,
}},
.radio = {
.name = name_radio,
.amux = TV,
.gpio = 0x880000,
},
.mute = {
.name = name_mute,
.amux = LINE2,
.gpio = 0x840000,
},
},
[SAA7134_BOARD_KWORLD_XPERT] = {
/*
FIXME:
- Remote control doesn't initialize properly.
- Audio volume starts muted,
then gradually increases after channel change.
- Overlay scaling problems (application error?)
- Composite S-Video untested.
From: Konrad Rzepecki <hannibal@megapolis.pl>
*/
.name = "Kworld Xpert TV PVR7134",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_TENA_9533_DI,
.radio_type = TUNER_TEA5767,
.tuner_addr = 0x61,
.radio_addr = 0x60,
.gpiomask = 0x0700, .gpiomask = 0x0700,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
...@@ -1634,7 +1983,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1634,7 +1983,7 @@ struct saa7134_board saa7134_boards[] = {
.name = name_comp1, .name = name_comp1,
.vmux = 3, .vmux = 3,
.amux = LINE1, .amux = LINE1,
.gpio = 0x200, //gpio by DScaler .gpio = 0x200, /* gpio by DScaler */
},{ },{
.name = name_svideo, .name = name_svideo,
.vmux = 0, .vmux = 0,
...@@ -1646,8 +1995,14 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1646,8 +1995,14 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE1, .amux = LINE1,
.gpio = 0x100, .gpio = 0x100,
}, },
.mute = {
.name = name_mute,
.amux = TV,
.gpio = 0x000,
},
}, },
}; };
const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
...@@ -1712,7 +2067,7 @@ struct pci_device_id saa7134_pci_tbl[] = { ...@@ -1712,7 +2067,7 @@ struct pci_device_id saa7134_pci_tbl[] = {
},{ },{
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7134, .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
.subvendor = 0x4e42, //"Typhoon PCI Capture TV Card" Art.No. 50673 .subvendor = 0x4e42, /* "Typhoon PCI Capture TV Card" Art.No. 50673 */
.subdevice = 0x0138, .subdevice = 0x0138,
.driver_data = SAA7134_BOARD_FLYVIDEO3000, .driver_data = SAA7134_BOARD_FLYVIDEO3000,
},{ },{
...@@ -1723,7 +2078,7 @@ struct pci_device_id saa7134_pci_tbl[] = { ...@@ -1723,7 +2078,7 @@ struct pci_device_id saa7134_pci_tbl[] = {
.driver_data = SAA7134_BOARD_FLYVIDEO2000, .driver_data = SAA7134_BOARD_FLYVIDEO2000,
},{ },{
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7135, .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x5168, .subvendor = 0x5168,
.subdevice = 0x0212, /* minipci, LR212 */ .subdevice = 0x0212, /* minipci, LR212 */
.driver_data = SAA7134_BOARD_FLYTVPLATINUM_MINI, .driver_data = SAA7134_BOARD_FLYTVPLATINUM_MINI,
...@@ -1765,10 +2120,10 @@ struct pci_device_id saa7134_pci_tbl[] = { ...@@ -1765,10 +2120,10 @@ struct pci_device_id saa7134_pci_tbl[] = {
.driver_data = SAA7134_BOARD_ASUSTeK_TVFM7134, .driver_data = SAA7134_BOARD_ASUSTeK_TVFM7134,
},{ },{
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7135, .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = PCI_VENDOR_ID_ASUSTEK, .subvendor = PCI_VENDOR_ID_ASUSTEK,
.subdevice = 0x4845, .subdevice = 0x4845,
.driver_data = SAA7135_BOARD_ASUSTeK_TVFM7135, .driver_data = SAA7134_BOARD_ASUSTeK_TVFM7135,
},{ },{
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7134, .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
...@@ -1902,7 +2257,7 @@ struct pci_device_id saa7134_pci_tbl[] = { ...@@ -1902,7 +2257,7 @@ struct pci_device_id saa7134_pci_tbl[] = {
.device = PCI_DEVICE_ID_PHILIPS_SAA7133, .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x12ab, .subvendor = 0x12ab,
.subdevice = 0x0800, .subdevice = 0x0800,
.driver_data = SAA7133_BOARD_UPMOST_PURPLE_TV, .driver_data = SAA7134_BOARD_UPMOST_PURPLE_TV,
},{ },{
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7130, .device = PCI_DEVICE_ID_PHILIPS_SAA7130,
...@@ -1950,7 +2305,13 @@ struct pci_device_id saa7134_pci_tbl[] = { ...@@ -1950,7 +2305,13 @@ struct pci_device_id saa7134_pci_tbl[] = {
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133, .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x5168, .subvendor = 0x5168,
.subdevice = 0x0306, .subdevice = 0x0502, /* Cardbus version */
.driver_data = SAA7134_BOARD_FLYDVBTDUO,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x5168,
.subdevice = 0x0306, /* PCI version */
.driver_data = SAA7134_BOARD_FLYDVBTDUO, .driver_data = SAA7134_BOARD_FLYDVBTDUO,
},{ },{
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
...@@ -1961,18 +2322,31 @@ struct pci_device_id saa7134_pci_tbl[] = { ...@@ -1961,18 +2322,31 @@ struct pci_device_id saa7134_pci_tbl[] = {
},{ },{
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7135, .device = PCI_DEVICE_ID_PHILIPS_SAA7130,
.subvendor = PCI_VENDOR_ID_PHILIPS,
.subdevice = 0x2004,
.driver_data = SAA7134_BOARD_PHILIPS_TOUGH,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x1421, .subvendor = 0x1421,
.subdevice = 0x0350, /* PCI version */ .subdevice = 0x0350, /* PCI version */
.driver_data = SAA7134_BOARD_ADS_INSTANT_TV, .driver_data = SAA7134_BOARD_ADS_INSTANT_TV,
},{ },{
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7135, .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x1421, .subvendor = 0x1421,
.subdevice = 0x0370, /* cardbus version */ .subdevice = 0x0370, /* cardbus version */
.driver_data = SAA7134_BOARD_ADS_INSTANT_TV, .driver_data = SAA7134_BOARD_ADS_INSTANT_TV,
},{ /* Typhoon DVB-T Duo Digital/Analog Cardbus */
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x4e42,
.subdevice = 0x0502,
.driver_data = SAA7134_BOARD_THYPHOON_DVBT_DUO_CARDBUS,
},{ },{
/* --- boards without eeprom + subsystem ID --- */ /* --- boards without eeprom + subsystem ID --- */
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
...@@ -2021,46 +2395,9 @@ MODULE_DEVICE_TABLE(pci, saa7134_pci_tbl); ...@@ -2021,46 +2395,9 @@ MODULE_DEVICE_TABLE(pci, saa7134_pci_tbl);
/* ----------------------------------------------------------- */ /* ----------------------------------------------------------- */
/* flyvideo tweaks */ /* flyvideo tweaks */
#if 0
static struct {
char *model;
int tuner_type;
} fly_list[0x20] = {
/* default catch ... */
[ 0 ... 0x1f ] = {
.model = "UNKNOWN",
.tuner_type = TUNER_ABSENT,
},
/* ... the ones known so far */
[ 0x05 ] = {
.model = "PAL-BG",
.tuner_type = TUNER_LG_PAL_NEW_TAPC,
},
[ 0x10 ] = {
.model = "PAL-BG / PAL-DK",
.tuner_type = TUNER_PHILIPS_PAL,
},
[ 0x15 ] = {
.model = "NTSC",
.tuner_type = TUNER_ABSENT /* FIXME */,
},
};
#endif
static void board_flyvideo(struct saa7134_dev *dev) static void board_flyvideo(struct saa7134_dev *dev)
{ {
#if 0
/* non-working attempt to detect the correct tuner type ... */
u32 value;
int index;
value = dev->gpio_value;
index = (value & 0x1f00) >> 8;
printk(KERN_INFO "%s: flyvideo: gpio is 0x%x [model=%s,tuner=%d]\n",
dev->name, value, fly_list[index].model,
fly_list[index].tuner_type);
dev->tuner_type = fly_list[index].tuner_type;
#endif
printk("%s: there are different flyvideo cards with different tuners\n" printk("%s: there are different flyvideo cards with different tuners\n"
"%s: out there, you might have to use the tuner=<nr> insmod\n" "%s: out there, you might have to use the tuner=<nr> insmod\n"
"%s: option to override the default value.\n", "%s: option to override the default value.\n",
...@@ -2071,7 +2408,7 @@ static void board_flyvideo(struct saa7134_dev *dev) ...@@ -2071,7 +2408,7 @@ static void board_flyvideo(struct saa7134_dev *dev)
int saa7134_board_init1(struct saa7134_dev *dev) int saa7134_board_init1(struct saa7134_dev *dev)
{ {
// Always print gpio, often manufacturers encode tuner type and other info. /* Always print gpio, often manufacturers encode tuner type and other info. */
saa_writel(SAA7134_GPIO_GPMODE0 >> 2, 0); saa_writel(SAA7134_GPIO_GPMODE0 >> 2, 0);
dev->gpio_value = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2); dev->gpio_value = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2);
printk(KERN_INFO "%s: board init: gpio is %x\n", dev->name, dev->gpio_value); printk(KERN_INFO "%s: board init: gpio is %x\n", dev->name, dev->gpio_value);
...@@ -2090,13 +2427,15 @@ int saa7134_board_init1(struct saa7134_dev *dev) ...@@ -2090,13 +2427,15 @@ int saa7134_board_init1(struct saa7134_dev *dev)
case SAA7134_BOARD_ECS_TVP3XP_4CB5: case SAA7134_BOARD_ECS_TVP3XP_4CB5:
case SAA7134_BOARD_MD2819: case SAA7134_BOARD_MD2819:
case SAA7134_BOARD_KWORLD_VSTREAM_XPERT: case SAA7134_BOARD_KWORLD_VSTREAM_XPERT:
case SAA7134_BOARD_KWORLD_XPERT:
case SAA7134_BOARD_AVERMEDIA_STUDIO_305: case SAA7134_BOARD_AVERMEDIA_STUDIO_305:
case SAA7134_BOARD_AVERMEDIA_305: case SAA7134_BOARD_AVERMEDIA_305:
case SAA7134_BOARD_AVERMEDIA_STUDIO_307: case SAA7134_BOARD_AVERMEDIA_STUDIO_307:
case SAA7134_BOARD_AVERMEDIA_307: case SAA7134_BOARD_AVERMEDIA_307:
case SAA7134_BOARD_AVERMEDIA_GO_007_FM: case SAA7134_BOARD_AVERMEDIA_GO_007_FM:
// 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_TV_GOLD_PLUSII:
case SAA7134_BOARD_MANLI_MTV001: case SAA7134_BOARD_MANLI_MTV001:
case SAA7134_BOARD_MANLI_MTV002: case SAA7134_BOARD_MANLI_MTV002:
case SAA7134_BOARD_AVACSSMARTTV: case SAA7134_BOARD_AVACSSMARTTV:
...@@ -2114,11 +2453,19 @@ int saa7134_board_init1(struct saa7134_dev *dev) ...@@ -2114,11 +2453,19 @@ int saa7134_board_init1(struct saa7134_dev *dev)
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00040000, 0x00000000); saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00040000, 0x00000000);
msleep(1); msleep(1);
break; break;
case SAA7134_BOARD_FLYDVBTDUO:
case SAA7134_BOARD_THYPHOON_DVBT_DUO_CARDBUS:
/* turn the fan on Hac: static for the time being */
saa_writeb(SAA7134_GPIO_GPMODE3, 0x08);
saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x06);
break;
case SAA7134_BOARD_AVERMEDIA_CARDBUS:
/* power-up tuner chip */
saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0xffffffff, 0xffffffff);
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0xffffffff, 0xffffffff);
msleep(1);
break;
} }
if (dev->has_remote)
dev->irq2_mask |= (SAA7134_IRQ2_INTE_GPIO18 |
SAA7134_IRQ2_INTE_GPIO18A |
SAA7134_IRQ2_INTE_GPIO16 );
return 0; return 0;
} }
...@@ -2141,8 +2488,83 @@ int saa7134_board_init2(struct saa7134_dev *dev) ...@@ -2141,8 +2488,83 @@ int saa7134_board_init2(struct saa7134_dev *dev)
printk("%s: board type fixup: %s\n", dev->name, printk("%s: board type fixup: %s\n", dev->name,
saa7134_boards[dev->board].name); saa7134_boards[dev->board].name);
dev->tuner_type = saa7134_boards[dev->board].tuner_type; dev->tuner_type = saa7134_boards[dev->board].tuner_type;
if (TUNER_ABSENT != dev->tuner_type)
saa7134_i2c_call_clients(dev,TUNER_SET_TYPE,&dev->tuner_type); if (TUNER_ABSENT != dev->tuner_type) {
struct tuner_setup tun_setup;
tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;
tun_setup.type = dev->tuner_type;
tun_setup.addr = ADDR_UNSET;
saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR, &tun_setup);
}
break;
case SAA7134_BOARD_MD7134:
{
struct tuner_setup tun_setup;
u8 subaddr;
u8 data[3];
int ret, tuner_t;
struct i2c_msg msg[] = {{.addr=0x50, .flags=0, .buf=&subaddr, .len = 1},
{.addr=0x50, .flags=I2C_M_RD, .buf=data, .len = 3}};
subaddr= 0x14;
tuner_t = 0;
ret = i2c_transfer(&dev->i2c_adap, msg, 2);
if (ret != 2) {
printk(KERN_ERR "EEPROM read failure\n");
} else if ((data[0] != 0) && (data[0] != 0xff)) {
/* old config structure */
subaddr = data[0] + 2;
msg[1].len = 2;
i2c_transfer(&dev->i2c_adap, msg, 2);
tuner_t = (data[0] << 8) + data[1];
switch (tuner_t){
case 0x0103:
dev->tuner_type = TUNER_PHILIPS_PAL;
break;
case 0x010C:
dev->tuner_type = TUNER_PHILIPS_FM1216ME_MK3;
break;
default:
printk(KERN_ERR "%s Cant determine tuner type %x from EEPROM\n", dev->name, tuner_t);
}
} else if ((data[1] != 0) && (data[1] != 0xff)) {
/* new config structure */
subaddr = data[1] + 1;
msg[1].len = 1;
i2c_transfer(&dev->i2c_adap, msg, 2);
subaddr = data[0] + 1;
msg[1].len = 2;
i2c_transfer(&dev->i2c_adap, msg, 2);
tuner_t = (data[1] << 8) + data[0];
switch (tuner_t) {
case 0x0005:
dev->tuner_type = TUNER_PHILIPS_FM1216ME_MK3;
break;
case 0x001d:
dev->tuner_type = TUNER_PHILIPS_FMD1216ME_MK3;
printk(KERN_INFO "%s Board has DVB-T\n", dev->name);
break;
default:
printk(KERN_ERR "%s Cant determine tuner type %x from EEPROM\n", dev->name, tuner_t);
}
} else {
printk(KERN_ERR "%s unexpected config structure\n", dev->name);
}
printk(KERN_INFO "%s Tuner type is %d\n", dev->name, dev->tuner_type);
if (dev->tuner_type == TUNER_PHILIPS_FMD1216ME_MK3) {
dev->tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE | TDA9887_PORT2_ACTIVE;
saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG, &dev->tda9887_conf);
}
tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;
tun_setup.type = dev->tuner_type;
tun_setup.addr = ADDR_UNSET;
saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR,&tun_setup);
}
break; break;
} }
return 0; return 0;
......
/* /*
* $Id: saa7134-core.c,v 1.30 2005/05/22 19:23:39 nsh Exp $ * $Id: saa7134-core.c,v 1.39 2005/07/05 17:37:35 nsh Exp $
* *
* device driver for philips saa7134 based TV cards * device driver for philips saa7134 based TV cards
* driver core * driver core
...@@ -183,46 +183,6 @@ void saa7134_track_gpio(struct saa7134_dev *dev, char *msg) ...@@ -183,46 +183,6 @@ void saa7134_track_gpio(struct saa7134_dev *dev, char *msg)
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
#if 0
static char *dec1_bits[8] = {
"DCSTD0", "DCSCT1", "WIPA", "GLIMB",
"GLIMT", "SLTCA", "HLCK"
};
static char *dec2_bits[8] = {
"RDCAP", "COPRO", "COLSTR", "TYPE3",
NULL, "FIDT", "HLVLN", "INTL"
};
static char *scale1_bits[8] = {
"VID_A", "VBI_A", NULL, NULL, "VID_B", "VBI_B"
};
static char *scale2_bits[8] = {
"TRERR", "CFERR", "LDERR", "WASRST",
"FIDSCI", "FIDSCO", "D6^D5", "TASK"
};
static void dump_statusreg(struct saa7134_dev *dev, int reg,
char *regname, char **bits)
{
int value,i;
value = saa_readb(reg);
printk(KERN_DEBUG "%s: %s:", dev->name, regname);
for (i = 7; i >= 0; i--) {
if (NULL == bits[i])
continue;
printk(" %s=%d", bits[i], (value & (1 << i)) ? 1 : 0);
}
printk("\n");
}
static void dump_statusregs(struct saa7134_dev *dev)
{
dump_statusreg(dev,SAA7134_STATUS_VIDEO1,"dec1",dec1_bits);
dump_statusreg(dev,SAA7134_STATUS_VIDEO2,"dec2",dec2_bits);
dump_statusreg(dev,SAA7134_SCALER_STATUS0,"scale0",scale1_bits);
dump_statusreg(dev,SAA7134_SCALER_STATUS1,"scale1",scale2_bits);
}
#endif
/* ----------------------------------------------------------- */ /* ----------------------------------------------------------- */
/* delayed request_module */ /* delayed request_module */
...@@ -616,10 +576,6 @@ static irqreturn_t saa7134_irq(int irq, void *dev_id, struct pt_regs *regs) ...@@ -616,10 +576,6 @@ static irqreturn_t saa7134_irq(int irq, void *dev_id, struct pt_regs *regs)
if (irq_debug) if (irq_debug)
print_irqstatus(dev,loop,report,status); print_irqstatus(dev,loop,report,status);
#if 0
if (report & SAA7134_IRQ_REPORT_CONF_ERR)
dump_statusregs(dev);
#endif
if (report & SAA7134_IRQ_REPORT_RDCAP /* _INTL */) if (report & SAA7134_IRQ_REPORT_RDCAP /* _INTL */)
saa7134_irq_video_intl(dev); saa7134_irq_video_intl(dev);
...@@ -711,7 +667,6 @@ static int saa7134_hwinit1(struct saa7134_dev *dev) ...@@ -711,7 +667,6 @@ static int saa7134_hwinit1(struct saa7134_dev *dev)
SAA7134_MAIN_CTRL_EVFE1 | SAA7134_MAIN_CTRL_EVFE1 |
SAA7134_MAIN_CTRL_EVFE2 | SAA7134_MAIN_CTRL_EVFE2 |
SAA7134_MAIN_CTRL_ESFE | SAA7134_MAIN_CTRL_ESFE |
SAA7134_MAIN_CTRL_EBADC |
SAA7134_MAIN_CTRL_EBDAC); SAA7134_MAIN_CTRL_EBDAC);
/* enable peripheral devices */ /* enable peripheral devices */
...@@ -726,14 +681,28 @@ static int saa7134_hwinit1(struct saa7134_dev *dev) ...@@ -726,14 +681,28 @@ static int saa7134_hwinit1(struct saa7134_dev *dev)
/* late init (with i2c + irq) */ /* late init (with i2c + irq) */
static int saa7134_hwinit2(struct saa7134_dev *dev) static int saa7134_hwinit2(struct saa7134_dev *dev)
{ {
unsigned int irq2_mask;
dprintk("hwinit2\n"); dprintk("hwinit2\n");
saa7134_video_init2(dev); saa7134_video_init2(dev);
saa7134_tvaudio_init2(dev); saa7134_tvaudio_init2(dev);
/* enable IRQ's */ /* enable IRQ's */
irq2_mask =
SAA7134_IRQ2_INTE_DEC3 |
SAA7134_IRQ2_INTE_DEC2 |
SAA7134_IRQ2_INTE_DEC1 |
SAA7134_IRQ2_INTE_DEC0 |
SAA7134_IRQ2_INTE_PE |
SAA7134_IRQ2_INTE_AR;
if (dev->has_remote)
irq2_mask |= (SAA7134_IRQ2_INTE_GPIO18 |
SAA7134_IRQ2_INTE_GPIO18A |
SAA7134_IRQ2_INTE_GPIO16 );
saa_writel(SAA7134_IRQ1, 0); saa_writel(SAA7134_IRQ1, 0);
saa_writel(SAA7134_IRQ2, dev->irq2_mask); saa_writel(SAA7134_IRQ2, irq2_mask);
return 0; return 0;
} }
...@@ -954,13 +923,6 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, ...@@ -954,13 +923,6 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
} }
/* initialize hardware #1 */ /* initialize hardware #1 */
dev->irq2_mask =
SAA7134_IRQ2_INTE_DEC3 |
SAA7134_IRQ2_INTE_DEC2 |
SAA7134_IRQ2_INTE_DEC1 |
SAA7134_IRQ2_INTE_DEC0 |
SAA7134_IRQ2_INTE_PE |
SAA7134_IRQ2_INTE_AR;
saa7134_board_init1(dev); saa7134_board_init1(dev);
saa7134_hwinit1(dev); saa7134_hwinit1(dev);
...@@ -990,6 +952,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, ...@@ -990,6 +952,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
request_module("saa6752hs"); request_module("saa6752hs");
request_module_depend("saa7134-empress",&need_empress); request_module_depend("saa7134-empress",&need_empress);
} }
if (card_is_dvb(dev)) if (card_is_dvb(dev))
request_module_depend("saa7134-dvb",&need_dvb); request_module_depend("saa7134-dvb",&need_dvb);
...@@ -1144,9 +1107,6 @@ static void __devexit saa7134_finidev(struct pci_dev *pci_dev) ...@@ -1144,9 +1107,6 @@ static void __devexit saa7134_finidev(struct pci_dev *pci_dev)
release_mem_region(pci_resource_start(pci_dev,0), release_mem_region(pci_resource_start(pci_dev,0),
pci_resource_len(pci_dev,0)); pci_resource_len(pci_dev,0));
#if 0 /* causes some trouble when reinserting the driver ... */
pci_disable_device(pci_dev);
#endif
pci_set_drvdata(pci_dev, NULL); pci_set_drvdata(pci_dev, NULL);
/* free memory */ /* free memory */
......
/* /*
* $Id: saa7134-i2c.c,v 1.11 2005/06/12 01:36:14 mchehab Exp $ * $Id: saa7134-i2c.c,v 1.19 2005/07/07 01:49:30 mkrufky Exp $
* *
* device driver for philips saa7134 based TV cards * device driver for philips saa7134 based TV cards
* i2c interface support * i2c interface support
...@@ -197,10 +197,6 @@ static inline int i2c_send_byte(struct saa7134_dev *dev, ...@@ -197,10 +197,6 @@ static inline int i2c_send_byte(struct saa7134_dev *dev,
enum i2c_status status; enum i2c_status status;
__u32 dword; __u32 dword;
#if 0
i2c_set_attr(dev,attr);
saa_writeb(SAA7134_I2C_DATA, data);
#else
/* have to write both attr + data in one 32bit word */ /* have to write both attr + data in one 32bit word */
dword = saa_readl(SAA7134_I2C_ATTR_STATUS >> 2); dword = saa_readl(SAA7134_I2C_ATTR_STATUS >> 2);
dword &= 0x0f; dword &= 0x0f;
...@@ -210,7 +206,6 @@ static inline int i2c_send_byte(struct saa7134_dev *dev, ...@@ -210,7 +206,6 @@ static inline int i2c_send_byte(struct saa7134_dev *dev,
// dword |= 0x40 << 16; /* 400 kHz */ // dword |= 0x40 << 16; /* 400 kHz */
dword |= 0xf0 << 24; dword |= 0xf0 << 24;
saa_writel(SAA7134_I2C_ATTR_STATUS >> 2, dword); saa_writel(SAA7134_I2C_ATTR_STATUS >> 2, dword);
#endif
d2printk(KERN_DEBUG "%s: i2c data => 0x%x\n",dev->name,data); d2printk(KERN_DEBUG "%s: i2c data => 0x%x\n",dev->name,data);
if (!i2c_is_busy_wait(dev)) if (!i2c_is_busy_wait(dev))
...@@ -334,9 +329,41 @@ static int attach_inform(struct i2c_client *client) ...@@ -334,9 +329,41 @@ static int attach_inform(struct i2c_client *client)
struct saa7134_dev *dev = client->adapter->algo_data; struct saa7134_dev *dev = client->adapter->algo_data;
int tuner = dev->tuner_type; int tuner = dev->tuner_type;
int conf = dev->tda9887_conf; int conf = dev->tda9887_conf;
struct tuner_setup tun_setup;
d1printk( "%s i2c attach [addr=0x%x,client=%s]\n",
client->driver->name,client->addr,i2c_clientname(client));
if (!client->driver->command)
return 0;
if (saa7134_boards[dev->board].radio_type != UNSET) {
tun_setup.type = saa7134_boards[dev->board].radio_type;
tun_setup.addr = saa7134_boards[dev->board].radio_addr;
if ((tun_setup.addr == ADDR_UNSET) || (tun_setup.addr == client->addr)) {
tun_setup.mode_mask = T_RADIO;
client->driver->command(client, TUNER_SET_TYPE_ADDR, &tun_setup);
}
}
if (tuner != UNSET) {
tun_setup.type = tuner;
tun_setup.addr = saa7134_boards[dev->board].tuner_addr;
if ((tun_setup.addr == ADDR_UNSET)||(tun_setup.addr == client->addr)) {
tun_setup.mode_mask = T_ANALOG_TV;
client->driver->command(client,TUNER_SET_TYPE_ADDR, &tun_setup);
}
}
client->driver->command(client, TDA9887_SET_CONFIG, &conf);
saa7134_i2c_call_clients(dev,TUNER_SET_TYPE,&tuner);
saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG,&conf);
return 0; return 0;
} }
......
/* /*
* $Id: saa7134-input.c,v 1.19 2005/06/07 18:02:26 nsh Exp $ * $Id: saa7134-input.c,v 1.21 2005/06/22 23:37:34 nsh Exp $
* *
* handle saa7134 IR remotes via linux kernel input layer. * handle saa7134 IR remotes via linux kernel input layer.
* *
...@@ -68,10 +68,8 @@ static IR_KEYTAB_TYPE flyvideo_codes[IR_KEYTAB_SIZE] = { ...@@ -68,10 +68,8 @@ static IR_KEYTAB_TYPE flyvideo_codes[IR_KEYTAB_SIZE] = {
[ 6 ] = KEY_AGAIN, // Recal [ 6 ] = KEY_AGAIN, // Recal
[ 16 ] = KEY_KPENTER, // Enter [ 16 ] = KEY_KPENTER, // Enter
#if 1 /* FIXME */
[ 26 ] = KEY_F22, // Stereo [ 26 ] = KEY_F22, // Stereo
[ 24 ] = KEY_EDIT, // AV Source [ 24 ] = KEY_EDIT, // AV Source
#endif
}; };
static IR_KEYTAB_TYPE cinergy_codes[IR_KEYTAB_SIZE] = { static IR_KEYTAB_TYPE cinergy_codes[IR_KEYTAB_SIZE] = {
...@@ -206,11 +204,11 @@ static IR_KEYTAB_TYPE avacssmart_codes[IR_KEYTAB_SIZE] = { ...@@ -206,11 +204,11 @@ static IR_KEYTAB_TYPE avacssmart_codes[IR_KEYTAB_SIZE] = {
[ 14 ] = KEY_MENU, // function [ 14 ] = KEY_MENU, // function
[ 19 ] = KEY_AGAIN, // recall [ 19 ] = KEY_AGAIN, // recall
[ 29 ] = KEY_RESTART, // reset [ 29 ] = KEY_RESTART, // reset
[ 26 ] = KEY_SHUFFLE, // snapshot/shuffle
// FIXME // FIXME
[ 13 ] = KEY_F21, // mts [ 13 ] = KEY_F21, // mts
[ 15 ] = KEY_F22, // min [ 15 ] = KEY_F22, // min
[ 26 ] = KEY_F23, // freeze
}; };
/* Alex Hermann <gaaf@gmx.net> */ /* Alex Hermann <gaaf@gmx.net> */
...@@ -494,6 +492,7 @@ int saa7134_input_init1(struct saa7134_dev *dev) ...@@ -494,6 +492,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
mask_keyup = 0x000002; mask_keyup = 0x000002;
polling = 50; // ms polling = 50; // ms
break; break;
case SAA7134_BOARD_KWORLD_XPERT:
case SAA7134_BOARD_AVACSSMARTTV: case SAA7134_BOARD_AVACSSMARTTV:
ir_codes = avacssmart_codes; ir_codes = avacssmart_codes;
mask_keycode = 0x00001F; mask_keycode = 0x00001F;
...@@ -524,6 +523,7 @@ int saa7134_input_init1(struct saa7134_dev *dev) ...@@ -524,6 +523,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
polling = 50; // ms polling = 50; // ms
break; break;
case SAA7134_BOARD_VIDEOMATE_TV_PVR: case SAA7134_BOARD_VIDEOMATE_TV_PVR:
case SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII:
ir_codes = videomate_tv_pvr_codes; ir_codes = videomate_tv_pvr_codes;
mask_keycode = 0x00003F; mask_keycode = 0x00003F;
mask_keyup = 0x400000; mask_keyup = 0x400000;
......
/* /*
* $Id: saa7134-oss.c,v 1.14 2005/05/18 22:45:16 hhackmann Exp $ * $Id: saa7134-oss.c,v 1.17 2005/06/28 23:41:47 mkrufky Exp $
* *
* device driver for philips saa7134 based TV cards * device driver for philips saa7134 based TV cards
* oss dsp interface * oss dsp interface
...@@ -556,21 +556,28 @@ mixer_recsrc_7134(struct saa7134_dev *dev) ...@@ -556,21 +556,28 @@ mixer_recsrc_7134(struct saa7134_dev *dev)
static int static int
mixer_recsrc_7133(struct saa7134_dev *dev) mixer_recsrc_7133(struct saa7134_dev *dev)
{ {
u32 value = 0xbbbbbb; u32 anabar, xbarin;
xbarin = 0x03; // adc
anabar = 0;
switch (dev->oss.input) { switch (dev->oss.input) {
case TV: case TV:
value = 0xbbbb10; /* MAIN */ xbarin = 0; // Demodulator
anabar = 2; // DACs
break; break;
case LINE1: case LINE1:
value = 0xbbbb32; /* AUX1 */ anabar = 0; // aux1, aux1
break; break;
case LINE2: case LINE2:
case LINE2_LEFT: case LINE2_LEFT:
value = 0xbbbb54; /* AUX2 */ anabar = 9; // aux2, aux2
break; break;
} }
saa_dsp_writel(dev, 0x46c >> 2, value); /* output xbar always main channel */
saa_dsp_writel(dev, 0x46c >> 2, 0xbbbb10);
saa_dsp_writel(dev, 0x464 >> 2, xbarin);
saa_writel(0x594 >> 2, anabar);
return 0; return 0;
} }
......
/* /*
* $Id: saa7134-ts.c,v 1.14 2005/02/03 10:24:33 kraxel Exp $ * $Id: saa7134-ts.c,v 1.15 2005/06/14 22:48:18 hhackmann Exp $
* *
* device driver for philips saa7134 based TV cards * device driver for philips saa7134 based TV cards
* video4linux video interface * video4linux video interface
...@@ -221,10 +221,10 @@ void saa7134_irq_ts_done(struct saa7134_dev *dev, unsigned long status) ...@@ -221,10 +221,10 @@ void saa7134_irq_ts_done(struct saa7134_dev *dev, unsigned long status)
if (dev->ts_q.curr) { if (dev->ts_q.curr) {
field = dev->ts_q.curr->vb.field; field = dev->ts_q.curr->vb.field;
if (field == V4L2_FIELD_TOP) { if (field == V4L2_FIELD_TOP) {
if ((status & 0x100000) != 0x000000) if ((status & 0x100000) != 0x100000)
goto done; goto done;
} else { } else {
if ((status & 0x100000) != 0x100000) if ((status & 0x100000) != 0x000000)
goto done; goto done;
} }
saa7134_buffer_finish(dev,&dev->ts_q,STATE_DONE); saa7134_buffer_finish(dev,&dev->ts_q,STATE_DONE);
......
/* /*
* $Id: saa7134-tvaudio.c,v 1.25 2005/06/07 19:00:38 nsh Exp $ * $Id: saa7134-tvaudio.c,v 1.30 2005/06/28 23:41:47 mkrufky Exp $
* *
* device driver for philips saa7134 based TV cards * device driver for philips saa7134 based TV cards
* tv audio decoder (fm stereo, nicam, ...) * tv audio decoder (fm stereo, nicam, ...)
...@@ -219,12 +219,15 @@ static void mute_input_7134(struct saa7134_dev *dev) ...@@ -219,12 +219,15 @@ static void mute_input_7134(struct saa7134_dev *dev)
in = dev->input; in = dev->input;
mute = (dev->ctl_mute || mute = (dev->ctl_mute ||
(dev->automute && (&card(dev).radio) != in)); (dev->automute && (&card(dev).radio) != in));
if (PCI_DEVICE_ID_PHILIPS_SAA7130 == dev->pci->device && if (card(dev).mute.name) {
card(dev).mute.name) { /*
/* 7130 - we'll mute using some unconnected audio input */ * 7130 - we'll mute using some unconnected audio input
* 7134 - we'll probably should switch external mux with gpio
*/
if (mute) if (mute)
in = &card(dev).mute; in = &card(dev).mute;
} }
if (dev->hw_mute == mute && if (dev->hw_mute == mute &&
dev->hw_input == in) { dev->hw_input == in) {
dprintk("mute/input: nothing to do [mute=%d,input=%s]\n", dprintk("mute/input: nothing to do [mute=%d,input=%s]\n",
...@@ -260,6 +263,7 @@ static void mute_input_7134(struct saa7134_dev *dev) ...@@ -260,6 +263,7 @@ static void mute_input_7134(struct saa7134_dev *dev)
/* switch gpio-connected external audio mux */ /* switch gpio-connected external audio mux */
if (0 == card(dev).gpiomask) if (0 == card(dev).gpiomask)
return; return;
mask = card(dev).gpiomask; mask = card(dev).gpiomask;
saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, mask, mask); saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, mask, mask);
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, mask, in->gpio); saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, mask, in->gpio);
...@@ -339,13 +343,8 @@ static int tvaudio_sleep(struct saa7134_dev *dev, int timeout) ...@@ -339,13 +343,8 @@ static int tvaudio_sleep(struct saa7134_dev *dev, int timeout)
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
schedule(); schedule();
} else { } else {
#if 0
/* hmm, that one doesn't return on wakeup ... */
msleep_interruptible(timeout);
#else
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(msecs_to_jiffies(timeout)); schedule_timeout(msecs_to_jiffies(timeout));
#endif
} }
} }
remove_wait_queue(&dev->thread.wq, &wait); remove_wait_queue(&dev->thread.wq, &wait);
...@@ -400,27 +399,10 @@ static int tvaudio_checkcarrier(struct saa7134_dev *dev, struct mainscan *scan) ...@@ -400,27 +399,10 @@ static int tvaudio_checkcarrier(struct saa7134_dev *dev, struct mainscan *scan)
return value; return value;
} }
#if 0
static void sifdebug_dump_regs(struct saa7134_dev *dev)
{
print_regb(AUDIO_STATUS);
print_regb(IDENT_SIF);
print_regb(LEVEL_READOUT1);
print_regb(LEVEL_READOUT2);
print_regb(DCXO_IDENT_CTRL);
print_regb(DEMODULATOR);
print_regb(AGC_GAIN_SELECT);
print_regb(MONITOR_SELECT);
print_regb(FM_DEEMPHASIS);
print_regb(FM_DEMATRIX);
print_regb(SIF_SAMPLE_FREQ);
print_regb(ANALOG_IO_SELECT);
}
#endif
static int tvaudio_getstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *audio) static int tvaudio_getstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *audio)
{ {
__u32 idp,nicam; __u32 idp, nicam, nicam_status;
int retval = -1; int retval = -1;
switch (audio->mode) { switch (audio->mode) {
...@@ -442,18 +424,24 @@ static int tvaudio_getstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *au ...@@ -442,18 +424,24 @@ static int tvaudio_getstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *au
break; break;
case TVAUDIO_NICAM_FM: case TVAUDIO_NICAM_FM:
case TVAUDIO_NICAM_AM: case TVAUDIO_NICAM_AM:
nicam = saa_readb(SAA7134_NICAM_STATUS); nicam = saa_readb(SAA7134_AUDIO_STATUS);
dprintk("getstereo: nicam=0x%x\n",nicam); dprintk("getstereo: nicam=0x%x\n",nicam);
switch (nicam & 0x0b) { if (nicam & 0x1) {
case 0x08: nicam_status = saa_readb(SAA7134_NICAM_STATUS);
retval = V4L2_TUNER_SUB_MONO; dprintk("getstereo: nicam_status=0x%x\n", nicam_status);
break;
case 0x09: switch (nicam_status & 0x03) {
case 0x01:
retval = V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2; retval = V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2;
break; break;
case 0x0a: case 0x02:
retval = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO; retval = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO;
break; break;
default:
retval = V4L2_TUNER_SUB_MONO;
}
} else {
/* No nicam detected */
} }
break; break;
} }
...@@ -489,15 +477,15 @@ static int tvaudio_setstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *au ...@@ -489,15 +477,15 @@ static int tvaudio_setstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *au
break; break;
case TVAUDIO_FM_K_STEREO: case TVAUDIO_FM_K_STEREO:
case TVAUDIO_FM_BG_STEREO: case TVAUDIO_FM_BG_STEREO:
case TVAUDIO_NICAM_AM:
case TVAUDIO_NICAM_FM:
dprintk("setstereo [fm] => %s\n", dprintk("setstereo [fm] => %s\n",
name[ mode % ARRAY_SIZE(name) ]); name[ mode % ARRAY_SIZE(name) ]);
reg = fm[ mode % ARRAY_SIZE(fm) ]; reg = fm[ mode % ARRAY_SIZE(fm) ];
saa_writeb(SAA7134_FM_DEMATRIX, reg); saa_writeb(SAA7134_FM_DEMATRIX, reg);
break; break;
case TVAUDIO_FM_SAT_STEREO: case TVAUDIO_FM_SAT_STEREO:
case TVAUDIO_NICAM_AM: /* Not implemented */
case TVAUDIO_NICAM_FM:
/* FIXME */
break; break;
} }
return 0; return 0;
...@@ -703,24 +691,6 @@ static inline int saa_dsp_wait_bit(struct saa7134_dev *dev, int bit) ...@@ -703,24 +691,6 @@ static inline int saa_dsp_wait_bit(struct saa7134_dev *dev, int bit)
return 0; return 0;
} }
#if 0
static int saa_dsp_readl(struct saa7134_dev *dev, int reg, u32 *value)
{
int err;
d2printk("dsp read reg 0x%x\n", reg<<2);
saa_readl(reg);
err = saa_dsp_wait_bit(dev,SAA7135_DSP_RWSTATE_RDB);
if (err < 0)
return err;
*value = saa_readl(reg);
d2printk("dsp read => 0x%06x\n", *value & 0xffffff);
err = saa_dsp_wait_bit(dev,SAA7135_DSP_RWSTATE_IDA);
if (err < 0)
return err;
return 0;
}
#endif
int saa_dsp_writel(struct saa7134_dev *dev, int reg, u32 value) int saa_dsp_writel(struct saa7134_dev *dev, int reg, u32 value)
{ {
...@@ -753,31 +723,50 @@ static int getstereo_7133(struct saa7134_dev *dev) ...@@ -753,31 +723,50 @@ static int getstereo_7133(struct saa7134_dev *dev)
static int mute_input_7133(struct saa7134_dev *dev) static int mute_input_7133(struct saa7134_dev *dev)
{ {
u32 reg = 0; u32 reg = 0;
u32 xbarin, xbarout;
int mask; int mask;
struct saa7134_input *in;
/* Hac 0506 route OSS sound simultanously */
xbarin = 0x03;
switch (dev->input->amux) { switch (dev->input->amux) {
case TV: case TV:
reg = 0x02; reg = 0x02;
xbarin = 0;
break; break;
case LINE1: case LINE1:
reg = 0x00; reg = 0x00;
break; break;
case LINE2: case LINE2:
case LINE2_LEFT: case LINE2_LEFT:
reg = 0x01; reg = 0x09;
break; break;
} }
if (dev->ctl_mute) saa_dsp_writel(dev, 0x464 >> 2, xbarin);
if (dev->ctl_mute) {
reg = 0x07; reg = 0x07;
xbarout = 0xbbbbbb;
} else
xbarout = 0xbbbb10;
saa_dsp_writel(dev, 0x46c >> 2, xbarout);
saa_writel(0x594 >> 2, reg); saa_writel(0x594 >> 2, reg);
/* switch gpio-connected external audio mux */ /* switch gpio-connected external audio mux */
if (0 != card(dev).gpiomask) { if (0 != card(dev).gpiomask) {
mask = card(dev).gpiomask; mask = card(dev).gpiomask;
if (card(dev).mute.name && dev->ctl_mute)
in = &card(dev).mute;
else
in = dev->input;
saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, mask, mask); saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, mask, mask);
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, mask, dev->input->gpio); saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, mask, in->gpio);
saa7134_track_gpio(dev,dev->input->name); saa7134_track_gpio(dev,in->name);
} }
return 0; return 0;
} }
......
...@@ -130,13 +130,7 @@ static int buffer_prepare(struct videobuf_queue *q, ...@@ -130,13 +130,7 @@ static int buffer_prepare(struct videobuf_queue *q,
lines = norm->vbi_v_stop_0 - norm->vbi_v_start_0 +1; lines = norm->vbi_v_stop_0 - norm->vbi_v_start_0 +1;
if (lines > VBI_LINE_COUNT) if (lines > VBI_LINE_COUNT)
lines = VBI_LINE_COUNT; lines = VBI_LINE_COUNT;
#if 1
llength = VBI_LINE_LENGTH; llength = VBI_LINE_LENGTH;
#else
llength = (norm->h_stop - norm->h_start +1) * 2;
if (llength > VBI_LINE_LENGTH)
llength = VBI_LINE_LENGTH;
#endif
size = lines * llength * 2; size = lines * llength * 2;
if (0 != buf->vb.baddr && buf->vb.bsize < size) if (0 != buf->vb.baddr && buf->vb.bsize < size)
return -EINVAL; return -EINVAL;
...@@ -178,13 +172,7 @@ buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned int *size) ...@@ -178,13 +172,7 @@ buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned int *size)
int llength,lines; int llength,lines;
lines = dev->tvnorm->vbi_v_stop_0 - dev->tvnorm->vbi_v_start_0 +1; lines = dev->tvnorm->vbi_v_stop_0 - dev->tvnorm->vbi_v_start_0 +1;
#if 1
llength = VBI_LINE_LENGTH;
#else
llength = (norm->h_stop - norm->h_start +1) * 2;
if (llength > VBI_LINE_LENGTH)
llength = VBI_LINE_LENGTH; llength = VBI_LINE_LENGTH;
#endif
*size = lines * llength * 2; *size = lines * llength * 2;
if (0 == *count) if (0 == *count)
*count = vbibufs; *count = vbibufs;
......
/* /*
* $Id: saa7134-video.c,v 1.30 2005/06/07 19:00:38 nsh Exp $ * $Id: saa7134-video.c,v 1.36 2005/06/28 23:41:47 mkrufky Exp $
* *
* device driver for philips saa7134 based TV cards * device driver for philips saa7134 based TV cards
* video4linux video interface * video4linux video interface
...@@ -1204,7 +1204,6 @@ static int video_open(struct inode *inode, struct file *file) ...@@ -1204,7 +1204,6 @@ static int video_open(struct inode *inode, struct file *file)
struct list_head *list; struct list_head *list;
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
int radio = 0; int radio = 0;
list_for_each(list,&saa7134_devlist) { list_for_each(list,&saa7134_devlist) {
h = list_entry(list, struct saa7134_dev, devlist); h = list_entry(list, struct saa7134_dev, devlist);
if (h->video_dev && (h->video_dev->minor == minor)) if (h->video_dev && (h->video_dev->minor == minor))
...@@ -1256,7 +1255,7 @@ static int video_open(struct inode *inode, struct file *file) ...@@ -1256,7 +1255,7 @@ static int video_open(struct inode *inode, struct file *file)
if (fh->radio) { if (fh->radio) {
/* switch to radio mode */ /* switch to radio mode */
saa7134_tvaudio_setinput(dev,&card(dev).radio); saa7134_tvaudio_setinput(dev,&card(dev).radio);
saa7134_i2c_call_clients(dev,AUDC_SET_RADIO,NULL); saa7134_i2c_call_clients(dev,AUDC_SET_RADIO, NULL);
} else { } else {
/* switch to video/vbi mode */ /* switch to video/vbi mode */
video_mux(dev,dev->ctl_input); video_mux(dev,dev->ctl_input);
...@@ -1363,6 +1362,36 @@ static int video_release(struct inode *inode, struct file *file) ...@@ -1363,6 +1362,36 @@ static int video_release(struct inode *inode, struct file *file)
res_free(dev,fh,RESOURCE_VBI); res_free(dev,fh,RESOURCE_VBI);
} }
/* ts-capture will not work in planar mode, so turn it off Hac: 04.05*/
saa_andorb(SAA7134_OFMT_VIDEO_A, 0x1f, 0);
saa_andorb(SAA7134_OFMT_VIDEO_B, 0x1f, 0);
saa_andorb(SAA7134_OFMT_DATA_A, 0x1f, 0);
saa_andorb(SAA7134_OFMT_DATA_B, 0x1f, 0);
if (dev->tuner_type == TUNER_PHILIPS_TDA8290) {
u8 data[2];
int ret;
struct i2c_msg msg = {.addr=I2C_ADDR_TDA8290, .flags=0, .buf=data, .len = 2};
data[0] = 0x21;
data[1] = 0xc0;
ret = i2c_transfer(&dev->i2c_adap, &msg, 1);
if (ret != 1)
printk(KERN_ERR "TDA8290 access failure\n");
msg.addr = I2C_ADDR_TDA8275;
data[0] = 0x30;
data[1] = 0xd0;
ret = i2c_transfer(&dev->i2c_adap, &msg, 1);
if (ret != 1)
printk(KERN_ERR "TDA8275 access failure\n");
msg.addr = I2C_ADDR_TDA8290;
data[0] = 0x21;
data[1] = 0x80;
i2c_transfer(&dev->i2c_adap, &msg, 1);
data[0] = 0x00;
data[1] = 0x02;
i2c_transfer(&dev->i2c_adap, &msg, 1);
}
/* free stuff */ /* free stuff */
videobuf_mmap_free(&fh->cap); videobuf_mmap_free(&fh->cap);
videobuf_mmap_free(&fh->vbi); videobuf_mmap_free(&fh->vbi);
...@@ -1399,13 +1428,6 @@ static void saa7134_vbi_fmt(struct saa7134_dev *dev, struct v4l2_format *f) ...@@ -1399,13 +1428,6 @@ static void saa7134_vbi_fmt(struct saa7134_dev *dev, struct v4l2_format *f)
f->fmt.vbi.count[1] = f->fmt.vbi.count[0]; f->fmt.vbi.count[1] = f->fmt.vbi.count[0];
f->fmt.vbi.flags = 0; /* VBI_UNSYNC VBI_INTERLACED */ f->fmt.vbi.flags = 0; /* VBI_UNSYNC VBI_INTERLACED */
#if 0
if (V4L2_STD_PAL == norm->id) {
/* FIXME */
f->fmt.vbi.start[0] += 3;
f->fmt.vbi.start[1] += 3*2;
}
#endif
} }
static int saa7134_g_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh, static int saa7134_g_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
...@@ -2120,8 +2142,6 @@ static int radio_do_ioctl(struct inode *inode, struct file *file, ...@@ -2120,8 +2142,6 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
memset(t,0,sizeof(*t)); memset(t,0,sizeof(*t));
strcpy(t->name, "Radio"); strcpy(t->name, "Radio");
t->rangelow = (int)(65*16);
t->rangehigh = (int)(108*16);
saa7134_i2c_call_clients(dev, VIDIOC_G_TUNER, t); saa7134_i2c_call_clients(dev, VIDIOC_G_TUNER, t);
......
/* /*
* $Id: saa7134.h,v 1.41 2005/06/07 18:02:26 nsh Exp $ * $Id: saa7134.h,v 1.48 2005/07/01 08:22:24 nsh Exp $
* *
* v4l2 device driver for philips saa7134 based TV cards * v4l2 device driver for philips saa7134 based TV cards
* *
...@@ -46,8 +46,6 @@ ...@@ -46,8 +46,6 @@
#endif #endif
#define UNSET (-1U) #define UNSET (-1U)
/* 2.4 / 2.5 driver compatibility stuff */
/* ----------------------------------------------------------- */ /* ----------------------------------------------------------- */
/* enums */ /* enums */
...@@ -159,7 +157,7 @@ struct saa7134_format { ...@@ -159,7 +157,7 @@ struct saa7134_format {
#define SAA7134_BOARD_AVERMEDIA_DVD_EZMAKER 33 #define SAA7134_BOARD_AVERMEDIA_DVD_EZMAKER 33
#define SAA7134_BOARD_NOVAC_PRIMETV7133 34 #define SAA7134_BOARD_NOVAC_PRIMETV7133 34
#define SAA7134_BOARD_AVERMEDIA_STUDIO_305 35 #define SAA7134_BOARD_AVERMEDIA_STUDIO_305 35
#define SAA7133_BOARD_UPMOST_PURPLE_TV 36 #define SAA7134_BOARD_UPMOST_PURPLE_TV 36
#define SAA7134_BOARD_ITEMS_MTV005 37 #define SAA7134_BOARD_ITEMS_MTV005 37
#define SAA7134_BOARD_CINERGY200 38 #define SAA7134_BOARD_CINERGY200 38
#define SAA7134_BOARD_FLYTVPLATINUM_MINI 39 #define SAA7134_BOARD_FLYTVPLATINUM_MINI 39
...@@ -176,13 +174,17 @@ struct saa7134_format { ...@@ -176,13 +174,17 @@ struct saa7134_format {
#define SAA7134_BOARD_PINNACLE_300I_DVBT_PAL 50 #define SAA7134_BOARD_PINNACLE_300I_DVBT_PAL 50
#define SAA7134_BOARD_PROVIDEO_PV952 51 #define SAA7134_BOARD_PROVIDEO_PV952 51
#define SAA7134_BOARD_AVERMEDIA_305 52 #define SAA7134_BOARD_AVERMEDIA_305 52
#define SAA7135_BOARD_ASUSTeK_TVFM7135 53 #define SAA7134_BOARD_ASUSTeK_TVFM7135 53
#define SAA7134_BOARD_FLYTVPLATINUM_FM 54 #define SAA7134_BOARD_FLYTVPLATINUM_FM 54
#define SAA7134_BOARD_FLYDVBTDUO 55 #define SAA7134_BOARD_FLYDVBTDUO 55
#define SAA7134_BOARD_AVERMEDIA_307 56 #define SAA7134_BOARD_AVERMEDIA_307 56
#define SAA7134_BOARD_AVERMEDIA_GO_007_FM 57 #define SAA7134_BOARD_AVERMEDIA_GO_007_FM 57
#define SAA7134_BOARD_ADS_INSTANT_TV 58 #define SAA7134_BOARD_ADS_INSTANT_TV 58
#define SAA7134_BOARD_KWORLD_VSTREAM_XPERT 59 #define SAA7134_BOARD_KWORLD_VSTREAM_XPERT 59
#define SAA7134_BOARD_THYPHOON_DVBT_DUO_CARDBUS 60
#define SAA7134_BOARD_PHILIPS_TOUGH 61
#define SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII 62
#define SAA7134_BOARD_KWORLD_XPERT 63
#define SAA7134_MAXBOARDS 8 #define SAA7134_MAXBOARDS 8
#define SAA7134_INPUT_MAX 8 #define SAA7134_INPUT_MAX 8
...@@ -213,6 +215,10 @@ struct saa7134_board { ...@@ -213,6 +215,10 @@ struct saa7134_board {
/* i2c chip info */ /* i2c chip info */
unsigned int tuner_type; unsigned int tuner_type;
unsigned int radio_type;
unsigned char tuner_addr;
unsigned char radio_addr;
unsigned int tda9887_conf; unsigned int tda9887_conf;
/* peripheral I/O */ /* peripheral I/O */
...@@ -403,9 +409,12 @@ struct saa7134_dev { ...@@ -403,9 +409,12 @@ struct saa7134_dev {
/* config info */ /* config info */
unsigned int board; unsigned int board;
unsigned int tuner_type; unsigned int tuner_type;
unsigned int radio_type;
unsigned char tuner_addr;
unsigned char radio_addr;
unsigned int tda9887_conf; unsigned int tda9887_conf;
unsigned int gpio_value; unsigned int gpio_value;
unsigned int irq2_mask;
/* i2c i/o */ /* i2c i/o */
struct i2c_adapter i2c_adap; struct i2c_adapter i2c_adap;
......
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