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: Nathanial Sloss <nat%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/52781: audioctl can't set output gain
Date: Sun, 29 Apr 2018 07:50:08 +1000
--Boundary-00=_RyO5a9vm59yDUsS
Content-Type: Text/Plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hi,
The attached patch should fix the problem and return the relative gain for the
channel when the audioctl -p 1 play.gain is issued.
To increase the overall master volume mixerctl -w outputs.master will have to
be used though.
Best regards,
Nat
--Boundary-00=_RyO5a9vm59yDUsS
Content-Type: text/x-patch;
charset="ISO-8859-1";
name="aud-gain.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="aud-gain.diff"
Index: audio.c
===================================================================
RCS file: /cvsroot/src/sys/dev/audio.c,v
retrieving revision 1.452
diff -u -p -r1.452 audio.c
--- audio.c 6 Feb 2018 04:39:18 -0000 1.452
+++ audio.c 28 Apr 2018 21:44:39 -0000
@@ -4903,6 +4903,9 @@ audiogetinfo(struct audio_softc *sc, str
au_get_gain(sc, &sc->sc_inports, &r->gain, &r->balance);
au_get_gain(sc, &sc->sc_outports, &p->gain, &p->balance);
+
+ p->gain = vc->sc_swvol;
+ r->gain = vc->sc_recswvol;
}
if (sc->sc_monitor_port != -1 && buf_only_mode == 0) {
--Boundary-00=_RyO5a9vm59yDUsS--
Home |
Main Index |
Thread Index |
Old Index