mixer.h revision 139749
1139749Simp/*-
2119853Scg * Copyright (c) 1999 Cameron Grant <cg@freebsd.org>
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 139749 2005-01-06 01:43:34Z imp $
2750724Scg */
2850724Scg
2974763Scgint mixer_init(device_t dev, kobj_class_t cls, void *devinfo);
3074763Scgint mixer_uninit(device_t dev);
3174763Scgint mixer_reinit(device_t dev);
32130585Sphkint mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td);
3350724Scg
3470944Sjhbint mixer_hwvol_init(device_t dev);
3570944Sjhbvoid mixer_hwvol_mute(device_t dev);
3670944Sjhbvoid mixer_hwvol_step(device_t dev, int left_step, int right_step);
3770618Sjhb
3874763Scgvoid mix_setdevs(struct snd_mixer *m, u_int32_t v);
3974763Scgvoid mix_setrecdevs(struct snd_mixer *m, u_int32_t v);
4074763Scgu_int32_t mix_getdevs(struct snd_mixer *m);
4174763Scgu_int32_t mix_getrecdevs(struct snd_mixer *m);
4274763Scgvoid *mix_getdevinfo(struct snd_mixer *m);
4350724Scg
4474763Scg/*
4574763Scg * this is a kludge to allow hiding of the struct snd_mixer definition
4674763Scg * 512 should be enough for all architectures
4774763Scg */
4874763Scg#define	MIXER_SIZE	(512 + sizeof(struct kobj))
4970134Scg
5074763Scg#define MIXER_DECLARE(name) DEFINE_CLASS(name, name ## _methods, MIXER_SIZE)
51