mixer.h revision 70944
150724Scg/*
250724Scg * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
350724Scg * All rights reserved.
450724Scg *
550724Scg * Redistribution and use in source and binary forms, with or without
650724Scg * modification, are permitted provided that the following conditions
750724Scg * are met:
850724Scg * 1. Redistributions of source code must retain the above copyright
950724Scg *    notice, this list of conditions and the following disclaimer.
1050724Scg * 2. Redistributions in binary form must reproduce the above copyright
1150724Scg *    notice, this list of conditions and the following disclaimer in the
1250724Scg *    documentation and/or other materials provided with the distribution.
1350724Scg *
1450724Scg * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1550724Scg * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1650724Scg * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1750724Scg * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1850724Scg * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1950724Scg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2050724Scg * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2150724Scg * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2250724Scg * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2350724Scg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2450724Scg * SUCH DAMAGE.
2550724Scg *
2650733Speter * $FreeBSD: head/sys/dev/sound/pcm/mixer.h 70944 2001-01-11 23:26:16Z jhb $
2750724Scg */
2850724Scg
2970134Scgextern int mixer_init(device_t dev, kobj_class_t cls, void *devinfo);
3065340Scgextern int mixer_uninit(device_t dev);
3165340Scgextern int mixer_reinit(device_t dev);
3250724Scgextern int mixer_ioctl(snddev_info *d, u_long cmd, caddr_t arg);
3370134Scgextern int mixer_busy(snd_mixer *m, int busy);
3470134Scgextern int mixer_isbusy(snd_mixer *m);
3550724Scg
3670944Sjhbint mixer_hwvol_init(device_t dev);
3770944Sjhbvoid mixer_hwvol_mute(device_t dev);
3870944Sjhbvoid mixer_hwvol_step(device_t dev, int left_step, int right_step);
3970618Sjhb
4050724Scgextern void change_bits(mixer_tab *t, u_char *regval, int dev, int chn, int newval);
4150724Scg
4250724Scgvoid mix_setdevs(snd_mixer *m, u_int32_t v);
4350724Scgvoid mix_setrecdevs(snd_mixer *m, u_int32_t v);
4450724Scgu_int32_t mix_getdevs(snd_mixer *m);
4550724Scgu_int32_t mix_getrecdevs(snd_mixer *m);
4650724Scgvoid *mix_getdevinfo(snd_mixer *m);
4770134Scg
4870134Scg#define MIXER_DECLARE(name) DEFINE_CLASS(name, name ## _methods, sizeof(snd_mixer))
49