From 780071505e7011fe71ab81c9a1a5ea2458c958d6 Mon Sep 17 00:00:00 2001 From: Gerd Knorr Date: Thu, 15 Apr 2004 10:41:30 +0000 Subject: - cx88: reverse volume control scale (high values == loud). --- linux/drivers/media/video/cx88/cx88-video.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index dd2bb6748..bab86d9aa 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -1360,6 +1360,9 @@ static int get_control(struct cx8800_dev *dev, struct v4l2_control *ctl) case V4L2_CID_AUDIO_BALANCE: ctl->value = (value & 0x40) ? (value & 0x3f) : (0x40 - (value & 0x3f)); break; + case V4L2_CID_AUDIO_VOLUME: + ctl->value = 0x3f - (value & 0x3f); + break; default: ctl->value = ((value + (c->off << c->shift)) & c->mask) >> c->shift; break; @@ -1388,6 +1391,9 @@ static int set_control(struct cx8800_dev *dev, struct v4l2_control *ctl) case V4L2_CID_AUDIO_BALANCE: value = (ctl->value < 0x40) ? (0x40 - ctl->value) : ctl->value; break; + case V4L2_CID_AUDIO_VOLUME: + value = 0x3f - (ctl->value & 0x3f); + break; case V4L2_CID_SATURATION: /* special v_sat handling */ v_sat_value = ctl->value - (0x7f - 0x5a); @@ -1419,7 +1425,7 @@ static void init_controls(struct cx8800_dev *dev) }; static struct v4l2_control volume = { .id = V4L2_CID_AUDIO_VOLUME, - .value = 0, + .value = 0x3f, }; set_control(dev,&mute); -- cgit v1.2.3