From nobody@FreeBSD.org  Sat Oct 30 20:17:56 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id AF9B716A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 30 Oct 2004 20:17:56 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8660E43D53
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 30 Oct 2004 20:17:56 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i9UKHufn058135
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 30 Oct 2004 20:17:56 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i9UKHuEh058134;
	Sat, 30 Oct 2004 20:17:56 GMT
	(envelope-from nobody)
Message-Id: <200410302017.i9UKHuEh058134@www.freebsd.org>
Date: Sat, 30 Oct 2004 20:17:56 GMT
From: Florian Le Goff <madflo@beertech.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] [sys/dev/bktr] correct warning for Pinnacle PCTV Rave card
X-Send-Pr-Version: www-2.3

>Number:         73324
>Category:       kern
>Synopsis:       [PATCH] [sys/dev/bktr] correct warning for Pinnacle PCTV Rave card
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 30 20:20:09 GMT 2004
>Closed-Date:    Thu Feb 10 09:16:23 GMT 2005
>Last-Modified:  Thu Feb 10 09:16:23 GMT 2005
>Originator:     Florian Le Goff
>Release:        -current
>Organization:
epitech
>Environment:
FreeBSD ble.bleland.poxx.net 6.0-CURRENT FreeBSD 6.0-CURRENT #6: Sat Oct 30 11:57:48 CEST 2004     root@ble.bleland.poxx.net:/usr/src/sys/i386/compile/BLE  i386
>Description:
On -current, the bktr driver issues a "card vendor" warning while loading Pinnacle PCTV Rave Tuner TV Card.

bktr0: <BrookTree 878> mem 0xcfffe000-0xcfffefff irq 17 at device 9.0 on pci1
bktr0: [GIANT-LOCKED]
bktr0: Warning - card vendor 0x11bd (model 0x0012) unknown.
bktr0: Pinnacle/Miro TV, <no> tuner.

>How-To-Repeat:
      
>Fix:
Apply the following patch.

working dir : src/sys/dev/bktr

----- patch begin here -----
--- bktr_card.c~        Sun Aug  8 03:23:39 2004
+++ bktr_card.c Sat Oct 30 20:26:29 2004
@@ -568,6 +568,7 @@
 #define PCI_VENDOR_FLYVIDEO    0x1851
 #define PCI_VENDOR_FLYVIDEO_2  0x1852
 #define PCI_VENDOR_PINNACLE_ALT        0xBD11
+#define PCI_VENDOR_PINNACLE_ALT_2      0x11BD
 #define PCI_VENDOR_IODATA      0x10fc
 
 #define MODEL_IODATA_GV_BCTV3_PCI      0x4020
@@ -699,7 +700,8 @@
                     goto checkTuner;
                 }
 
-               if (subsystem_vendor_id == PCI_VENDOR_PINNACLE_ALT) {
+               if ((subsystem_vendor_id == PCI_VENDOR_PINNACLE_ALT)
+                || (subsystem_vendor_id == PCI_VENDOR_PINNACLE_ALT_2)) {
                     bktr->card = cards[ (card = CARD_MIRO) ];
                    bktr->card.eepromAddr = eeprom_i2c_address;
                    bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE)
----- patch end here -----

but, well, after a quick search on the Internet, the vendor ID really seems to be 11BD and not BD11 for Pinnacle cards.

The following patch resolve this :
----- patch begin here -----
--- bktr_card.c.old     Sun Aug  8 03:23:39 2004
+++ bktr_card.c Sat Oct 30 22:10:37 2004
@@ -567,7 +567,7 @@
 #define PCI_VENDOR_LEADTEK_ALT_3       0x107d
 #define PCI_VENDOR_FLYVIDEO    0x1851
 #define PCI_VENDOR_FLYVIDEO_2  0x1852
-#define PCI_VENDOR_PINNACLE_ALT        0xBD11
+#define PCI_VENDOR_PINNACLE_ALT        0x11BD
 #define PCI_VENDOR_IODATA      0x10fc
 
 #define MODEL_IODATA_GV_BCTV3_PCI      0x4020
----- patch end here -----

kernel rebuild, device reloaded give :

wbktr0: <BrookTree 878> mem 0xcfffe000-0xcfffefff irq 17 at device 9.0 on pci1
bktr0: [GIANT-LOCKED]
bktr0: Pinnacle/Miro TV, <no> tuner

Thanks,
Florian

>Release-Note:
>Audit-Trail:

From: Florian Le Goff <madflo@poxx.net>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: kern/73324: [PATCH] [sys/dev/bktr] correct warning for Pinnacle
 PCTV Rave card
Date: Sun, 31 Oct 2004 11:18:21 +0100

 Hi,
 
   And the /BD11/11BD switch does even better, the integrated TV-Tuner on 
 the card is now recognized :
 
 bktr0: <BrookTree 878> mem 0xcfffe000-0xcfffefff irq 17 at device 9.0 on 
 pci1
 bktr0: [GIANT-LOCKED]
 bktr0: Pinnacle/Miro TV, Philips SECAM tuner.
 
   In bktr_card.c, the code is matching 0x11* for Philips tuners, so, 
 it's not really surprising.
 
   Thanks,
 
 -- 
 Florian Le Goff
 +- madflo@beertech.org

From: Arne "Wrner" <arne_woerner@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc: madflo@beertech.org
Subject: Re: kern/73324: [PATCH] [sys/dev/bktr] correct warning for Pinnacle PCTV Rave card
Date: Tue, 9 Nov 2004 17:24:08 -0800 (PST)

 Are we sure, that the patch from kern/73324 makes the MT2032 tuner of the
 Pinnacle PCTV Rave card useable? I think, just turning off the warning or
 detecting a tuner is not enough... Or are there different PCTV Rave models (my
 PCTV Rave says after the more complicated patch: bktr1: <BrookTree 878> mem
 0xdfcfc000-0xdfcfcfff irq 10 at device 9.0 on pci0, bktr1: tuner @ 0xc0, bktr1:
 MT2032: Companycode=4d54 Part=04 Revision=04, bktr1: Pinnacle PCTV Rave, MT2032
 tuner)?
 
 I use a much more complicated patch (see kern/73669
 (http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/73669))...
 
 Maybe both change requests (kern/73324 and kern/73669) should be processed
 together...
 
 -Arne
 
 
 
 		
 __________________________________ 
 Do you Yahoo!? 
 Check out the new Yahoo! Front Page. 
 www.yahoo.com 
  
 

From: Florian Le Goff <madflo@poxx.net>
To: =?ISO-8859-1?Q?=22Arne_=5C=22W=F6rner=5C=22=22?= <arne_woerner@yahoo.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/73324: [PATCH] [sys/dev/bktr] correct warning for Pinnacle
 PCTV Rave card
Date: Wed, 10 Nov 2004 09:03:15 +0100

 Hi Arne,
 
 > Are we sure, that the patch from kern/73324 makes the MT2032 tuner of the
 > Pinnacle PCTV Rave card useable? I think, just turning off the warning or
 > detecting a tuner is not enough... Or are there different PCTV Rave models
 
 Could you read the stick on your Pinnacle retail box (if you still have 
 this one) ? Mine says :
 
    PCTVrave PAL - BG/SECAM Retail F/I/E
                      ^^^^^        ^ ^ ^
                       [1]        [2]
 
 I'm note sure, and I will try your patch in the next days, but my card 
 seems to be a localized version, supporting SECAM [3] (a video standard 
 common to France and former USSR), and distributed only in France, Italy 
 and Spain.
 
 So, it would not be surprizing to have two differents tuners (at least) 
 on the market (the Phillips Tuner seems to support SECAM, in the bktr 
 driver code source) and I think that "turning off the warning" is 
 enough, because the code is already wrote :)
 
 Applying my patch (kern/73324) is easy, because I suggest that the 
 original Pinnacle vendor ID is false (0x11BD and not 0xBD11, as you 
 already had found). So, just turn it to 11BD from the current CVS tree, 
 and watches the results at boot, I would be interesting.
 
   [3] : http://en.wikipedia.org/wiki/SECAM
 
 Thanks,
 
 -- 
 Florian Le Goff
 - madflo@beertech.org

From: Arne "Wrner" <arne_woerner@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc: Florian Le Goff <madflo@poxx.net>
Subject: Re: kern/73324: [PATCH] [sys/dev/bktr] correct warning for Pinnacle PCTV Rave card
Date: Wed, 10 Nov 2004 05:31:58 -0800 (PST)

 > Could you read the stick on your Pinnacle retail box (if you still have 
 > this one) ? Mine says :
 > 
 >    PCTVrave PAL - BG/SECAM Retail F/I/E
 >                      ^^^^^        ^ ^ ^
 >                       [1]        [2]
 >
 Unfortunately I do have/find the box. But I am very sure, that I have PAL
 support (it is a card sold for the germ. market). But maybe the tuner is able
 to handle SECAM, too; I cannot say...
 
 > I'm note sure, and I will try your patch in the next days, but my card 
 > seems to be a localized version, supporting SECAM [3] (a video standard 
 > common to France and former USSR), and distributed only in France, Italy 
 > and Spain.
 >
 So your patches make the bktr driver functionable?
 
 > So, it would not be surprizing to have two differents tuners (at least) 
 > on the market (the Phillips Tuner seems to support SECAM, in the bktr 
 > driver code source) and I think that "turning off the warning" is 
 > enough, because the code is already wrote :)
 >
 Oh. Ok... Maybe you really have a Philips tuner. Especially if you can use the
 card now, it looks like a Brooktree compatible tuner.
 
 > Applying my patch (kern/73324) is easy, because I suggest that the 
 > original Pinnacle vendor ID is false (0x11BD and not 0xBD11, as you 
 > already had found). So, just turn it to 11BD from the current CVS tree, 
 > and watches the results at boot, I would be interesting.
 >
 I think Pinnacle uses two different vendor IDs (maybe they where afraid, that
 they will have too many models for just one vendor ID... ;-)) ).
 
 I tried the original files (from webCVS) and applied just your patches. This
 did not work in my system, so our tuners seem to be different...
   Nov 10 13:27:33 neo kernel: bktr1: <BrookTree 878> mem 0xdfcfc000-0xdfcfcfff
 irq 10 at device 9.0 on pci0
   Nov 10 13:27:33 neo kernel: bktr1: Pinnacle/Miro TV, <no> tuner.
 
 Thank you.
 
 -Arne
 
 
 
 
 		
 __________________________________ 
 Do you Yahoo!? 
 Check out the new Yahoo! Front Page. 
 www.yahoo.com 
  
 

From: Florian Le Goff <madflo@poxx.net>
To: freebsd-gnats-submit@FreeBSD.org
Cc: madflo@beertech.org
Subject: Re: kern/73324: Re: kern/73324: [PATCH] [sys/dev/bktr] correct warning
 for Pinnacle PCTV Rave card
Date: Thu, 10 Feb 2005 09:53:45 +0100

 Hello,
 
 This report can now be closed, it's actually working thanks to Arne's 
 patch (kern/73669) addition of the new pinnacle device ID [1].
 
   [1] : src/sys/dev/bktr/bktr_card.c from 1.24 to 1.25 .
 
 There is my actual bktr-load-message :
 
   bktr_mem: memory holder loaded
   bktr0: <BrookTree 878> mem 0xcfffe000-0xcfffefff irq 17 at device 9.0 
 on pci1
   bktr0: [GIANT-LOCKED]
   bktr0: Warning - card vendor 0x11bd (model 0x0012) unknown.
   bktr0: MT2032: Companycode=3cbf Part=45 Revision=45
   bktr0: MT2032 not found or unknown type
   bktr0: Pinnacle/Miro TV, Philips SECAM tuner.
 
 Thanks Arne for the co-patching and Julian for the commit :)
 
 -- 
 Florian "madflo" Le Goff
 - madflo at beertech (dot) org
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Thu Feb 10 09:15:56 GMT 2005 
State-Changed-Why:  
Submitter notes that the problem is now resolved. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=73324 
>Unformatted:
