mixer.h revision 162738
1271093Sbr/*- 2271093Sbr * Copyright (c) 1999 Cameron Grant <cg@freebsd.org> 3271093Sbr * All rights reserved. 4271093Sbr * 5271093Sbr * Redistribution and use in source and binary forms, with or without 6271093Sbr * modification, are permitted provided that the following conditions 7271093Sbr * are met: 8271093Sbr * 1. Redistributions of source code must retain the above copyright 9271093Sbr * notice, this list of conditions and the following disclaimer. 10271093Sbr * 2. Redistributions in binary form must reproduce the above copyright 11271093Sbr * notice, this list of conditions and the following disclaimer in the 12271093Sbr * documentation and/or other materials provided with the distribution. 13271093Sbr * 14271093Sbr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15271093Sbr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16271093Sbr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17271093Sbr * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18271093Sbr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19271093Sbr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20271093Sbr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21271093Sbr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22271093Sbr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23271093Sbr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24271093Sbr * SUCH DAMAGE. 25271093Sbr * 26271093Sbr * $FreeBSD: head/sys/dev/sound/pcm/mixer.h 162738 2006-09-28 17:29:00Z ariff $ 27271093Sbr */ 28271093Sbr 29271093Sbrint mixer_init(device_t dev, kobj_class_t cls, void *devinfo); 30271093Sbrint mixer_uninit(device_t dev); 31271093Sbrint mixer_reinit(device_t dev); 32271093Sbrint mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td); 33271093Sbrint mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi); 34271093Sbr 35271093Sbrint mixer_hwvol_init(device_t dev); 36271093Sbrvoid mixer_hwvol_mute(device_t dev); 37271093Sbrvoid mixer_hwvol_step(device_t dev, int left_step, int right_step); 38271093Sbr 39271093Sbrvoid mix_setdevs(struct snd_mixer *m, u_int32_t v); 40271093Sbrvoid mix_setrecdevs(struct snd_mixer *m, u_int32_t v); 41271093Sbru_int32_t mix_getdevs(struct snd_mixer *m); 42271431Sbru_int32_t mix_getrecdevs(struct snd_mixer *m); 43271431Sbrvoid mix_setparentchild(struct snd_mixer *m, u_int32_t parent, u_int32_t childs); 44271093Sbrvoid mix_setrealdev(struct snd_mixer *m, u_int32_t dev, u_int32_t realdev); 45271093Sbru_int32_t mix_getparent(struct snd_mixer *m, u_int32_t dev); 46271093Sbru_int32_t mix_getchild(struct snd_mixer *m, u_int32_t dev); 47271093Sbrvoid *mix_getdevinfo(struct snd_mixer *m); 48271093Sbr 49271093Sbrextern int mixer_count; 50271093Sbr 51271093Sbr/* 52271093Sbr * this is a kludge to allow hiding of the struct snd_mixer definition 53271093Sbr * 512 should be enough for all architectures 54271093Sbr */ 55271093Sbr#ifdef OSSV4_EXPERIMENT 56271093Sbr# define MIXER_SIZE (512 + sizeof(struct kobj) + \ 57271093Sbr sizeof(oss_mixer_enuminfo)) 58271093Sbr#else 59271093Sbr# define MIXER_SIZE (512 + sizeof(struct kobj)) 60271093Sbr#endif 61271093Sbr 62271093Sbr#define MIXER_DECLARE(name) static DEFINE_CLASS(name, name ## _methods, MIXER_SIZE) 63271093Sbr