diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2020-04-30 12:43:33 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2020-04-30 12:43:33 +0000 |
commit | f44ff0823bd06d872b69b972c27a17258da0bebd (patch) | |
tree | a846d1dbcc590e96d7b43afbd6d934b73e01fa2e /sys/dev/usb | |
parent | 886c085ac2d5880ef2cb5531c29a15f50c08837f (diff) |
Use "inputs" class instead of "record"
There's no reliable way to decide whether a control must belong
to "inputs" or to "record". In other words both classes were
used for the same thing. Furthermore we've no "play" class which
tends to make things more confusing.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/uaudio.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c index 7119b2299f8..caaf42b9049 100644 --- a/sys/dev/usb/uaudio.c +++ b/sys/dev/usb/uaudio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uaudio.c,v 1.156 2020/04/30 12:41:39 ratchov Exp $ */ +/* $OpenBSD: uaudio.c,v 1.157 2020/04/30 12:43:32 ratchov Exp $ */ /* * Copyright (c) 2018 Alexandre Ratchov <alex@caoua.org> * @@ -230,10 +230,9 @@ struct uaudio_softc { struct uaudio_ranges rates; /* mixer(4) bits */ -#define UAUDIO_CLASS_REC 0 -#define UAUDIO_CLASS_OUT 1 -#define UAUDIO_CLASS_IN 2 -#define UAUDIO_CLASS_COUNT 3 +#define UAUDIO_CLASS_OUT 0 +#define UAUDIO_CLASS_IN 1 +#define UAUDIO_CLASS_COUNT 2 int mixer_class; struct uaudio_mixent { struct uaudio_mixent *next; @@ -2164,7 +2163,7 @@ uaudio_process_ac(struct uaudio_softc *sc, struct uaudio_blob *p, int ifnum) if (u->type != UAUDIO_AC_FEATURE) continue; if (uaudio_setname_dsts(sc, u, UAUDIO_NAME_REC)) { - u->mixer_class = UAUDIO_CLASS_REC; + u->mixer_class = UAUDIO_CLASS_IN; continue; } if (uaudio_setname_srcs(sc, u, UAUDIO_NAME_PLAY)) { @@ -4303,11 +4302,6 @@ uaudio_query_devinfo(void *arg, struct mixer_devinfo *devinfo) devinfo->next = -1; devinfo->prev = -1; switch (devinfo->index) { - case UAUDIO_CLASS_REC: - strlcpy(devinfo->label.name, AudioCrecord, MAX_AUDIO_DEV_LEN); - devinfo->type = AUDIO_MIXER_CLASS; - devinfo->mixer_class = -1; - return 0; case UAUDIO_CLASS_IN: strlcpy(devinfo->label.name, AudioCinputs, MAX_AUDIO_DEV_LEN); devinfo->type = AUDIO_MIXER_CLASS; |