summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-video.c4
-rw-r--r--linux/drivers/media/video/msp3400-driver.c24
-rw-r--r--linux/drivers/media/video/msp3400.c24
-rw-r--r--v4l/ChangeLog14
4 files changed, 17 insertions, 49 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c
index aa530073e..73fcf8a76 100644
--- a/linux/drivers/media/video/em28xx/em28xx-video.c
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c
@@ -1193,9 +1193,7 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
if (dev->decoder == EM28XX_TVP5150) {
em28xx_i2c_call_clients(dev,cmd,arg);
return 0;
- } else {
-
- if (!dev->has_msp34xx){
+ } else if (!dev->has_msp34xx) {
for (i = 0; i < ARRAY_SIZE(em28xx_qctrl); i++) {
if (ctrl->id == em28xx_qctrl[i].id) {
if (ctrl->value <
diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c
index 633909231..b4e425828 100644
--- a/linux/drivers/media/video/msp3400-driver.c
+++ b/linux/drivers/media/video/msp3400-driver.c
@@ -179,9 +179,6 @@ struct msp3400c {
#define HAVE_SIMPLER(msp) ((msp->rev1 & 0xff) >= 'G'-'@')
#define HAVE_RADIO(msp) ((msp->rev1 & 0xff) >= 'G'-'@')
-#define MSP3400_MAX 4
-static struct i2c_client *msps[MSP3400_MAX];
-
#define VIDEO_MODE_RADIO 16 /* norm magic for radio mode */
/* ---------------------------------------------------------------------- */
@@ -483,10 +480,8 @@ static void msp3400c_setvolume(struct i2c_client *client,
int vol = 0, val = 0, balance = 0;
if (!muted) {
- /* 0x7f instead if 0x73 here has sound quality issues,
- * probably due to overmodulation + clipping ... */
vol = (left > right) ? left : right;
- val = (vol * 0x73 / 65535) << 8;
+ val = (vol * 0x7f / 65535) << 8;
}
if (vol > 0) {
balance = ((right - left) * 127) / vol;
@@ -2378,21 +2373,12 @@ static int msp_attach(struct i2c_adapter *adap, int addr, unsigned short flags,
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
#endif
- /* update our own array */
- for (i = 0; i < MSP3400_MAX; i++) {
- if (NULL == msps[i]) {
- msps[i] = client;
- break;
- }
- }
-
return 0;
}
static int msp_detach(struct i2c_client *client)
{
struct msp3400c *msp = i2c_get_clientdata(client);
- int i;
/* shutdown control thread */
if (msp->kthread) {
@@ -2401,14 +2387,6 @@ static int msp_detach(struct i2c_client *client)
}
msp3400c_reset(client);
- /* update our own array */
- for (i = 0; i < MSP3400_MAX; i++) {
- if (client == msps[i]) {
- msps[i] = NULL;
- break;
- }
- }
-
i2c_detach_client(client);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_DEC_USE_COUNT;
diff --git a/linux/drivers/media/video/msp3400.c b/linux/drivers/media/video/msp3400.c
index 633909231..b4e425828 100644
--- a/linux/drivers/media/video/msp3400.c
+++ b/linux/drivers/media/video/msp3400.c
@@ -179,9 +179,6 @@ struct msp3400c {
#define HAVE_SIMPLER(msp) ((msp->rev1 & 0xff) >= 'G'-'@')
#define HAVE_RADIO(msp) ((msp->rev1 & 0xff) >= 'G'-'@')
-#define MSP3400_MAX 4
-static struct i2c_client *msps[MSP3400_MAX];
-
#define VIDEO_MODE_RADIO 16 /* norm magic for radio mode */
/* ---------------------------------------------------------------------- */
@@ -483,10 +480,8 @@ static void msp3400c_setvolume(struct i2c_client *client,
int vol = 0, val = 0, balance = 0;
if (!muted) {
- /* 0x7f instead if 0x73 here has sound quality issues,
- * probably due to overmodulation + clipping ... */
vol = (left > right) ? left : right;
- val = (vol * 0x73 / 65535) << 8;
+ val = (vol * 0x7f / 65535) << 8;
}
if (vol > 0) {
balance = ((right - left) * 127) / vol;
@@ -2378,21 +2373,12 @@ static int msp_attach(struct i2c_adapter *adap, int addr, unsigned short flags,
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
#endif
- /* update our own array */
- for (i = 0; i < MSP3400_MAX; i++) {
- if (NULL == msps[i]) {
- msps[i] = client;
- break;
- }
- }
-
return 0;
}
static int msp_detach(struct i2c_client *client)
{
struct msp3400c *msp = i2c_get_clientdata(client);
- int i;
/* shutdown control thread */
if (msp->kthread) {
@@ -2401,14 +2387,6 @@ static int msp_detach(struct i2c_client *client)
}
msp3400c_reset(client);
- /* update our own array */
- for (i = 0; i < MSP3400_MAX; i++) {
- if (client == msps[i]) {
- msps[i] = NULL;
- break;
- }
- }
-
i2c_detach_client(client);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_DEC_USE_COUNT;
diff --git a/v4l/ChangeLog b/v4l/ChangeLog
index 17dedfdc3..0c4ea1f37 100644
--- a/v4l/ChangeLog
+++ b/v4l/ChangeLog
@@ -1,3 +1,17 @@
+2005-12-02 20:06 hverkuil
+
+ * ../linux/drivers/media/video/em28xx/em28xx-video.c:
+ (em28xx_do_ioctl):
+ - fixed missing closing }
+ * ../linux/drivers/media/video/msp3400.c: (msp3400c_setvolume),
+ (msp_attach), (msp_detach):
+ - remove dead code
+ - remove volume scaling (does not belong here, whether max volume
+ results in distortion depends on the specific hardware in which
+ the msp3400 is used, not on the msp3400 itself).
+
+ Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
+
2005-12-02 17:47 mchehab
* ../linux/drivers/media/video/em28xx/em28xx-video.c: