88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * CDDL HEADER START
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * The contents of this file are subject to the terms of the
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Common Development and Distribution License (the "License").
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * You may not use this file except in compliance with the License.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * or http://www.opensolaris.org/os/licensing.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * See the License for the specific language governing permissions
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * and limitations under the License.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * When distributing Covered Code, include this CDDL HEADER in each
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * If applicable, add the following below this CDDL HEADER, with the
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * fields enclosed by brackets "[]" replaced with your own identifying
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * information: Portions Copyright [yyyy] [name of copyright owner]
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * CDDL HEADER END
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Copyright (C) 4Front Technologies 1996-2008.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Use is subject to license terms.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * These are the ioctl calls for all Solaris /dev/dsp and /dev/mixer audio
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Note that the contents of this file include definitions which exist
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * primarily for compatibility. Many of the defines here are not
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * actually implemented, but exist solely to facilitate compilation of
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * programs from other operating systems. Other definitions here may
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * not be fully supported or may otherwise be obsolete. There are many
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * things in this file which should not be used on SunOS.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Please read the documentation to determine which portions of the
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * API are fully supported and recommended for use in new
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * applications.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Buffer status queries.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * SNDCTL_DSP_GETOSPACE and SNDCTL_DSP_GETISPACE
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int fragments; /* # of available fragments */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int fragstotal; /* Total # of fragments allocated */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int fragsize; /* Size of a fragment in bytes */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore /* Note! 'bytes' could be more than fragments*fragsize */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Sync groups for audio devices.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * SNDCTL_DSP_SYNCGROUP and SNDCTL_DSP_SYNCSTART
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * SNDCTL_DSP_GETERROR
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * SNDCTL_DSP_GETIPTR and SNDCTL_DSP_GETOPTR
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore unsigned int bytes; /* Total # of bytes processed */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int blocks; /* # of fragment transitions since last time */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * SNDCTL_DSP_CURENT_IPTR and SNDCTL_DSP_CURRENT_OPTR
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amoretypedef struct {
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int fifo_samples; /* Samples in device FIFO */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * SNDCTL_DSP_GET_RECSRC_NAMES and SNDCTL_DSP_GET_PLAYTGT_NAMES
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Digital interface (S/PDIF) control interface
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * SNDCTL_DSP_READCTL and SNDCTL_DSP_WRITECTL
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define VAL_OUTMASK (VAL_CBITOUT|VAL_UBITOUT|VAL_ORATE|VAL_OUTBITS|VAL_OUTSEL)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define OUTSEL_BOTH (OUTSEL_DIGITAL|OUTSEL_ANALOG)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int in_data; /* Audio/data if autodetectable by receiver */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore unsigned int in_errors; /* Various input error conditions */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * The "new" mixer API.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * This improved mixer API makes it possible to access every possible feature
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * of every possible device. However you should read the mixer programming
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * section of the OSS API Developer's Manual. There is no chance that you
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * could use this interface correctly just by examining this header.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int openedaudio[8]; /* Mask of audio devices are busy */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int numsynths; /* NOT SUPPORTED, always 0 */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int numtimers; /* NOT SUPPORTED, always 0 */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int openedmidi[8]; /* Mask of midi devices are busy */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int numcards; /* Number of sound cards in the system */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int numaudioengines; /* Number of audio engines in the system */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore char license[16]; /* E.g. "GPL" or "CDDL" */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore char revision_info[256]; /* For internal use */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_DEVROOT 0 /* Device root entry */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_ENUM 3 /* Enumerated (0 to maxvalue) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_MONOSLIDER 4 /* Mono slider (0 to 255) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_STEREOSLIDER 5 /* Stereo slider (dual 0 to 255) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_MESSAGE 6 /* (Readable) textual message */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_MONOVU 7 /* VU meter value (mono) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_STEREOVU 8 /* VU meter value (stereo) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_MONOPEAK 9 /* VU meter peak value (mono) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_STEREOPEAK 10 /* VU meter peak value (stereo) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_RADIOGROUP 11 /* Radio button group */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_MARKER 12 /* Separator between entries */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_VALUE 13 /* Decimal value entry */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_HEXVALUE 14 /* Hexadecimal value entry */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_SLIDER 17 /* Slider (mono, 31 bit int range) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_MONOSLIDER16 19 /* Mono slider (0-32767) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXT_STEREOSLIDER16 20 /* Stereo slider (dual 0-32767) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore /* Possible value range (minvalue to maxvalue) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore /* Note that maxvalue may also be smaller than minvalue */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_READABLE 0x00000001 /* Has readable value */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_WRITEABLE 0x00000002 /* Has writeable value */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_POLL 0x00000004 /* May change itself */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_STRING 0x00000010 /* Use dynamic extensions for value */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_DYNAMIC 0x00000010 /* Supports dynamic extensions */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_OKFAIL 0x00000020 /* Interpret value as 1=OK, 0=FAIL */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_FLAT 0x00000040 /* NOT SUPPORTED */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_LEGACY 0x00000080 /* NOT SUPPORTED */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_CENTIBEL 0x00000100 /* Centibel (0.1 dB) step size */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_DECIBEL 0x00000200 /* Step size of 1 dB */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_MAINVOL 0x00000400 /* Main volume control */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_PCMVOL 0x00000800 /* PCM output volume control */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_RECVOL 0x00001000 /* PCM recording volume control */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_MONVOL 0x00002000 /* Input->output monitor volume */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_WIDE 0x00004000 /* NOT SUPPORTED */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_DESCR 0x00008000 /* NOT SUPPORTED */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXF_DISABLE 0x00010000 /* Control has been disabled */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore char id[16]; /* Mnemonic ID (internal use) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int parent; /* Entry# of parent (-1 if root) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore char data[64]; /* Misc data (entry type dependent) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore unsigned char enum_present[32]; /* Mask of allowed enum values */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int control_no; /* NOT SUPPORTED, always -1 */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int flags; /* Reserved for future use. Initialize to 0 */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int timestamp; /* Must be set to oss_mixext.timestamp */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int filler[8]; /* Reserved for future use. Initialize to 0 */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amoretypedef char oss_longname_t[OSS_LONGNAME_SIZE];
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amoretypedef char oss_devnode_t[OSS_DEVNODE_SIZE];
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int busy; /* 0, OPEN_READ, OPEN_WRITE, OPEN_READWRITE */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int pid; /* Process ID, not used in SunOS */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int caps; /* PCM_CAP_INPUT, PCM_CAP_OUTPUT */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int oformats; /* Supported output formats */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore char cmd[64]; /* Command using the device (if known) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int legacy_device; /* Obsolete field. Replaced by devnode */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int enabled; /* 1=enabled, 0=device not ready */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int flags; /* internal use only - no practical meaning */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int min_channels; /* Minimum number of channels */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int max_channels; /* Maximum number of channels */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore int binding; /* DSP_BIND_FRONT, etc. 0 means undefined */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define OSS_MAX_SAMPLE_RATES 20 /* Cannot be changed */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore unsigned int nrates; /* Array of supported sample rates */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore oss_longname_t song_name; /* Song name (if given) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore oss_label_t label; /* Device label (if given) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore oss_devnode_t devnode; /* Device special file name (absolute path) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXER_CAP_LAYOUT_B 0x00000002 /* For internal use only */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXER_CAP_NARROW 0x00000004 /* Conserve horiz space */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * The priority field can be used to select the default
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * (motherboard) mixer device. The mixer with the highest
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * priority is the most preferred one. -2 or less means that
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * this device cannot be used as the default mixer.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore oss_devnode_t devnode; /* Device special file name (absolute path) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amoretypedef unsigned short oss_peaks_t[MAX_PEAK_CHANNELS];
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore/* For use with SNDCTL_DSP_GET_CHNORDER */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define CHNORDER_NORMAL 0x0000000087654321ULL
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define OSSIOCPARM_MASK 0x1fff /* parameters must be < 8192 bytes */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define OSSIOC_VOID 0x00000000 /* no parameters */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define OSSIOC_OUT 0x20000000 /* copy out parameters */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define OSSIOC_IN 0x40000000 /* copy in parameters */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define OSSIOC_SZ(t) ((sizeof (t) & OSSIOCPARM_MASK) << 16)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define OSSIOC_GETSZ(x) (((x) >> 16) & OSSIOCPARM_MASK)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define __OSSIO(x, y) ((int)(OSSIOC_VOID|(x<<8)|y))
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define __OSSIOR(x, y, t) ((int)(OSSIOC_OUT|OSSIOC_SZ(t)|(x<<8)|y))
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define __OSSIOW(x, y, t) ((int)(OSSIOC_IN|OSSIOC_SZ(t)|(x<<8)|y))
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define __OSSIOWR(x, y, t) ((int)(OSSIOC_INOUT|OSSIOC_SZ(t)|(x<<8)|y))
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_SYSINFO __OSSIOR('X', 1, oss_sysinfo)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define OSS_SYSINFO SNDCTL_SYSINFO /* Old name */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_MIX_NRMIX __OSSIOR('X', 2, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_MIX_NREXT __OSSIOWR('X', 3, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_MIX_EXTINFO __OSSIOWR('X', 4, oss_mixext)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_MIX_READ __OSSIOWR('X', 5, oss_mixer_value)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_MIX_WRITE __OSSIOWR('X', 6, oss_mixer_value)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_AUDIOINFO __OSSIOWR('X', 7, oss_audioinfo)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_MIX_ENUMINFO __OSSIOWR('X', 8, oss_mixer_enuminfo)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_MIXERINFO __OSSIOWR('X', 10, oss_mixerinfo)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_CARDINFO __OSSIOWR('X', 11, oss_card_info)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_ENGINEINFO __OSSIOWR('X', 12, oss_audioinfo)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_AUDIOINFO_EX __OSSIOWR('X', 13, oss_audioinfo)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_MIX_DESCRIPTION __OSSIOWR('X', 14, oss_mixer_enuminfo)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore/* ioctl codes 'X', 200-255 are reserved for internal use */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Few more "globally" available ioctl calls.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_SETSONG __OSSIOW('Y', 2, oss_longname_t)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_GETSONG __OSSIOR('Y', 2, oss_longname_t)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_SETNAME __OSSIOW('Y', 3, oss_longname_t)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_SETLABEL __OSSIOW('Y', 4, oss_label_t)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_GETLABEL __OSSIOR('Y', 4, oss_label_t)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * IOCTL commands for /dev/dsp
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_RESET SNDCTL_DSP_HALT /* Old name */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_SPEED __OSSIOWR('P', 2, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_STEREO __OSSIOWR('P', 3, int) /* OBSOLETE */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GETBLKSIZE __OSSIOWR('P', 4, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_SAMPLESIZE SNDCTL_DSP_SETFMT
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_CHANNELS __OSSIOWR('P', 6, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_SUBDIVIDE __OSSIOWR('P', 9, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_SETFRAGMENT __OSSIOWR('P', 10, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GETFMTS __OSSIOR('P', 11, int) /* Returns a mask */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_SETFMT __OSSIOWR('P', 5, int) /* Selects ONE fmt */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GETOSPACE __OSSIOR('P', 12, audio_buf_info)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GETISPACE __OSSIOR('P', 13, audio_buf_info)
260256302ac564fcfed9ebfa5a6c98a2e6ef3808Garrett D'Amore#define SNDCTL_DSP_NONBLOCK __OSSIO('P', 14) /* Obsolete */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GETCAPS __OSSIOR('P', 15, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GETTRIGGER __OSSIOR('P', 16, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_SETTRIGGER __OSSIOW('P', 16, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GETIPTR __OSSIOR('P', 17, count_info)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GETOPTR __OSSIOR('P', 18, count_info)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_SETSYNCRO __OSSIO('P', 21)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_SETDUPLEX __OSSIO('P', 22)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_PROFILE __OSSIOW('P', 23, int) /* OBSOLETE */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define APF_NORMAL 0 /* Normal applications */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define APF_NETWORK 1 /* Underruns caused by "external" delay */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define APF_CPUINTENS 2 /* Underruns caused by "overheating" the CPU */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GETODELAY __OSSIOR('P', 23, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GETPLAYVOL __OSSIOR('P', 24, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_SETPLAYVOL __OSSIOWR('P', 24, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GETERROR __OSSIOR('P', 25, audio_errinfo)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_READCTL __OSSIOWR('P', 26, oss_digital_control)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_WRITECTL __OSSIOWR('P', 27, oss_digital_control)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_SYNCGROUP __OSSIOWR('P', 28, oss_syncgroup)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_SYNCSTART __OSSIOW('P', 29, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_COOKEDMODE __OSSIOW('P', 30, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_HALT_INPUT __OSSIO('P', 33)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_RESET_INPUT SNDCTL_DSP_HALT_INPUT /* Old name */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_HALT_OUTPUT __OSSIO('P', 34)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_RESET_OUTPUT SNDCTL_DSP_HALT_OUTPUT /* Old name */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_LOW_WATER __OSSIOW('P', 34, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_CURRENT_IPTR __OSSIOR('P', 35, oss_count_t)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_CURRENT_OPTR __OSSIOR('P', 36, oss_count_t)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GET_RECSRC_NAMES __OSSIOR('P', 37, oss_mixer_enuminfo)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GET_RECSRC __OSSIOR('P', 38, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_SET_RECSRC __OSSIOWR('P', 38, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GET_PLAYTGT_NAMES __OSSIOR('P', 39, oss_mixer_enuminfo)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GET_PLAYTGT __OSSIOR('P', 40, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_SET_PLAYTGT __OSSIOWR('P', 40, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GETRECVOL __OSSIOR('P', 41, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_SETRECVOL __OSSIOWR('P', 41, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GET_CHNORDER __OSSIOR('P', 42, unsigned long long)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_SET_CHNORDER __OSSIOWR('P', 42, unsigned long long)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GETIPEAKS __OSSIOR('P', 43, oss_peaks_t)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GETOPEAKS __OSSIOR('P', 44, oss_peaks_t)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_POLICY __OSSIOW('P', 45, int) /* See the manual */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_GETCHANNELMASK __OSSIOWR('P', 64, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_DSP_BIND_CHANNEL __OSSIOWR('P', 65, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * These definitions are here for the benefit of compiling application
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * code. Most of these are NOT implemented in the Solaris code,
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * however. This is the older 3.x OSS API, and only the master input and
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * output levels are actually supported.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_IMIX 9 /* Recording monitor */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_RECLEV 11 /* Recording level */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_IGAIN 12 /* Input gain */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_OGAIN 13 /* Output gain */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_LINE1 14 /* Input source 1 (aux1) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_LINE2 15 /* Input source 2 (aux2) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_LINE3 16 /* Input source 3 (line) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_DIGITAL1 17 /* Digital I/O 1 */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_DIGITAL2 18 /* Digital I/O 2 */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_DIGITAL3 19 /* Digital I/O 3 */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_MONO 21 /* Mono Output */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_VIDEO 22 /* Video/TV (audio) in */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_DEPTH 24 /* Surround depth */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_REARVOL 25 /* Rear/Surround speaker vol */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_CENTERVOL 26 /* Center/LFE speaker vol */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_SIDEVOL 27 /* Side-Surround (8speaker) vol */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_SURRVOL SOUND_MIXER_SIDEVOL
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_RECSRC 0xff /* Recording sources */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_DEVMASK 0xfe /* Supported devices */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_RECMASK 0xfd /* Recording sources */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_CAPS 0xfc /* Mixer capabilities (do not use) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_STEREODEVS 0xfb /* Mixer channels supporting stereo */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_VOLUME (1 << SOUND_MIXER_VOLUME)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_BASS (1 << SOUND_MIXER_BASS)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_TREBLE (1 << SOUND_MIXER_TREBLE)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_SYNTH (1 << SOUND_MIXER_SYNTH)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_PCM (1 << SOUND_MIXER_PCM)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_SPEAKER (1 << SOUND_MIXER_SPEAKER)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_LINE (1 << SOUND_MIXER_LINE)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_MIC (1 << SOUND_MIXER_MIC)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_IMIX (1 << SOUND_MIXER_IMIX)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_ALTPCM (1 << SOUND_MIXER_ALTPCM)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_RECLEV (1 << SOUND_MIXER_RECLEV)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_IGAIN (1 << SOUND_MIXER_IGAIN)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_OGAIN (1 << SOUND_MIXER_OGAIN)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_LINE1 (1 << SOUND_MIXER_LINE1)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_LINE2 (1 << SOUND_MIXER_LINE2)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_LINE3 (1 << SOUND_MIXER_LINE3)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_DIGITAL1 (1 << SOUND_MIXER_DIGITAL1)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_DIGITAL2 (1 << SOUND_MIXER_DIGITAL2)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_DIGITAL3 (1 << SOUND_MIXER_DIGITAL3)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_MONO (1 << SOUND_MIXER_MONO)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_PHONE (1 << SOUND_MIXER_PHONE)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_RADIO (1 << SOUND_MIXER_RADIO)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_VIDEO (1 << SOUND_MIXER_VIDEO)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_DEPTH (1 << SOUND_MIXER_DEPTH)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_REARVOL (1 << SOUND_MIXER_REARVOL)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_CENTERVOL (1 << SOUND_MIXER_CENTERVOL)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_SIDEVOL (1 << SOUND_MIXER_SIDEVOL)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_SURRVOL SOUND_MASK_SIDEVOL
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_MUTE (1 << SOUND_MIXER_MUTE)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_ENHANCE (1 << SOUND_MIXER_ENHANCE)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MASK_LOUD (1 << SOUND_MIXER_LOUD)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Again, DO NOT USE the following two macros. They are here for SOURCE
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * COMPATIBILITY ONLY.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore "Vol ", "Bass ", "Treble", "Synth", "Pcm ", "Speaker ", "Line ", \
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore "Mic ", "CD ", "Mix ", "Pcm2 ", "Rec ", "IGain", "OGain", \
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore "Aux1", "Aux2", "Aux3", "Digital1", "Digital2", "Digital3", \
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore "Phone", "Mono", "Video", "Radio", "Depth", \
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore "vol", "bass", "treble", "synth", "pcm", "speaker", "line", \
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain", \
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore "aux1", "aux2", "aux3", "dig1", "dig2", "dig3", \
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore "phone", "mono", "video", "radio", "depth", \
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXER_READ(dev) __OSSIOR('M', dev, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define MIXER_WRITE(dev) __OSSIOWR('M', dev, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_INFO __OSSIOR('M', 101, mixer_info)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define OSS_GETVERSION __OSSIOR('M', 118, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * These macros are useful for some applications. They are implemented
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * as soft values for the application, and do not affect real hardware.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_VOLUME MIXER_READ(SOUND_MIXER_VOLUME)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_OGAIN MIXER_READ(SOUND_MIXER_OGAIN)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_PCM MIXER_READ(SOUND_MIXER_PCM)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_IGAIN MIXER_READ(SOUND_MIXER_IGAIN)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_RECLEV MIXER_READ(SOUND_MIXER_RECLEV)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_RECSRC MIXER_READ(SOUND_MIXER_RECSRC)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_DEVMASK MIXER_READ(SOUND_MIXER_DEVMASK)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_RECMASK MIXER_READ(SOUND_MIXER_RECMASK)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_CAPS MIXER_READ(SOUND_MIXER_CAPS)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_STEREODEVS MIXER_READ(SOUND_MIXER_STEREODEVS)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_RECGAIN __OSSIOR('M', 119, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_MONGAIN __OSSIOR('M', 120, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_VOLUME MIXER_WRITE(SOUND_MIXER_VOLUME)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_OGAIN MIXER_WRITE(SOUND_MIXER_OGAIN)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_PCM MIXER_WRITE(SOUND_MIXER_PCM)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_IGAIN MIXER_WRITE(SOUND_MIXER_IGAIN)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_RECLEV MIXER_WRITE(SOUND_MIXER_RECLEV)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_RECSRC MIXER_WRITE(SOUND_MIXER_RECSRC)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_RECGAIN __OSSIOWR('M', 119, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_MONGAIN __OSSIOWR('M', 120, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * These macros are here for source compatibility. They intentionally don't
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * map to any real hardware. NOT SUPPORTED!
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_BASS MIXER_READ(SOUND_MIXER_BASS)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_TREBLE MIXER_READ(SOUND_MIXER_TREBLE)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_SYNTH MIXER_READ(SOUND_MIXER_SYNTH)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_SPEAKER MIXER_READ(SOUND_MIXER_SPEAKER)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_LINE MIXER_READ(SOUND_MIXER_LINE)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_MIC MIXER_READ(SOUND_MIXER_MIC)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_CD MIXER_READ(SOUND_MIXER_CD)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_IMIX MIXER_READ(SOUND_MIXER_IMIX)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_ALTPCM MIXER_READ(SOUND_MIXER_ALTPCM)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_LINE1 MIXER_READ(SOUND_MIXER_LINE1)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_LINE2 MIXER_READ(SOUND_MIXER_LINE2)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_READ_LINE3 MIXER_READ(SOUND_MIXER_LINE3)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_BASS MIXER_WRITE(SOUND_MIXER_BASS)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_TREBLE MIXER_WRITE(SOUND_MIXER_TREBLE)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_SYNTH MIXER_WRITE(SOUND_MIXER_SYNTH)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_SPEAKER MIXER_WRITE(SOUND_MIXER_SPEAKER)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_LINE MIXER_WRITE(SOUND_MIXER_LINE)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_MIC MIXER_WRITE(SOUND_MIXER_MIC)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_CD MIXER_WRITE(SOUND_MIXER_CD)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_IMIX MIXER_WRITE(SOUND_MIXER_IMIX)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_ALTPCM MIXER_WRITE(SOUND_MIXER_ALTPCM)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_LINE1 MIXER_WRITE(SOUND_MIXER_LINE1)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_LINE2 MIXER_WRITE(SOUND_MIXER_LINE2)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SOUND_MIXER_WRITE_LINE3 MIXER_WRITE(SOUND_MIXER_LINE3)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Audio encoding types (Note! U8=8 and S16_LE=16 for compatibility)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define AFMT_QUERY 0x00000000 /* Return current fmt */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define AFMT_MPEG 0x00000200 /* NOT SUPPORTED: MPEG (2) audio */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define AFMT_AC3 0x00000400 /* NOT SUPPORTED: AC3 compressed */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define AFMT_VORBIS 0x00000800 /* NOT SUPPORTED: Ogg Vorbis */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define AFMT_FLOAT 0x00004000 /* NOT SUPPORTED: IEEE double float */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define AFMT_S24_LE 0x00008000 /* LSB aligned in 32 bit word */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define AFMT_S24_BE 0x00010000 /* LSB aligned in 32 bit word */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define AFMT_SPDIF_RAW 0x00020000 /* NOT SUPPORTED: Raw S/PDIF frames */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define AFMT_S24_PACKED 0x00040000 /* 24 bit packed little endian */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Some big endian/little endian handling macros (native endian and
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * opposite endian formats).
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * SNDCTL_DSP_GETCAPS bits
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_REVISION 0x000000ff /* Revision level (0 to 255) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_DUPLEX 0x00000100 /* Full duplex rec/play */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_REALTIME 0x00000200 /* NOT SUPPORTED */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_BATCH 0x00000400 /* NOT SUPPORTED */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_COPROC 0x00000800 /* NOT SUPPORTED */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_TRIGGER 0x00001000 /* Supports SETTRIGGER */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_MMAP 0x00002000 /* Supports mmap() */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_MULTI 0x00004000 /* Supports multiple open */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_BIND 0x00008000 /* Supports channel binding */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_INPUT 0x00010000 /* Supports recording */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_OUTPUT 0x00020000 /* Supports playback */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_VIRTUAL 0x00040000 /* Virtual device */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_ANALOGOUT 0x00100000 /* NOT SUPPORTED */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_ANALOGIN 0x00200000 /* NOT SUPPORTED */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_DIGITALOUT 0x00400000 /* NOT SUPPORTED */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_DIGITALIN 0x00800000 /* NOT SUPPORTED */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_ADMASK 0x00f00000 /* NOT SUPPORTED */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_SHADOW 0x01000000 /* "Shadow" device */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_CH_MASK 0x06000000 /* See DSP_CH_MASK below */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_HIDDEN 0x08000000 /* NOT SUPPORTED */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_MODEM 0x20000000 /* NOT SUPPORTED */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define PCM_CAP_DEFAULT 0x40000000 /* "Default" device */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Preferred channel usage. These bits can be used to give
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * recommendations to the application. Used by few drivers. For
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * example if ((caps & DSP_CH_MASK) == DSP_CH_MONO) means that the
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * device works best in mono mode. However it doesn't necessarily mean
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * that the device cannot be used in stereo. These bits should only be
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * used by special applications such as multi track hard disk
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * recorders to find out the initial setup. However the user should be
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * able to override this selection.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * To find out which modes are actually supported the application
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * should try to select them using SNDCTL_DSP_CHANNELS.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define DSP_CH_ANY 0x00000000 /* No preferred mode */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define DSP_CH_MULTI 0x06000000 /* More than two channels */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * The PCM_CAP_* capability names used to be known as DSP_CAP_*, so
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * it's necessary to define the older names too.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define DSP_CAP_DIGITALOUT PCM_CAP_DIGITALOUT
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * SNDCTL_DSP_GETTRIGGER and SNDCTL_DSP_SETTRIGGER
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * SNDCTL_DSP_BIND_CHANNEL
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * SOUND_MIXER_READ_CAPS
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * The following ioctl is for internal use only -- it is used to
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * coordinate /dev/sndstat numbering with file names in /dev/sound.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Applications must not use it. (This is duplicated in sys/audioio.h
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define SNDCTL_SUN_SEND_NUMBER __OSSIOW('X', 200, int)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#endif /* _SYS_AUDIO_OSS_H */