aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAriff Abdullah <ariff@FreeBSD.org>2007-06-17 16:15:56 +0000
committerAriff Abdullah <ariff@FreeBSD.org>2007-06-17 16:15:56 +0000
commitad8612b97a071e83cec0f23093ea2b3824291a25 (patch)
tree738721a97c09e924bfd17e1cf9bc6bdd4c31b930
parentf3685841464b70256cd350a8287a28182df7a27a (diff)
Notes
-rw-r--r--sys/dev/sound/pcm/sound.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index 1b6b32f2cd76..6e4e093fc86a 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -46,6 +46,11 @@ int snd_unit = -1;
TUNABLE_INT("hw.snd.default_unit", &snd_unit);
#endif
+static int snd_unit_auto = 0;
+TUNABLE_INT("hw.snd.default_auto", &snd_unit_auto);
+SYSCTL_INT(_hw_snd, OID_AUTO, default_auto, CTLFLAG_RW,
+ &snd_unit_auto, 0, "assign default unit to a newly attach device");
+
int snd_maxautovchans = 16;
/* XXX: a tunable implies that we may need more than one sound channel before
the system can change a sysctl (/etc/sysctl.conf), do we really need
@@ -801,7 +806,7 @@ pcm_setstatus(device_t dev, char *str)
pcm_unlock(d);
- if (snd_unit < 0)
+ if (snd_unit < 0 || snd_unit_auto != 0)
snd_unit = device_get_unit(dev);
return (0);