summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci/av7110.c
diff options
context:
space:
mode:
authorHolger Waechtler <devnull@localhost>2003-03-19 11:32:04 +0000
committerHolger Waechtler <devnull@localhost>2003-03-19 11:32:04 +0000
commit8ebcde35b194c3d931f9387fc3cf430e4ccad026 (patch)
treed91531ae7118c4aedd7ef216c5284f4531931fbb /linux/drivers/media/dvb/ttpci/av7110.c
parentc46bb51b9727222c179fba7ffb0b0d7df7eb28a1 (diff)
downloadmediapointer-dvb-s2-8ebcde35b194c3d931f9387fc3cf430e4ccad026.tar.gz
mediapointer-dvb-s2-8ebcde35b194c3d931f9387fc3cf430e4ccad026.tar.bz2
scale volume settings conforming to the TLC320AD80C data sheet,
thanks to Thomas Breuer <tb@tb-electronic.de> for analyzing this!!
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110.c')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index 6cc8bcfe4..39ef32abe 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -1333,14 +1333,13 @@ SetVolume(av7110_t *av7110, int volleft, int volright)
switch (av7110->adac_type) {
case DVB_ADAC_TI:
- volleft=(volleft*256)/946;
- volright=(volright*256)/946;
- if (volleft > 0x45)
- volleft=0x45;
- if (volright > 0x45)
- volright=0x45;
- err=SendDAC(av7110, 3, 0x80 + volleft);
- if (err)
+ volleft = (volleft * 256) / 1036;
+ volright = (volright * 256) / 1036;
+ if (volleft > 0x3f)
+ volleft = 0x3f;
+ if (volright > 0x3f)
+ volright = 0x3f;
+ if ((err = SendDAC(av7110, 3, 0x80 + volleft)))
return err;
return SendDAC(av7110, 4, volright);