mirror of https://gitee.com/openkylin/linux.git
[media] cx231xx: make output mode configurable via the board profile
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>
This commit is contained in:
parent
4270c3cac4
commit
888062188c
|
@ -656,12 +656,12 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev,
|
||||||
value |= (1 << 7);
|
value |= (1 << 7);
|
||||||
status = vid_blk_write_word(dev, OUT_CTRL1, value);
|
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,
|
status = cx231xx_read_modify_write_i2c_dword(dev,
|
||||||
VID_BLK_I2C_ADDRESS,
|
VID_BLK_I2C_ADDRESS,
|
||||||
OUT_CTRL1,
|
OUT_CTRL1,
|
||||||
FLD_OUT_MODE,
|
FLD_OUT_MODE,
|
||||||
OUT_MODE_VIP11);
|
dev->board.output_mode);
|
||||||
|
|
||||||
/* Tell DIF object to go to baseband mode */
|
/* Tell DIF object to go to baseband mode */
|
||||||
status = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND);
|
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);
|
value |= (1 << 7);
|
||||||
status = vid_blk_write_word(dev, OUT_CTRL1, value);
|
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,
|
status = cx231xx_read_modify_write_i2c_dword(dev,
|
||||||
VID_BLK_I2C_ADDRESS,
|
VID_BLK_I2C_ADDRESS,
|
||||||
OUT_CTRL1, FLD_OUT_MODE,
|
OUT_CTRL1, FLD_OUT_MODE,
|
||||||
OUT_MODE_VIP11);
|
dev->board.output_mode);
|
||||||
|
|
||||||
/* Tell DIF object to go to baseband mode */
|
/* Tell DIF object to go to baseband mode */
|
||||||
status = cx231xx_dif_set_standard(dev,
|
status = cx231xx_dif_set_standard(dev,
|
||||||
|
@ -870,11 +870,11 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev,
|
||||||
(FLD_OEF_AGC_IF);
|
(FLD_OEF_AGC_IF);
|
||||||
status = vid_blk_write_word(dev, PIN_CTRL, value);
|
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,
|
status = cx231xx_read_modify_write_i2c_dword(dev,
|
||||||
VID_BLK_I2C_ADDRESS,
|
VID_BLK_I2C_ADDRESS,
|
||||||
OUT_CTRL1, FLD_OUT_MODE,
|
OUT_CTRL1, FLD_OUT_MODE,
|
||||||
OUT_MODE_VIP11);
|
dev->board.output_mode);
|
||||||
|
|
||||||
/* Disable auto config of registers */
|
/* Disable auto config of registers */
|
||||||
status = cx231xx_read_modify_write_i2c_dword(dev,
|
status = cx231xx_read_modify_write_i2c_dword(dev,
|
||||||
|
|
|
@ -99,6 +99,7 @@ struct cx231xx_board cx231xx_boards[] = {
|
||||||
.tuner_scl_gpio = 0x1a,
|
.tuner_scl_gpio = 0x1a,
|
||||||
.tuner_sda_gpio = 0x1b,
|
.tuner_sda_gpio = 0x1b,
|
||||||
.decoder = CX231XX_AVDECODER,
|
.decoder = CX231XX_AVDECODER,
|
||||||
|
.output_mode = OUT_MODE_VIP11,
|
||||||
.demod_xfer_mode = 0,
|
.demod_xfer_mode = 0,
|
||||||
.ctl_pin_status_mask = 0xFFFFFFC4,
|
.ctl_pin_status_mask = 0xFFFFFFC4,
|
||||||
.agc_analog_digital_select_gpio = 0x0c,
|
.agc_analog_digital_select_gpio = 0x0c,
|
||||||
|
@ -138,6 +139,7 @@ struct cx231xx_board cx231xx_boards[] = {
|
||||||
.tuner_scl_gpio = 0x1a,
|
.tuner_scl_gpio = 0x1a,
|
||||||
.tuner_sda_gpio = 0x1b,
|
.tuner_sda_gpio = 0x1b,
|
||||||
.decoder = CX231XX_AVDECODER,
|
.decoder = CX231XX_AVDECODER,
|
||||||
|
.output_mode = OUT_MODE_VIP11,
|
||||||
.demod_xfer_mode = 0,
|
.demod_xfer_mode = 0,
|
||||||
.ctl_pin_status_mask = 0xFFFFFFC4,
|
.ctl_pin_status_mask = 0xFFFFFFC4,
|
||||||
.agc_analog_digital_select_gpio = 0x0c,
|
.agc_analog_digital_select_gpio = 0x0c,
|
||||||
|
@ -177,6 +179,7 @@ struct cx231xx_board cx231xx_boards[] = {
|
||||||
.tuner_scl_gpio = 0x1a,
|
.tuner_scl_gpio = 0x1a,
|
||||||
.tuner_sda_gpio = 0x1b,
|
.tuner_sda_gpio = 0x1b,
|
||||||
.decoder = CX231XX_AVDECODER,
|
.decoder = CX231XX_AVDECODER,
|
||||||
|
.output_mode = OUT_MODE_VIP11,
|
||||||
.demod_xfer_mode = 0,
|
.demod_xfer_mode = 0,
|
||||||
.ctl_pin_status_mask = 0xFFFFFFC4,
|
.ctl_pin_status_mask = 0xFFFFFFC4,
|
||||||
.agc_analog_digital_select_gpio = 0x1c,
|
.agc_analog_digital_select_gpio = 0x1c,
|
||||||
|
@ -217,6 +220,7 @@ struct cx231xx_board cx231xx_boards[] = {
|
||||||
.tuner_scl_gpio = 0x1a,
|
.tuner_scl_gpio = 0x1a,
|
||||||
.tuner_sda_gpio = 0x1b,
|
.tuner_sda_gpio = 0x1b,
|
||||||
.decoder = CX231XX_AVDECODER,
|
.decoder = CX231XX_AVDECODER,
|
||||||
|
.output_mode = OUT_MODE_VIP11,
|
||||||
.demod_xfer_mode = 0,
|
.demod_xfer_mode = 0,
|
||||||
.ctl_pin_status_mask = 0xFFFFFFC4,
|
.ctl_pin_status_mask = 0xFFFFFFC4,
|
||||||
.agc_analog_digital_select_gpio = 0x1c,
|
.agc_analog_digital_select_gpio = 0x1c,
|
||||||
|
@ -256,6 +260,7 @@ struct cx231xx_board cx231xx_boards[] = {
|
||||||
.tuner_scl_gpio = 0x1a,
|
.tuner_scl_gpio = 0x1a,
|
||||||
.tuner_sda_gpio = 0x1b,
|
.tuner_sda_gpio = 0x1b,
|
||||||
.decoder = CX231XX_AVDECODER,
|
.decoder = CX231XX_AVDECODER,
|
||||||
|
.output_mode = OUT_MODE_VIP11,
|
||||||
.demod_xfer_mode = 0,
|
.demod_xfer_mode = 0,
|
||||||
.ctl_pin_status_mask = 0xFFFFFFC4,
|
.ctl_pin_status_mask = 0xFFFFFFC4,
|
||||||
.agc_analog_digital_select_gpio = 0x1c,
|
.agc_analog_digital_select_gpio = 0x1c,
|
||||||
|
@ -295,6 +300,7 @@ struct cx231xx_board cx231xx_boards[] = {
|
||||||
.tuner_scl_gpio = 0x1a,
|
.tuner_scl_gpio = 0x1a,
|
||||||
.tuner_sda_gpio = 0x1b,
|
.tuner_sda_gpio = 0x1b,
|
||||||
.decoder = CX231XX_AVDECODER,
|
.decoder = CX231XX_AVDECODER,
|
||||||
|
.output_mode = OUT_MODE_VIP11,
|
||||||
.demod_xfer_mode = 0,
|
.demod_xfer_mode = 0,
|
||||||
.ctl_pin_status_mask = 0xFFFFFFC4,
|
.ctl_pin_status_mask = 0xFFFFFFC4,
|
||||||
.agc_analog_digital_select_gpio = 0x0c,
|
.agc_analog_digital_select_gpio = 0x0c,
|
||||||
|
@ -322,6 +328,7 @@ struct cx231xx_board cx231xx_boards[] = {
|
||||||
.tuner_scl_gpio = 0x1a,
|
.tuner_scl_gpio = 0x1a,
|
||||||
.tuner_sda_gpio = 0x1b,
|
.tuner_sda_gpio = 0x1b,
|
||||||
.decoder = CX231XX_AVDECODER,
|
.decoder = CX231XX_AVDECODER,
|
||||||
|
.output_mode = OUT_MODE_VIP11,
|
||||||
.demod_xfer_mode = 0,
|
.demod_xfer_mode = 0,
|
||||||
.ctl_pin_status_mask = 0xFFFFFFC4,
|
.ctl_pin_status_mask = 0xFFFFFFC4,
|
||||||
.agc_analog_digital_select_gpio = 0x0c,
|
.agc_analog_digital_select_gpio = 0x0c,
|
||||||
|
@ -349,6 +356,7 @@ struct cx231xx_board cx231xx_boards[] = {
|
||||||
.tuner_scl_gpio = 0x1a,
|
.tuner_scl_gpio = 0x1a,
|
||||||
.tuner_sda_gpio = 0x1b,
|
.tuner_sda_gpio = 0x1b,
|
||||||
.decoder = CX231XX_AVDECODER,
|
.decoder = CX231XX_AVDECODER,
|
||||||
|
.output_mode = OUT_MODE_VIP11,
|
||||||
.demod_xfer_mode = 0,
|
.demod_xfer_mode = 0,
|
||||||
.ctl_pin_status_mask = 0xFFFFFFC4,
|
.ctl_pin_status_mask = 0xFFFFFFC4,
|
||||||
.agc_analog_digital_select_gpio = 0x0c,
|
.agc_analog_digital_select_gpio = 0x0c,
|
||||||
|
@ -382,6 +390,7 @@ struct cx231xx_board cx231xx_boards[] = {
|
||||||
.name = "Hauppauge USB Live 2",
|
.name = "Hauppauge USB Live 2",
|
||||||
.tuner_type = TUNER_ABSENT,
|
.tuner_type = TUNER_ABSENT,
|
||||||
.decoder = CX231XX_AVDECODER,
|
.decoder = CX231XX_AVDECODER,
|
||||||
|
.output_mode = OUT_MODE_VIP11,
|
||||||
.demod_xfer_mode = 0,
|
.demod_xfer_mode = 0,
|
||||||
.ctl_pin_status_mask = 0xFFFFFFC4,
|
.ctl_pin_status_mask = 0xFFFFFFC4,
|
||||||
.agc_analog_digital_select_gpio = 0x0c,
|
.agc_analog_digital_select_gpio = 0x0c,
|
||||||
|
|
|
@ -353,6 +353,7 @@ struct cx231xx_board {
|
||||||
unsigned char xclk, i2c_speed;
|
unsigned char xclk, i2c_speed;
|
||||||
|
|
||||||
enum cx231xx_decoder decoder;
|
enum cx231xx_decoder decoder;
|
||||||
|
int output_mode;
|
||||||
|
|
||||||
struct cx231xx_input input[MAX_CX231XX_INPUT];
|
struct cx231xx_input input[MAX_CX231XX_INPUT];
|
||||||
struct cx231xx_input radio;
|
struct cx231xx_input radio;
|
||||||
|
|
Loading…
Reference in New Issue