Skip to content

Commit

Permalink
[media] cx231xx: Make the DIF configuration based on the tuner not th…
Browse files Browse the repository at this point in the history
…e board id

The current code was deciding whether a DIF was present based on the board
profile.  However, this is just another thing for someone to get wrong when
adding new boards.  Make the decision based on the tuner instead, so that a
developer adding new boards only needs to specify which tuner the device has.

Of course, the first time somebody adds a board with a tuner other than xc5000
or tda18271, he/she will need to add another line for that tuner.  But we
provide a friendly message in dmesg to let them know that.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Devin Heitmueller authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent b522591 commit 8aed3f4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions drivers/media/video/cx231xx/cx231xx-avcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1175,28 +1175,28 @@ int cx231xx_set_audio_decoder_input(struct cx231xx *dev,

status = restartAudioFirmware(dev);

switch (dev->model) {
case CX231XX_BOARD_CNXT_CARRAERA:
case CX231XX_BOARD_CNXT_RDE_250:
case CX231XX_BOARD_CNXT_SHELBY:
case CX231XX_BOARD_CNXT_RDU_250:
case CX231XX_BOARD_CNXT_VIDEO_GRABBER:
switch (dev->board.tuner_type) {
case TUNER_XC5000:
/* SIF passthrough at 28.6363 MHz sample rate */
status = cx231xx_read_modify_write_i2c_dword(dev,
VID_BLK_I2C_ADDRESS,
CHIP_CTRL,
FLD_SIF_EN,
cx231xx_set_field(FLD_SIF_EN, 1));
break;
case CX231XX_BOARD_CNXT_RDE_253S:
case CX231XX_BOARD_CNXT_RDU_253S:
case CX231XX_BOARD_HAUPPAUGE_EXETER:
case TUNER_NXP_TDA18271:
/* Normal mode: SIF passthrough at 14.32 MHz */
status = cx231xx_read_modify_write_i2c_dword(dev,
VID_BLK_I2C_ADDRESS,
CHIP_CTRL,
FLD_SIF_EN,
cx231xx_set_field(FLD_SIF_EN, 0));
break;
default:
/* This is just a casual suggestion to people adding
new boards in case they use a tuner type we don't
currently know about */
printk(KERN_INFO "Unknown tuner type configuring SIF");
break;
}
break;
Expand Down

0 comments on commit 8aed3f4

Please sign in to comment.