summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/msp3400-driver.c
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-09-30 14:17:12 +0000
committerGerd Knorr <devnull@localhost>2004-09-30 14:17:12 +0000
commitcfb54995d578f034374bfe915388c890f506b011 (patch)
treef1f72afc2610064b549f68e3c3dcaffd95650a03 /linux/drivers/media/video/msp3400-driver.c
parentd726b96eaf915bc2d78d9bceb317ca5bf8669ddd (diff)
downloadmediapointer-dvb-s2-cfb54995d578f034374bfe915388c890f506b011.tar.gz
mediapointer-dvb-s2-cfb54995d578f034374bfe915388c890f506b011.tar.bz2
- saa7134: cinergy 200 fixes.
- msp3400: drop dfp register access hooks.
Diffstat (limited to 'linux/drivers/media/video/msp3400-driver.c')
-rw-r--r--linux/drivers/media/video/msp3400-driver.c59
1 files changed, 10 insertions, 49 deletions
diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c
index 6f930254c..a1991985c 100644
--- a/linux/drivers/media/video/msp3400-driver.c
+++ b/linux/drivers/media/video/msp3400-driver.c
@@ -101,9 +101,6 @@ struct msp3400c {
int volume, balance;
int bass, treble;
- /* shadow register set */
- int dfp_regs[DFP_COUNT];
-
/* thread */
pid_t tpid;
struct completion texit;
@@ -112,9 +109,6 @@ struct msp3400c {
int active:1;
int restart:1;
int rmmod:1;
-#if 0
- struct semaphore *notify;
-#endif
int watch_stereo;
struct timer_list wake_stereo;
@@ -639,6 +633,7 @@ msp3400c_print_mode(struct msp3400c *msp)
}
}
+#if 0
static void
msp3400c_restore_dfp(struct i2c_client *client)
{
@@ -663,6 +658,7 @@ static int msp3400c_write_dfp_with_default(struct i2c_client *client, int addr,
value=msp->dfp_regs[addr];
return msp3400c_write(client, I2C_MSP3400C_DFP, addr, value);
}
+#endif
/* ----------------------------------------------------------------------- */
@@ -1004,7 +1000,6 @@ static int msp3400c_thread(void *data)
/* unmute + restore dfp registers */
msp3400c_setvolume(client, msp->muted,
msp->volume, msp->balance);
- msp3400c_restore_dfp(client);
if (msp->watch_stereo)
mod_timer(&msp->wake_stereo, jiffies+5*HZ);
@@ -1265,9 +1260,7 @@ static int msp3410d_thread(void *data)
msp3400c_settreble(client, msp->treble);
msp3400c_setvolume(client, msp->muted,
msp->volume, msp->balance);
-
msp3400c_write(client, I2C_MSP3400C_DFP, 0x0013, msp->acb);
- msp3400c_restore_dfp(client);
if (msp->watch_stereo)
mod_timer(&msp->wake_stereo, jiffies+HZ);
@@ -1320,17 +1313,18 @@ static int msp34xxg_reset(struct i2c_client *client)
modus))
return -1;
- /* write the dfps that may have an influence on standard/audio autodetection right now */
+ /* write the dfps that may have an influence on
+ standard/audio autodetection right now */
msp34xxg_set_source(client, msp->source);
- if (msp3400c_write_dfp_with_default(client,
- 0x0e, /* AM/FM Prescale */
- 0x3000 /* default: [15:8] 75khz deviation */))
+ if (msp3400c_write(client, I2C_MSP3400C_DFP,
+ 0x0e, /* AM/FM Prescale */
+ 0x3000 /* default: [15:8] 75khz deviation */))
return -1;
- if (msp3400c_write_dfp_with_default(client,
- 0x10, /* NICAM Prescale */
- 0x5a00 /* default: 9db gain (as recommended) */))
+ if (msp3400c_write(client, I2C_MSP3400C_DFP,
+ 0x10, /* NICAM Prescale */
+ 0x5a00 /* default: 9db gain (as recommended) */))
return -1;
std = standard;
@@ -1375,9 +1369,6 @@ static int msp34xxg_reset(struct i2c_client *client)
msp3400c_settreble(client, msp->treble);
msp3400c_setvolume(client, msp->muted, msp->volume, msp->balance);
- /* restore other dfp's */
- msp3400c_restore_dfp(client);
-
/* restore ACB */
if (msp3400c_write(client,
I2C_MSP3400C_DFP,
@@ -1613,7 +1604,6 @@ static int msp_attach(struct i2c_adapter *adap, int addr,
struct msp3400c *msp;
struct i2c_client *c;
int (*thread_func)(void *data) = NULL;
- int i;
client_template.adapter = adap;
client_template.addr = addr;
@@ -1638,8 +1628,6 @@ static int msp_attach(struct i2c_adapter *adap, int addr,
msp->treble = 32768;
msp->input = -1;
msp->muted = 1;
- for (i = 0; i < DFP_COUNT; i++)
- msp->dfp_regs[i] = -1;
i2c_set_clientdata(c, msp);
init_waitqueue_head(&msp->wq);
@@ -1857,33 +1845,6 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
}
break;
-#if 1
- /* work-in-progress: hook to control the DFP registers */
- case MSP_SET_DFPREG:
- {
- struct msp_dfpreg *r = arg;
- unsigned int i;
-
- if (r->reg < 0 || r->reg >= DFP_COUNT)
- return -EINVAL;
- for (i = 0; i < ARRAY_SIZE(bl_dfp); i++)
- if (r->reg == bl_dfp[i])
- return -EINVAL;
- msp->dfp_regs[r->reg] = r->value;
- msp3400c_write(client,I2C_MSP3400C_DFP,r->reg,r->value);
- return 0;
- }
- case MSP_GET_DFPREG:
- {
- struct msp_dfpreg *r = arg;
-
- if (r->reg < 0 || r->reg >= DFP_COUNT)
- return -EINVAL;
- r->value = msp3400c_read(client,I2C_MSP3400C_DFP,r->reg);
- return 0;
- }
-#endif
-
/* --- v4l ioctls --- */
/* take care: bttv does userspace copying, we'll get a
kernel pointer here... */