[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 917812d..76677cb 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 4d37cb7..f05c5ad 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 8d4fcf7..e65e0fd 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;