V4L/DVB (3112): Several fixes for Hauppauge Roselyn Design (blackbird)
authorSteven Toth <stoth@hauppauge.com>
Mon, 9 Jan 2006 17:25:17 +0000 (15:25 -0200)
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>
Mon, 9 Jan 2006 17:25:17 +0000 (15:25 -0200)
- This patch adds eeprom awareness for the Roslyn. In effect, the
blackbird will query the tuner V4L2_STD_xxxx definitions to determine
whether it's connected to a NTSC or PAL tuner. Based on that, various
default values will change for blackbird encoding.
- Fixes back panel SVIDEO/COMPOSITE with audio, work properly.
- Fixes a problem with lip sync issues, due to bad framerate vs
audio rate assumptions.
- Fixed a problem with the GPIO configuration in cx88-cards.
- Removed the comments in cx88-cards that made no sense.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
drivers/media/video/cx88/cx88-blackbird.c
drivers/media/video/cx88/cx88-cards.c
drivers/media/video/cx88/cx88-tvaudio.c
drivers/media/video/cx88/cx88.h

index 74e57a53116ff58d5b5bbecc9ad7f9ef3f977db8..99bfa32382948f5389bae6f95afcbc033dcd38d9 100644 (file)
@@ -1689,6 +1689,18 @@ static int __devinit blackbird_probe(struct pci_dev *pci_dev,
        memcpy(&dev->params,&default_mpeg_params,sizeof(default_mpeg_params));
        memcpy(&dev->dnr_params,&default_dnr_params,sizeof(default_dnr_params));
 
+       if (core->board == CX88_BOARD_HAUPPAUGE_ROSLYN) {
+
+               if (core->tuner_formats & V4L2_STD_525_60) {
+                       dev->height = 480;
+                       dev->params.vi_frame_rate = 30;
+               } else {
+                       dev->height = 576;
+                       dev->params.vi_frame_rate = 25;
+               }
+
+       }
+
        err = cx8802_init_common(dev);
        if (0 != err)
                goto fail_free;
index c95438abcd7bb70f1ab4bae57d2dcc81d92c8751..c20c07117537c6f2fb35b927532a3861b44d01f6 100644 (file)
@@ -611,12 +611,12 @@ struct cx88_board cx88_boards[] = {
                .input          = {{
                        .type   = CX88_VMUX_TELEVISION,
                        .vmux   = 0,
-                       .gpio0  = 0xed12,  /* internal decoder */
+                       .gpio0  = 0xed1a,
                        .gpio2  = 0x00ff,
                },{
                        .type   = CX88_VMUX_DEBUG,
                        .vmux   = 0,
-                       .gpio0  = 0xff01,  /* mono from tuner chip */
+                       .gpio0  = 0xff01,
                },{
                        .type   = CX88_VMUX_COMPOSITE1,
                        .vmux   = 1,
@@ -1202,11 +1202,13 @@ static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
 
        tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
        core->tuner_type = tv.tuner_type;
+       core->tuner_formats = tv.tuner_formats;
        core->has_radio  = tv.has_radio;
 
        /* Make sure we support the board model */
        switch (tv.model)
        {
+       case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
        case 90002: /* Nova-T-PCI (9002) */
        case 92001: /* Nova-S-Plus (Video and IR) */
        case 92002: /* Nova-S-Plus (Video and IR) */
index a1b120c8a9b51f9adc4188f49c420b3b4dc44f8f..00051a4c1dc24289f9c4b2f51860c20cffca205f 100644 (file)
@@ -139,7 +139,11 @@ static void set_audio_finish(struct cx88_core *core, u32 ctl)
 
        if (cx88_boards[core->board].blackbird) {
                /* sets sound input from external adc */
-               cx_set(AUD_CTL, EN_I2SIN_ENABLE);
+               if (core->board == CX88_BOARD_HAUPPAUGE_ROSLYN)
+                       cx_clear(AUD_CTL, EN_I2SIN_ENABLE);
+               else
+                       cx_set(AUD_CTL, EN_I2SIN_ENABLE);
+
                cx_write(AUD_I2SINPUTCNTL, 4);
                cx_write(AUD_BAUDRATE, 1);
                /* 'pass-thru mode': this enables the i2s output to the mpeg encoder */
index 3e2bcd241a277517f0becf25bb9e7c90f09ef33e..0bbf68b325c4518120e00d700e4993ee7445bda7 100644 (file)
@@ -285,6 +285,9 @@ struct cx88_core {
        unsigned int               tda9887_conf;
        unsigned int               has_radio;
 
+       /* Supported V4L _STD_ tuner formats */
+       unsigned int               tuner_formats;
+
        /* config info -- dvb */
        struct dvb_pll_desc        *pll_desc;
        unsigned int               pll_addr;