Patch Avermedia A169

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

Please find attached 2 patches, which enable the dual tuner
functionality of the Avermedia A169.

Before I forget: all credits for these patches go to Rickard Osser.

I'm running these patches without problems for more then 4 months.
Although you have to keep 2 things in mind when running these patches.
I think that's why Rickard hasn't yet sent these patches to the
mailing-list, but I don't want his work to get lost.

First: you have to unload and load the tuner module to get both cards working:
modprobe -r tuner ; modprobe tuner

dmesg before modprobe:
saa7134[0]: i2c scan: found device @ 0x86  [tda9887]
saa7134[0]: i2c scan: found device @ 0xa0  [eeprom]
saa7134[0]: i2c scan: found device @ 0xc0  [tuner (analog)]
saa7134[0]: i2c scan: found device @ 0xc2  [???]
tuner 1-0060: All bytes are equal. It is not a TEA5767
tuner 1-0060: chip found @ 0xc0 (saa7134[0])
tuner 1-0060: type set to 66 (LG TALN series)
tuner 1-0061: chip found @ 0xc2 (saa7134[0])
saa7134[1]: i2c scan: found device @ 0xa0  [eeprom]
saa7134[1]: i2c scan: found device @ 0xc0  [tuner (analog)]
tuner 2-0060: TEA5767 detected.
tuner 2-0060: chip found @ 0xc0 (saa7134[1])
tuner 2-0060: type set to 62 (Philips TEA5767HN FM Radio)

dmesg after modprobe:
tuner 1-0043: chip found @ 0x86 (saa7134[0])
tda9887 1-0043: tda988[5/6/7] found @ 0x43 (tuner)
tuner 1-0060: All bytes are equal. It is not a TEA5767
tuner 1-0060: chip found @ 0xc0 (saa7134[0])
tuner 1-0060: type set to 66 (LG TALN series)
tuner 1-0061: chip found @ 0xc2 (saa7134[0])
tuner 2-0043: chip found @ 0x86 (saa7134[1])
tda9887 2-0043: tda988[5/6/7] found @ 0x43 (tuner)
tuner 2-0060: Returned more than 5 bytes. It is not a TEA5767
tuner 2-0060: chip found @ 0xc0 (saa7134[1])
tuner 2-0060: type set to 66 (LG TALN series)
tuner 2-0061: chip found @ 0xc2 (saa7134[1])

It has something to do with the i2c-scan; but I haven't found what.


Second: I have to run my system with the irqpoll option

I have no idea what is causing this error. If I run my system with the
irqpoll option, everything works great.

tuner 2-0061: chip found @ 0xc2 (saa7134[1])
irq 74: nobody cared (try booting with the "irqpoll" option)

Call Trace:
<IRQ> [<ffffffff802a4bde>] __report_bad_irq+0x30/0x7d
[<ffffffff802a4e18>] note_interrupt+0x1ed/0x22e
[<ffffffff802a4325>] __do_IRQ+0xc7/0x105
[<ffffffff80210381>] __do_softirq+0x5e/0xd5
[<ffffffff80263fdf>] do_IRQ+0x65/0x73
[<ffffffff80252de0>] mwait_idle+0x0/0x4a
[<ffffffff80258989>] ret_from_intr+0x0/0xa
<EOI> [<ffffffff80252e16>] mwait_idle+0x36/0x4a
[<ffffffff80245415>] cpu_idle+0x95/0xb8
[<ffffffff80538799>] start_kernel+0x216/0x21b
[<ffffffff80538288>] _sinittext+0x288/0x28c

handlers:
[<ffffffff882101d0>] (saa7134_irq+0x0/0x284 [saa7134])
[<ffffffff882b39d6>] (saa7134_alsa_irq+0x0/0x2b0 [saa7134_alsa])
Disabling IRQ #74
# cat /proc/interrupts
          CPU0       CPU1
 0:      41586          0    IO-APIC-edge  timer
 8:          0          0    IO-APIC-edge  rtc
 9:          0          0   IO-APIC-level  acpi
14:         38          0    IO-APIC-edge  ide0
58:        143          0   IO-APIC-level  uhci_hcd:usb1, ehci_hcd:usb5
66:        605          0   IO-APIC-level  eth0
74:     100000          0   IO-APIC-level  saa7134[0], saa7134[0]
169:       7178          0   IO-APIC-level  uhci_hcd:usb4, HDA Intel,
radeon@pci:0000:01:00.0
177:        261          0   IO-APIC-level  ohci1394
185:          0          0   IO-APIC-level  uhci_hcd:usb3, saa7134[1],
saa7134[1]
193:       4583          0   IO-APIC-level  libata, uhci_hcd:usb2
NMI:         64         43
LOC:      41544      41522
ERR:          0
MIS:          0


Now it's up to you guys to decide whether to include these patches or
not. I hope they get included.

Thanks,

Wouter
# HG changeset patch
# User root@xxxxxxxxxxxxxxxxxxxx
# Node ID d506f555aa5926c804eb9ceb814e2ab19ffe869f
# Parent  0bcf77433dc08f0e4ffcc6af8bd0e23f16d6ecc5

AVerMedia A169 cleanup patch
Corrected subdevice ID

From: Rickard Osser <ricky@xxxxxxxx>


Cleanup of AVerMedia A169 B and B1 settings. All ports enabled based on future changes in the TEA5767 detection code.
Corrected subdevice ID to correctly correspond with information from AVerMedia.


Signed-off-by: Rickard Osser <ricky@xxxxxxxx>

diff -r 0bcf77433dc0 -r d506f555aa59 linux/Documentation/video4linux/CARDLIST.saa7134
--- a/linux/Documentation/video4linux/CARDLIST.saa7134	Thu Jun 29 21:30:51 2006 +0200
+++ b/linux/Documentation/video4linux/CARDLIST.saa7134	Fri Jun 30 00:36:16 2006 +0200
@@ -89,8 +89,8 @@
  88 -> Tevion/KWorld DVB-T 220RF                [17de:7201]
  89 -> ELSA EX-VISION 700TV                     [1048:226c]
  90 -> Kworld ATSC110                           [17de:7350]
- 91 -> AVerMedia A169 B                         [1461:7360]
- 92 -> AVerMedia A169 B1                        [1461:6360]
+ 91 -> AVerMedia A169 B                         [1461:6360]
+ 92 -> AVerMedia A169 B1                        [1461:7360]
  93 -> Medion 7134 Bridge #2                    [16be:0005]
  94 -> LifeView FlyDVB-T Hybrid Cardbus         [5168:3306,5168:3502]
  95 -> LifeView FlyVIDEO3000 (NTSC)             [5169:0138]
diff -r 0bcf77433dc0 -r d506f555aa59 linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c	Thu Jun 29 21:30:51 2006 +0200
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c	Fri Jun 30 00:36:16 2006 +0200
@@ -2760,8 +2760,6 @@ struct saa7134_board saa7134_boards[] = 
 	[SAA7134_BOARD_AVERMEDIA_A169_B] = {
 		/* AVerMedia A169  */
 		/* Rickard Osser <ricky@xxxxxxxx>  */
-		/* This card has two saa7134 chips on it,
-		   but only one of them is currently working. */
 		.name		= "AVerMedia A169 B",
 		.audio_clock    = 0x02187de7,
 		.tuner_type	= TUNER_LG_TALN,
@@ -2769,33 +2767,36 @@ struct saa7134_board saa7134_boards[] = 
 		.tuner_addr	= ADDR_UNSET,
 		.radio_addr	= ADDR_UNSET,
 		.tda9887_conf   = TDA9887_PRESENT,
-		.gpiomask       = 0x0a60000,
-#if 0
+		.gpiomask       = 0x86a60000,
 		.inputs         = {{
 			.name = name_tv,
 			.vmux = 4,
 			.amux = TV,
 			.tv   = 1,
-			.gpio = 0x00a68300,
-		},{
-			.name = name_comp1,
-			.vmux = 3,
-			.amux = LINE1,
-		},{
-			.name = name_comp2,  /*  Composite SVIDEO (B/W if signal is carried with SVIDEO) */
-			.vmux = 1,
-			.amux = LINE1,
-		},{
-			.name = name_svideo,
-			.vmux = 9,           /*    9 is correct as S-VIDEO according to a169.inf! */
-			.amux = LINE1,
-		}},
-		.radio = {
-			.name = name_radio,
-			.amux = LINE2,
-			.gpio = 0x00a68300,
-		},
-#endif
+		},{
+			.name = name_comp1,
+			.vmux = 1,
+			.amux = LINE1,
+			.gpio = 0x02a68000,
+		},{
+			.name = name_comp2,
+			.vmux = 1,
+			.amux = LINE2,
+		},{
+			.name = "Svideo1",
+			.vmux = 9,
+			.amux = LINE1,
+			.gpio = 0x00a68000,
+		},{
+			.name = "Svideo2",
+			.vmux = 6,
+			.amux = LINE2,
+		}},
+		.radio = {
+			.name = name_radio,
+			.amux = LINE2,
+			.gpio = 0x00a68000,
+		},
 	},
 	[SAA7134_BOARD_AVERMEDIA_A169_B1] = {
 		/* AVerMedia A169 */
@@ -2807,35 +2808,20 @@ struct saa7134_board saa7134_boards[] = 
 		.tuner_addr	= ADDR_UNSET,
 		.radio_addr	= ADDR_UNSET,
 		.tda9887_conf   = TDA9887_PRESENT,
-		.gpiomask       = 0xca60000,
 		.inputs         = {{
 			.name = name_tv,
 			.vmux = 4,
 			.amux = TV,
 			.tv   = 1,
-			.gpio = 0x04a61000,
-#if 0
-		},{
-			.name = name_comp1,
-			.vmux = 3,
-			.amux = LINE1,
-#endif
-		},{
-			.name = name_comp2,  /*  Composite SVIDEO (B/W if signal is carried with SVIDEO) */
-			.vmux = 1,
-			.amux = LINE2,
-		},{
-			.name = name_svideo,
-			.vmux = 9,           /* 9 is correct as S-VIDEO1 according to a169.inf! */
-			.amux = LINE1,
-		}},
-#if 0
-		.radio = {
-			.name = name_radio,
-			.amux = LINE2,
-			.gpio = 0x0ca61000,
-		},
-#endif
+		},{
+			.name = name_comp1,
+			.vmux = 1,
+			.amux = LINE1,
+		},{
+			.name = name_svideo,
+			.vmux = 9,
+			.amux = LINE1,
+		}},
 	},
 	[SAA7134_BOARD_MD7134_BRIDGE_2] = {
 		/* This card has two saa7134 chips on it,
@@ -3447,13 +3433,13 @@ struct pci_device_id saa7134_pci_tbl[] =
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
 		.subvendor    = 0x1461,
-		.subdevice    = 0x7360,
+		.subdevice    = 0x6360,
 		.driver_data  = SAA7134_BOARD_AVERMEDIA_A169_B,
 	},{
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
 		.subvendor    = 0x1461,
-		.subdevice    = 0x6360,
+		.subdevice    = 0x7360,
 		.driver_data  = SAA7134_BOARD_AVERMEDIA_A169_B1,
 	},{
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
@@ -3680,7 +3666,6 @@ int saa7134_board_init1(struct saa7134_d
 	case SAA7134_BOARD_UPMOST_PURPLE_TV:
 		dev->has_remote = SAA7134_REMOTE_I2C;
 		break;
-	case SAA7134_BOARD_AVERMEDIA_A169_B:
 	case SAA7134_BOARD_MD7134_BRIDGE_2:
 		printk("%s: %s: dual saa713x broadcast decoders\n"
 		       "%s: Sorry, none of the inputs to this chip are supported yet.\n"
# HG changeset patch
# User root@xxxxxxxxxxxxxxxxxxxx
# Node ID ad83caaa4bfd7d110dc3893985590f7b734e1c6e
# Parent  d506f555aa5926c804eb9ceb814e2ab19ffe869f

Added gpiomask for B1

From: Rickard Osser <ricky@xxxxxxxx>


Added gpiomask for AVerMedia A169 B1

Signed-off-by: Rickard Osser <ricky@xxxxxxxx>

diff -r d506f555aa59 -r ad83caaa4bfd linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c	Fri Jun 30 00:36:16 2006 +0200
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c	Fri Jun 30 08:09:57 2006 +0200
@@ -2808,6 +2808,7 @@ struct saa7134_board saa7134_boards[] = 
 		.tuner_addr	= ADDR_UNSET,
 		.radio_addr	= ADDR_UNSET,
 		.tda9887_conf   = TDA9887_PRESENT,
+		.gpiomask       = 0xca60000,
 		.inputs         = {{
 			.name = name_tv,
 			.vmux = 4,
_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux