diff --git a/lib/libmixer/mixer.c b/lib/libmixer/mixer.c --- a/lib/libmixer/mixer.c +++ b/lib/libmixer/mixer.c @@ -39,9 +39,6 @@ static int _mixer_readvol(struct mixer *, struct mix_dev *); -/* - * Fetch volume from the device. - */ static int _mixer_readvol(struct mixer *m, struct mix_dev *dev) { @@ -79,7 +76,6 @@ if (strncmp(name, BASEPATH, strlen(BASEPATH)) != 0) { m->unit = -1; } else { - /* `name` is "/dev/mixer" so, we'll use the default unit. */ if (strncmp(name, BASEPATH, strlen(name)) == 0) goto dunit; m->unit = strtol(name + strlen(BASEPATH), NULL, 10); @@ -141,9 +137,6 @@ return (NULL); } -/* - * Free resources and close the mixer. - */ int mixer_close(struct mixer *m) { @@ -208,9 +201,6 @@ return (NULL); } -/* - * Add a mixer control to a device. - */ int mixer_add_ctl(struct mix_dev *parent_dev, int id, const char *name, int (*mod)(struct mix_dev *, void *), @@ -233,7 +223,6 @@ ctl->mod = mod; ctl->print = print; dp = ctl->parent_dev; - /* Make sure the same ID or name doesn't exist already. */ TAILQ_FOREACH(cp, &dp->ctls, ctls) { if (!strncmp(cp->name, name, sizeof(cp->name)) || cp->id == id) { errno = EINVAL; @@ -246,9 +235,6 @@ return (0); } -/* - * Same as `mixer_add_ctl`. - */ int mixer_add_ctl_s(mix_ctl_t *ctl) { @@ -259,9 +245,6 @@ ctl->mod, ctl->print)); } -/* - * Remove a mixer control from a device. - */ int mixer_remove_ctl(mix_ctl_t *ctl) { @@ -280,9 +263,6 @@ return (0); } -/* - * Get a mixer control by id. - */ mix_ctl_t * mixer_get_ctl(struct mix_dev *d, int id) { @@ -297,9 +277,6 @@ return (NULL); } -/* - * Get a mixer control by name. - */ mix_ctl_t * mixer_get_ctl_byname(struct mix_dev *d, const char *name) { @@ -415,10 +392,6 @@ return (0); } -/* - * Get default audio card's number. This is used to open the default mixer - * and set the mixer structure's `f_default` flag. - */ int mixer_get_dunit(void) { @@ -453,10 +426,6 @@ return (0); } -/* - * Get sound device mode (none, play, rec, play+rec). Userland programs can - * use the MIX_MODE_* flags to determine the mode of the device. - */ int mixer_get_mode(int unit) { @@ -472,19 +441,13 @@ return (mode); } -/* - * Get the total number of mixers in the system. - */ int mixer_get_nmixers(void) { struct mixer *m; oss_sysinfo si; - /* - * Open a dummy mixer because we need the `fd` field for the - * `ioctl` to work. - */ + /* Dummy device. */ if ((m = mixer_open(NULL)) == NULL) return (-1); if (ioctl(m->fd, OSS_SYSINFO, &si) < 0) {