diff options
author | Gerd Knorr <devnull@localhost> | 2004-04-15 10:41:30 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-04-15 10:41:30 +0000 |
commit | 780071505e7011fe71ab81c9a1a5ea2458c958d6 (patch) | |
tree | 214df315a9964f95d1947ffdef0c822af4eb211e /linux/drivers/media/video | |
parent | 1bc6f4b012b018662a27554f110aac1a986111e2 (diff) | |
download | mediapointer-dvb-s2-780071505e7011fe71ab81c9a1a5ea2458c958d6.tar.gz mediapointer-dvb-s2-780071505e7011fe71ab81c9a1a5ea2458c958d6.tar.bz2 |
- cx88: reverse volume control scale (high values == loud).
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-video.c | 8 |
1 files changed, 7 insertions, 1 deletions
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); |