Author: mguevara                     Date: Thu Jul 28 19:26:36 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- Leadtek Winfast PVR2000 related patches for cx88* drivers

---- Files affected:
SOURCES:
   linux-2.6-cx88-blackbird.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/linux-2.6-cx88-blackbird.patch
diff -u /dev/null SOURCES/linux-2.6-cx88-blackbird.patch:1.1
--- /dev/null   Thu Jul 28 21:26:36 2005
+++ SOURCES/linux-2.6-cx88-blackbird.patch      Thu Jul 28 21:26:30 2005
@@ -0,0 +1,122 @@
+Patch for sound on Leadtek PVR2000 and probably other blackbird cards
+
+* To: Linux and Kernel Video <[EMAIL PROTECTED]>
+* Subject: Patch for sound on Leadtek PVR2000 and probably other blackbird 
cards
+* From: wduinker <[EMAIL PROTECTED]>
+* Date: Mon, 14 Mar 2005 19:25:52 +0100
+* Reply-to: Linux and Kernel Video <[EMAIL PROTECTED]>
+* Sender: [EMAIL PROTECTED]
+* User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) 
Gecko/20040803
+
+My patch for getting good sound but also radio and composite video sound on 
Leadtek PVR2000. In this way you can use the front audio jacks. The gpio0 value 
needed changing and the sound from the external ADC needed to be enabled. 
Muting does not work correctly yet.
+
+I also made the blackbird codec settings dependent on the tv-norm.
+
+Willem
+
+diff -bu ./drivers/media/video/cx88/cx88-blackbird.c.old 
./drivers/media/video/cx88/cx88-blackbird.c
+--- ./drivers/media/video/cx88/cx88-blackbird.c        2005-03-07 
17:07:00.000000000 +0100
++++ ./drivers/media/video/cx88/cx88-blackbird.c.old    2005-03-14 
19:00:04.000000000 +0100
+@@ -407,8 +407,9 @@
+ 
+ static void blackbird_codec_settings(struct cx8802_dev *dev)
+ {
++      struct cx88_core *core = dev->core;
+       int bitrate_mode = 1;
+-      int bitrate = 7500000;
++      int bitrate = 4000000;
+       int bitrate_peak = 7500000;
+ 
+       /* assign stream type */
+@@ -420,9 +421,33 @@
+         /* assign output port */
+         blackbird_api_cmd(dev, IVTV_API_ASSIGN_OUTPUT_PORT, 1, 0, 1); /* 1 = 
Host */
+ 
++        if (core->tvnorm->cxiformat == VideoFormatPAL) {
++      /* assign framerate */
++        blackbird_api_cmd(dev, IVTV_API_ASSIGN_FRAMERATE, 1, 0, 1);
++      
++      /* assign gop properties */
++        blackbird_api_cmd(dev, IVTV_API_ASSIGN_GOP_PROPERTIES, 2, 0, 12, 3);
++        
++        /* assign 3 2 pulldown */
++        blackbird_api_cmd(dev, IVTV_API_ASSIGN_3_2_PULLDOWN, 1, 0, 1);
++      
++      /* assign gop closure */
++        blackbird_api_cmd(dev, IVTV_API_ASSIGN_GOP_CLOSURE, 1, 0, 1);
++      }
++      else {
+         /* assign framerate */
+         blackbird_api_cmd(dev, IVTV_API_ASSIGN_FRAMERATE, 1, 0, 0);
+ 
++      /* assign gop properties */
++        blackbird_api_cmd(dev, IVTV_API_ASSIGN_GOP_PROPERTIES, 2, 0, 15, 3);
++        
++        /* assign 3 2 pulldown */
++        blackbird_api_cmd(dev, IVTV_API_ASSIGN_3_2_PULLDOWN, 1, 0, 0);
++      
++      /* assign gop closure */
++        blackbird_api_cmd(dev, IVTV_API_ASSIGN_GOP_CLOSURE, 1, 0, 0);
++      }
++      
+         /* assign frame size */
+         blackbird_api_cmd(dev, IVTV_API_ASSIGN_FRAME_SIZE, 2, 0,
+                         dev->height, dev->width);
+@@ -437,21 +462,9 @@
+                        bitrate_peak / 400,   /* peak/400 */
+                        0, 0x70);             /* encoding buffer, ckennedy */
+ 
+-        /* assign gop properties */
+-        blackbird_api_cmd(dev, IVTV_API_ASSIGN_GOP_PROPERTIES, 2, 0, 15, 3);
+-        //blackbird_api_cmd(dev, IVTV_API_ASSIGN_GOP_PROPERTIES, 2, 0, 2, 1);
+-
+-        /* assign 3 2 pulldown */
+-        blackbird_api_cmd(dev, IVTV_API_ASSIGN_3_2_PULLDOWN, 1, 0, 0);
+-
+-        /* note: it's not necessary to set the samplerate, the mpeg encoder 
seems to autodetect/adjust */
+-      blackbird_api_cmd(dev, IVTV_API_ASSIGN_AUDIO_PROPERTIES, 1, 0, (2<<2) | 
(8<<4));
+-
+-      /* assign gop closure */
+-        blackbird_api_cmd(dev, IVTV_API_ASSIGN_GOP_CLOSURE, 1, 0, 0);
+-
+         /* assign audio properties */
+-        blackbird_api_cmd(dev, IVTV_API_ASSIGN_AUDIO_PROPERTIES, 1, 0, 0 | (2 
<< 2) | (14 << 4));
++      /* change to 48kHz */
++        blackbird_api_cmd(dev, IVTV_API_ASSIGN_AUDIO_PROPERTIES, 1, 0, 1 | (2 
<< 2) | (14 << 4));
+ 
+         /* assign dnr filter mode */
+         blackbird_api_cmd(dev, IVTV_API_ASSIGN_DNR_FILTER_MODE, 2, 0, 0, 0);
+diff -bu ./drivers/media/video/cx88/cx88-cards.c 
./drivers/media/video/cx88/cx88-cards.c
+--- ./drivers/media/video/cx88/cx88-cards.c    2005-03-04 10:27:00.000000000 
+0100
++++ ./drivers/media/video/cx88/cx88-cards.c    2005-03-14 18:03:41.000000000 
+0100
+@@ -241,13 +241,14 @@
+         },
+         [CX88_BOARD_LEADTEK_PVR2000] = {
+               // gpio values for PAL version from regspy by DScaler
++                // gpio2 == 0 is tuner; ==1 is AUDIO front jacks thru I2SIN 
interface
+                 .name           = "Leadtek PVR 2000",
+                 .tuner_type     = 38,
+               .tda9887_conf   = TDA9887_PRESENT,
+                 .input          = {{
+                         .type   = CX88_VMUX_TELEVISION,
+                         .vmux   = 0,
+-                        .gpio0  = 0x0000bde6,
++                        .gpio0  = 0x0000bde2,
+                 },{
+                         .type   = CX88_VMUX_COMPOSITE1,
+                         .vmux   = 1,
+diff -bu ./drivers/media/video/cx88/cx88-tvaudio.c 
./drivers/media/video/cx88/cx88-tvaudio.c
+--- ./drivers/media/video/cx88/cx88-tvaudio.c  2005-03-07 17:27:00.000000000 
+0100
++++ ./drivers/media/video/cx88/cx88-tvaudio.c  2005-03-14 18:01:46.000000000 
+0100
+@@ -143,6 +143,9 @@
+       u32 volume;
+ 
+       if (cx88_boards[core->board].blackbird) {
++              // sets sound input from external adc
++              cx_set(AUD_I2SINPUTCNTL,0);
++              cx_set(AUD_CTL,EN_I2SIN_ENABLE ); 
+               // 'pass-thru mode': this enables the i2s output to the mpeg 
encoder
+               cx_set(AUD_CTL, 0x2000);
+               cx_write(AUD_I2SOUTPUTCNTL, 1);
+
+
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to