mixer.h revision 160385
1123992Ssobomax/*- 2103026Ssobomax * Copyright (c) 1999 Cameron Grant <cg@freebsd.org> 3103026Ssobomax * All rights reserved. 4103026Ssobomax * 5103026Ssobomax * Redistribution and use in source and binary forms, with or without 6103026Ssobomax * modification, are permitted provided that the following conditions 7103026Ssobomax * are met: 8103026Ssobomax * 1. Redistributions of source code must retain the above copyright 9103026Ssobomax * notice, this list of conditions and the following disclaimer. 10103026Ssobomax * 2. Redistributions in binary form must reproduce the above copyright 11103026Ssobomax * notice, this list of conditions and the following disclaimer in the 12103026Ssobomax * documentation and/or other materials provided with the distribution. 13103026Ssobomax * 14103026Ssobomax * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15103026Ssobomax * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16103026Ssobomax * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17103026Ssobomax * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18103026Ssobomax * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19103026Ssobomax * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20103026Ssobomax * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21103026Ssobomax * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22103026Ssobomax * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23103026Ssobomax * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24103026Ssobomax * SUCH DAMAGE. 25103026Ssobomax * 26103026Ssobomax * $FreeBSD: head/sys/dev/sound/pcm/mixer.h 160385 2006-07-15 20:11:16Z netchild $ 27103026Ssobomax */ 28103026Ssobomax 29103026Ssobomaxint mixer_init(device_t dev, kobj_class_t cls, void *devinfo); 30103026Ssobomaxint mixer_uninit(device_t dev); 31103026Ssobomaxint mixer_reinit(device_t dev); 32103026Ssobomaxint mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td); 33103026Ssobomax 34103026Ssobomaxint mixer_hwvol_init(device_t dev); 35103026Ssobomaxvoid mixer_hwvol_mute(device_t dev); 36103026Ssobomaxvoid mixer_hwvol_step(device_t dev, int left_step, int right_step); 37103026Ssobomax 38103026Ssobomaxvoid mix_setdevs(struct snd_mixer *m, u_int32_t v); 39103026Ssobomaxvoid mix_setrecdevs(struct snd_mixer *m, u_int32_t v); 40103026Ssobomaxu_int32_t mix_getdevs(struct snd_mixer *m); 41103026Ssobomaxu_int32_t mix_getrecdevs(struct snd_mixer *m); 42103026Ssobomaxvoid *mix_getdevinfo(struct snd_mixer *m); 43103026Ssobomax 44103026Ssobomax/* 45103026Ssobomax * this is a kludge to allow hiding of the struct snd_mixer definition 46103026Ssobomax * 512 should be enough for all architectures 47103026Ssobomax */ 48103026Ssobomax#define MIXER_SIZE (512 + sizeof(struct kobj)) 49103394Sbde 50103026Ssobomax#define MIXER_DECLARE(name) static DEFINE_CLASS(name, name ## _methods, MIXER_SIZE) 51122699Sbms