summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pcm/ac97.c
diff options
context:
space:
mode:
authorcg <cg@FreeBSD.org>1999-11-21 17:15:12 +0000
committercg <cg@FreeBSD.org>1999-11-21 17:15:12 +0000
commitf4b7f8d09b4a52e7744e3b676115d1e1b5dfe30e (patch)
treef3d65b7c386ddcf082e07c1747ee8143653ce921 /sys/dev/sound/pcm/ac97.c
parent0544825ea8fdb04f31b9361cde1db9a729292937 (diff)
downloadFreeBSD-src-f4b7f8d09b4a52e7744e3b676115d1e1b5dfe30e.zip
FreeBSD-src-f4b7f8d09b4a52e7744e3b676115d1e1b5dfe30e.tar.gz
fix for -fno-builtin
PR: kern/14278
Diffstat (limited to 'sys/dev/sound/pcm/ac97.c')
-rw-r--r--sys/dev/sound/pcm/ac97.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c
index dfb1e1c..7785436 100644
--- a/sys/dev/sound/pcm/ac97.c
+++ b/sys/dev/sound/pcm/ac97.c
@@ -178,7 +178,7 @@ ac97_setmixer(struct ac97_info *codec, unsigned channel, unsigned left, unsigned
{
struct ac97mixtable_entry *e = &codec->mix[channel];
if (e->reg != 0) {
- int max, val;
+ int max, val, reg = (e->reg >= 0)? e->reg : -e->reg;
if (!e->stereo) right = left;
if (e->reg > 0) {
@@ -209,7 +209,7 @@ ac97_setmixer(struct ac97_info *codec, unsigned channel, unsigned left, unsigned
}
}
if (left == 0 && right == 0 && e->mute == 1) val = AC97_MUTE;
- codec->write(codec->devinfo, abs(e->reg), val);
+ codec->write(codec->devinfo, reg, val);
return left | (right << 8);
} else return -1;
}
OpenPOWER on IntegriCloud