[media] cx231xx: make output mode configurable via the board profile
authorDevin Heitmueller <dheitmueller@hauppauge.com>
Wed, 18 Aug 2010 20:50:07 +0000 (17:50 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Oct 2010 03:17:29 +0000 (01:17 -0200)
Extend the board profile structure to allow configuration of the output mode.
Right now they are all doing VIP 1.1 format, but we have a board that needs
ITU656 format (which hasn't been checked in yet).

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx231xx/cx231xx-avcore.c
drivers/media/video/cx231xx/cx231xx-cards.c
drivers/media/video/cx231xx/cx231xx.h

index 917812d6ab21601bb65c95fcd508b6de821f5a77..76677cb1790832ea4aacb0d2d3e0f949b60d9115 100644 (file)
@@ -656,12 +656,12 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev,
                value |= (1 << 7);
                status = vid_blk_write_word(dev, OUT_CTRL1, value);
 
-               /* Set vip 1.1 output mode */
+               /* Set output mode */
                status = cx231xx_read_modify_write_i2c_dword(dev,
                                                        VID_BLK_I2C_ADDRESS,
                                                        OUT_CTRL1,
                                                        FLD_OUT_MODE,
-                                                       OUT_MODE_VIP11);
+                                                       dev->board.output_mode);
 
                /* Tell DIF object to go to baseband mode  */
                status = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND);
@@ -779,11 +779,11 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev,
                        value |= (1 << 7);
                        status = vid_blk_write_word(dev, OUT_CTRL1, value);
 
-                       /* Set vip 1.1 output mode */
+                       /* Set output mode */
                        status = cx231xx_read_modify_write_i2c_dword(dev,
                                                        VID_BLK_I2C_ADDRESS,
                                                        OUT_CTRL1, FLD_OUT_MODE,
-                                                       OUT_MODE_VIP11);
+                                                       dev->board.output_mode);
 
                        /* Tell DIF object to go to baseband mode */
                        status = cx231xx_dif_set_standard(dev,
@@ -870,11 +870,11 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev,
                                 (FLD_OEF_AGC_IF);
                        status = vid_blk_write_word(dev, PIN_CTRL, value);
 
-                       /* Set vip 1.1 output mode */
+                       /* Set output mode */
                        status = cx231xx_read_modify_write_i2c_dword(dev,
                                                VID_BLK_I2C_ADDRESS,
                                                OUT_CTRL1, FLD_OUT_MODE,
-                                               OUT_MODE_VIP11);
+                                               dev->board.output_mode);
 
                        /* Disable auto config of registers */
                        status = cx231xx_read_modify_write_i2c_dword(dev,
index 4d37cb7b07502ffdced8f9f419b6429605b18889..f05c5ad490b55ce6cbc937004865e455e64c35c6 100644 (file)
@@ -99,6 +99,7 @@ struct cx231xx_board cx231xx_boards[] = {
                .tuner_scl_gpio = 0x1a,
                .tuner_sda_gpio = 0x1b,
                .decoder = CX231XX_AVDECODER,
+               .output_mode = OUT_MODE_VIP11,
                .demod_xfer_mode = 0,
                .ctl_pin_status_mask = 0xFFFFFFC4,
                .agc_analog_digital_select_gpio = 0x0c,
@@ -138,6 +139,7 @@ struct cx231xx_board cx231xx_boards[] = {
                .tuner_scl_gpio = 0x1a,
                .tuner_sda_gpio = 0x1b,
                .decoder = CX231XX_AVDECODER,
+               .output_mode = OUT_MODE_VIP11,
                .demod_xfer_mode = 0,
                .ctl_pin_status_mask = 0xFFFFFFC4,
                .agc_analog_digital_select_gpio = 0x0c,
@@ -177,6 +179,7 @@ struct cx231xx_board cx231xx_boards[] = {
                .tuner_scl_gpio = 0x1a,
                .tuner_sda_gpio = 0x1b,
                .decoder = CX231XX_AVDECODER,
+               .output_mode = OUT_MODE_VIP11,
                .demod_xfer_mode = 0,
                .ctl_pin_status_mask = 0xFFFFFFC4,
                .agc_analog_digital_select_gpio = 0x1c,
@@ -217,6 +220,7 @@ struct cx231xx_board cx231xx_boards[] = {
                .tuner_scl_gpio = 0x1a,
                .tuner_sda_gpio = 0x1b,
                .decoder = CX231XX_AVDECODER,
+               .output_mode = OUT_MODE_VIP11,
                .demod_xfer_mode = 0,
                .ctl_pin_status_mask = 0xFFFFFFC4,
                .agc_analog_digital_select_gpio = 0x1c,
@@ -256,6 +260,7 @@ struct cx231xx_board cx231xx_boards[] = {
                .tuner_scl_gpio = 0x1a,
                .tuner_sda_gpio = 0x1b,
                .decoder = CX231XX_AVDECODER,
+               .output_mode = OUT_MODE_VIP11,
                .demod_xfer_mode = 0,
                .ctl_pin_status_mask = 0xFFFFFFC4,
                .agc_analog_digital_select_gpio = 0x1c,
@@ -295,6 +300,7 @@ struct cx231xx_board cx231xx_boards[] = {
                .tuner_scl_gpio = 0x1a,
                .tuner_sda_gpio = 0x1b,
                .decoder = CX231XX_AVDECODER,
+               .output_mode = OUT_MODE_VIP11,
                .demod_xfer_mode = 0,
                .ctl_pin_status_mask = 0xFFFFFFC4,
                .agc_analog_digital_select_gpio = 0x0c,
@@ -322,6 +328,7 @@ struct cx231xx_board cx231xx_boards[] = {
                .tuner_scl_gpio = 0x1a,
                .tuner_sda_gpio = 0x1b,
                .decoder = CX231XX_AVDECODER,
+               .output_mode = OUT_MODE_VIP11,
                .demod_xfer_mode = 0,
                .ctl_pin_status_mask = 0xFFFFFFC4,
                .agc_analog_digital_select_gpio = 0x0c,
@@ -349,6 +356,7 @@ struct cx231xx_board cx231xx_boards[] = {
                .tuner_scl_gpio = 0x1a,
                .tuner_sda_gpio = 0x1b,
                .decoder = CX231XX_AVDECODER,
+               .output_mode = OUT_MODE_VIP11,
                .demod_xfer_mode = 0,
                .ctl_pin_status_mask = 0xFFFFFFC4,
                .agc_analog_digital_select_gpio = 0x0c,
@@ -382,6 +390,7 @@ struct cx231xx_board cx231xx_boards[] = {
                .name = "Hauppauge USB Live 2",
                .tuner_type = TUNER_ABSENT,
                .decoder = CX231XX_AVDECODER,
+               .output_mode = OUT_MODE_VIP11,
                .demod_xfer_mode = 0,
                .ctl_pin_status_mask = 0xFFFFFFC4,
                .agc_analog_digital_select_gpio = 0x0c,
index 8d4fcf70387f33b571e561f3cc41997440c2f9de..e65e0fd88e4bf5791ae0b84582fb8c18a7e448d1 100644 (file)
@@ -353,6 +353,7 @@ struct cx231xx_board {
        unsigned char xclk, i2c_speed;
 
        enum cx231xx_decoder decoder;
+       int output_mode;
 
        struct cx231xx_input input[MAX_CX231XX_INPUT];
        struct cx231xx_input radio;