Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/dev/pad Pull up following revision(s) (requested by n...
details: https://anonhg.NetBSD.org/src/rev/801b8298dc9e
branches: netbsd-8
changeset: 435287:801b8298dc9e
user: martin <martin%NetBSD.org@localhost>
date: Wed Oct 03 17:50:57 2018 +0000
description:
Pull up following revision(s) (requested by nakayama in ticket #1044):
sys/dev/pad/pad.c: revision 1.58
pad(4) mixer has only 1 channel, so return EINVAL in the case other than 1.
This fixes the following strange output of mixerctl(1):
outputs.master=255,0
inputs.dac=255,0
diffstat:
sys/dev/pad/pad.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r 61b2cf014ea3 -r 801b8298dc9e sys/dev/pad/pad.c
--- a/sys/dev/pad/pad.c Wed Oct 03 17:49:06 2018 +0000
+++ b/sys/dev/pad/pad.c Wed Oct 03 17:50:57 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pad.c,v 1.32.2.2 2017/12/23 18:48:41 snj Exp $ */
+/* $NetBSD: pad.c,v 1.32.2.3 2018/10/03 17:50:57 martin Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.32.2.2 2017/12/23 18:48:41 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.32.2.3 2018/10/03 17:50:57 martin Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -572,6 +572,8 @@
switch (mc->dev) {
case PAD_OUTPUT_MASTER_VOLUME:
case PAD_INPUT_DAC_VOLUME:
+ if (mc->un.value.num_channels != 1)
+ return EINVAL;
sc->sc_swvol = mc->un.value.level[AUDIO_MIXER_LEVEL_MONO];
return 0;
}
@@ -591,6 +593,8 @@
switch (mc->dev) {
case PAD_OUTPUT_MASTER_VOLUME:
case PAD_INPUT_DAC_VOLUME:
+ if (mc->un.value.num_channels != 1)
+ return EINVAL;
mc->un.value.level[AUDIO_MIXER_LEVEL_MONO] = sc->sc_swvol;
return 0;
}
Home |
Main Index |
Thread Index |
Old Index