NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/52781: audioctl can't set output gain
The following reply was made to PR kern/52781; it has been noted by GNATS.
From: Tetsuya Isaki <isaki%pastel-flower.jp@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: kern-bug-people%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/52781: audioctl can't set output gain
Date: Fri, 27 Apr 2018 14:57:07 +0900
This may not critical but is problematic to 8.0 release.
How about revert audio.c 1.354 ?
This revert revives 'audioctl -w play.gain=xxx'.
Meanwhile, it disables audioctl's new software volume control.
But 1) it is able to be done by mixerctl too.
2) audio(4) manpage says that play.gain is shortcut for richer mixer
(= mixerctl).
I think it is better to revert.
Thanks,
---
Tetsuya Isaki <isaki%pastel-flower.jp@localhost / isaki%NetBSD.org@localhost>
Index: audio.c
===================================================================
RCS file: /cvsroot/src/sys/dev/audio.c,v
retrieving revision 1.354
retrieving revision 1.353
diff -u -r1.354 -r1.353
--- audio.c 28 May 2017 21:12:59 -0000 1.354
+++ audio.c 27 May 2017 13:55:58 -0000 1.353
@@ -4734,11 +4734,18 @@
if (error)
goto cleanup;
}
- if (SPECIFIED(p->gain))
- vc->sc_swvol = p->gain;
-
- if (SPECIFIED(r->gain))
- vc->sc_recswvol = r->gain;
+ if (SPECIFIED(p->gain)) {
+ au_get_gain(sc, &sc->sc_outports, &gain, &balance);
+ error = au_set_gain(sc, &sc->sc_outports, p->gain, balance);
+ if (error)
+ goto cleanup;
+ }
+ if (SPECIFIED(r->gain)) {
+ au_get_gain(sc, &sc->sc_inports, &gain, &balance);
+ error = au_set_gain(sc, &sc->sc_inports, r->gain, balance);
+ if (error)
+ goto cleanup;
+ }
if (SPECIFIED_CH(p->balance)) {
au_get_gain(sc, &sc->sc_outports, &gain, &balance);
Home |
Main Index |
Thread Index |
Old Index