summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/video/bttv-driver.c1
-rw-r--r--linux/drivers/media/video/cx88/cx88-tvaudio.c56
2 files changed, 35 insertions, 22 deletions
diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c
index 3712f827b..e91096618 100644
--- a/linux/drivers/media/video/bttv-driver.c
+++ b/linux/drivers/media/video/bttv-driver.c
@@ -799,6 +799,7 @@ static void bt848_bright(struct bttv *btv, int bright)
{
int value;
+ printk("bttv: set bright: %d\n",bright);
btv->bright = bright;
/* We want -128 to 127 we get 0-65535 */
diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c
index 7a57c20d1..761eb52ff 100644
--- a/linux/drivers/media/video/cx88/cx88-tvaudio.c
+++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c
@@ -70,8 +70,21 @@ static void set_audio_registers(struct cx8800_dev *dev,
{
int i;
- for (i = 0; l[i].reg; i++)
- cx_write(l[i].reg, l[i].val);
+ for (i = 0; l[i].reg; i++) {
+ switch (l[i].reg) {
+ case AUD_PDF_DDS_CNST_BYTE2:
+ case AUD_PDF_DDS_CNST_BYTE1:
+ case AUD_PDF_DDS_CNST_BYTE0:
+ case AUD_QAM_MODE:
+ case AUD_PHACC_FREQ_8MSB:
+ case AUD_PHACC_FREQ_8LSB:
+ cx_writeb(l[i].reg, l[i].val);
+ break;
+ default:
+ cx_write(l[i].reg, l[i].val);
+ break;
+ }
+ }
}
static void set_audio_start(struct cx8800_dev *dev,
@@ -140,12 +153,12 @@ static void set_audio_standard_NICAM(struct cx8800_dev *dev)
// { AUD_DMD_RA_DDS, 0x00c0d5ce },
// setup QAM registers
- { 0x320d01, 0x06 },
- { 0x320d02, 0x82 },
- { 0x320d03, 0x16 },
- { 0x320d04, 0x05 },
- { 0x320d2a, 0x34 },
- { 0x320d2b, 0x4c },
+ { AUD_PDF_DDS_CNST_BYTE2, 0x06 },
+ { AUD_PDF_DDS_CNST_BYTE1, 0x82 },
+ { AUD_PDF_DDS_CNST_BYTE0, 0x16 },
+ { AUD_QAM_MODE, 0x05 },
+ { AUD_PHACC_FREQ_8MSB, 0x34 },
+ { AUD_PHACC_FREQ_8LSB, 0x4c },
{ /* end of list */ },
};
@@ -164,12 +177,12 @@ static void set_audio_standard_NICAM_L(struct cx8800_dev *dev)
static const struct rlist nicam_l[] = {
// setup QAM registers
- { 0x0320d01, 0x00000048 },
- { 0x0320d02, 0x0000003d },
- { 0x0320d03, 0x000000f5 },
- { 0x0320d04, 0x00000000 },
- { 0x0320d2a, 0x0033003a },
- { 0x0320d2b, 0x0000334a },
+ { AUD_PDF_DDS_CNST_BYTE2, 0x48 },
+ { AUD_PDF_DDS_CNST_BYTE1, 0x3d },
+ { AUD_PDF_DDS_CNST_BYTE0, 0xf5 },
+ { AUD_QAM_MODE, 0x00 },
+ { AUD_PHACC_FREQ_8MSB, 0x3a },
+ { AUD_PHACC_FREQ_8LSB, 0x4a },
{ AUD_POLY0_DDS_CONSTANT, 0x000e4db2 },
{ AUD_IIR1_0_SEL, 0x00000000 },
@@ -285,6 +298,13 @@ static void set_audio_standard_A2(struct cx8800_dev *dev)
{
/* from dscaler cvs */
static const struct rlist a2[] = {
+ { AUD_PDF_DDS_CNST_BYTE2, 0x06 },
+ { AUD_PDF_DDS_CNST_BYTE1, 0x82 },
+ { AUD_PDF_DDS_CNST_BYTE0, 0x12 },
+ { AUD_QAM_MODE, 0x05 },
+ { AUD_PHACC_FREQ_8MSB, 0x34 },
+ { AUD_PHACC_FREQ_8LSB, 0x4c },
+
{ AUD_RATE_ADJ1, 0x00001000 },
{ AUD_RATE_ADJ2, 0x00002000 },
{ AUD_RATE_ADJ3, 0x00003000 },
@@ -486,14 +506,6 @@ static void set_audio_standard_A2(struct cx8800_dev *dev)
} else {
/* new code */
set_audio_start(dev, 0x0004, EN_DMTRX_LR | EN_A2_AUTO_STEREO);
-
- cx_writeb(AUD_PDF_DDS_CNST_BYTE2, 0x06);
- cx_writeb(AUD_PDF_DDS_CNST_BYTE1, 0x82);
- cx_writeb(AUD_PDF_DDS_CNST_BYTE0, 0x12);
- cx_writeb(AUD_QAM_MODE, 0x05);
- cx_writeb(AUD_PHACC_FREQ_8MSB, 0x34);
- cx_writeb(AUD_PHACC_FREQ_8LSB, 0x4c);
-
set_audio_registers(dev, a2);
set_audio_finish(dev);
}