This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media_tree.git tree:

Subject: [media] tvaudio: fix compiler warnings
Author:  Hans Verkuil <[email protected]>
Date:    Thu Aug 25 10:24:16 2011 -0300

This is indeed a bug: balance and volume must be used to set the left and right
channel volume. Fixed.

Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/video/tvaudio.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=88af83048d3bdfe3de7aee54e7117afbc2f8dd58

diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
index c46a3bb..f22dbef 100644
--- a/drivers/media/video/tvaudio.c
+++ b/drivers/media/video/tvaudio.c
@@ -1695,14 +1695,17 @@ static int tvaudio_s_ctrl(struct v4l2_subdev *sd,
        case V4L2_CID_AUDIO_BALANCE:
        {
                int volume, balance;
+
                if (!(desc->flags & CHIP_HAS_VOLUME))
                        break;
 
-               volume = max(chip->left,chip->right);
+               volume = max(chip->left, chip->right);
                balance = ctrl->value;
+               chip->left = (min(65536 - balance, 32768) * volume) / 32768;
+               chip->right = (min(balance, volume * (__u16)32768)) / 32768;
 
-               chip_write(chip,desc->leftreg,desc->volfunc(chip->left));
-               chip_write(chip,desc->rightreg,desc->volfunc(chip->right));
+               chip_write(chip, desc->leftreg, desc->volfunc(chip->left));
+               chip_write(chip, desc->rightreg, desc->volfunc(chip->right));
 
                return 0;
        }

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to