]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
V4L/DVB (3100): fix compile error, remove dead code and volume scaling
authorHans Verkuil <hverkuil@xs4all.nl>
Mon, 9 Jan 2006 17:25:14 +0000 (15:25 -0200)
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>
Mon, 9 Jan 2006 17:25:14 +0000 (15:25 -0200)
- Fix compile error (missing '}') in em28xx-video.c. Remove dead code and
volume scaling from msp3400.c. Volume scaling does not belong there, it should
be done in the driver for the card that uses the msp3400 if needed, not in the
msp3400.c source. The volume scaling code gave problems with the ivtv driver
which does not need to do any scaling.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/msp3400.c

index 446ba3b2ac3654d8a19c6f5a45dbe0096d83d804..5e831fccf3fd4c8d63fea37077685cceb3785290 100644 (file)
@@ -1089,9 +1089,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 <
index 8d47d789424857a64ca02f5e7d90297205bfe50e..6cff06a7eab7e2e40db28443e05b794403b312f0 100644 (file)
@@ -473,10 +473,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;
@@ -2351,21 +2349,12 @@ static int msp_attach(struct i2c_adapter *adap, int addr, int kind)
        /* done */
        i2c_attach_client(client);
 
-       /* 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) {
@@ -2374,14 +2363,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);
 
        kfree(msp);