188447a05SGarrett D'Amore /* 288447a05SGarrett D'Amore * CDDL HEADER START 388447a05SGarrett D'Amore * 488447a05SGarrett D'Amore * The contents of this file are subject to the terms of the 588447a05SGarrett D'Amore * Common Development and Distribution License (the "License"). 688447a05SGarrett D'Amore * You may not use this file except in compliance with the License. 788447a05SGarrett D'Amore * 888447a05SGarrett D'Amore * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 988447a05SGarrett D'Amore * or http://www.opensolaris.org/os/licensing. 1088447a05SGarrett D'Amore * See the License for the specific language governing permissions 1188447a05SGarrett D'Amore * and limitations under the License. 1288447a05SGarrett D'Amore * 1388447a05SGarrett D'Amore * When distributing Covered Code, include this CDDL HEADER in each 1488447a05SGarrett D'Amore * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1588447a05SGarrett D'Amore * If applicable, add the following below this CDDL HEADER, with the 1688447a05SGarrett D'Amore * fields enclosed by brackets "[]" replaced with your own identifying 1788447a05SGarrett D'Amore * information: Portions Copyright [yyyy] [name of copyright owner] 1888447a05SGarrett D'Amore * 1988447a05SGarrett D'Amore * CDDL HEADER END 2088447a05SGarrett D'Amore */ 2188447a05SGarrett D'Amore /* 2288447a05SGarrett D'Amore * Copyright (C) 4Front Technologies 1996-2008. 2388447a05SGarrett D'Amore * 2488447a05SGarrett D'Amore * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2588447a05SGarrett D'Amore * Use is subject to license terms. 2688447a05SGarrett D'Amore */ 2788447a05SGarrett D'Amore 2888447a05SGarrett D'Amore 2988447a05SGarrett D'Amore #ifndef _SYS_AUDIO_OSS_H 3088447a05SGarrett D'Amore #define _SYS_AUDIO_OSS_H 3188447a05SGarrett D'Amore 3288447a05SGarrett D'Amore #include <sys/types.h> 3388447a05SGarrett D'Amore #include <sys/time.h> 3488447a05SGarrett D'Amore 3588447a05SGarrett D'Amore /* 3688447a05SGarrett D'Amore * These are the ioctl calls for all Solaris /dev/dsp and /dev/mixer audio 3788447a05SGarrett D'Amore * devices. 3888447a05SGarrett D'Amore * 3988447a05SGarrett D'Amore * Note that the contents of this file include definitions which exist 4088447a05SGarrett D'Amore * primarily for compatibility. Many of the defines here are not 4188447a05SGarrett D'Amore * actually implemented, but exist solely to facilitate compilation of 4288447a05SGarrett D'Amore * programs from other operating systems. Other definitions here may 4388447a05SGarrett D'Amore * not be fully supported or may otherwise be obsolete. There are many 4488447a05SGarrett D'Amore * things in this file which should not be used on SunOS. 4588447a05SGarrett D'Amore * 4688447a05SGarrett D'Amore * Please read the documentation to determine which portions of the 4788447a05SGarrett D'Amore * API are fully supported and recommended for use in new 4888447a05SGarrett D'Amore * applications. 4988447a05SGarrett D'Amore */ 5088447a05SGarrett D'Amore 5188447a05SGarrett D'Amore #ifdef __cplusplus 5288447a05SGarrett D'Amore extern "C" { 5388447a05SGarrett D'Amore #endif 5488447a05SGarrett D'Amore 5588447a05SGarrett D'Amore /* 5688447a05SGarrett D'Amore * Buffer status queries. 5788447a05SGarrett D'Amore * SNDCTL_DSP_GETOSPACE and SNDCTL_DSP_GETISPACE 5888447a05SGarrett D'Amore */ 5988447a05SGarrett D'Amore typedef struct audio_buf_info { 6088447a05SGarrett D'Amore int fragments; /* # of available fragments */ 6188447a05SGarrett D'Amore int fragstotal; /* Total # of fragments allocated */ 6288447a05SGarrett D'Amore int fragsize; /* Size of a fragment in bytes */ 6388447a05SGarrett D'Amore int bytes; /* Available space in bytes */ 6488447a05SGarrett D'Amore /* Note! 'bytes' could be more than fragments*fragsize */ 6588447a05SGarrett D'Amore } audio_buf_info; 6688447a05SGarrett D'Amore 6788447a05SGarrett D'Amore /* 6888447a05SGarrett D'Amore * Sync groups for audio devices. 6988447a05SGarrett D'Amore * SNDCTL_DSP_SYNCGROUP and SNDCTL_DSP_SYNCSTART 7088447a05SGarrett D'Amore */ 7188447a05SGarrett D'Amore typedef struct oss_syncgroup { 7288447a05SGarrett D'Amore int id; 7388447a05SGarrett D'Amore int mode; 7488447a05SGarrett D'Amore int filler[16]; 7588447a05SGarrett D'Amore } oss_syncgroup; 7688447a05SGarrett D'Amore 7788447a05SGarrett D'Amore /* 7888447a05SGarrett D'Amore * SNDCTL_DSP_GETERROR 7988447a05SGarrett D'Amore */ 8088447a05SGarrett D'Amore typedef struct audio_errinfo { 8188447a05SGarrett D'Amore int play_underruns; 8288447a05SGarrett D'Amore int rec_overruns; 8388447a05SGarrett D'Amore unsigned int play_ptradjust; 8488447a05SGarrett D'Amore unsigned int rec_ptradjust; 8588447a05SGarrett D'Amore int play_errorcount; 8688447a05SGarrett D'Amore int rec_errorcount; 8788447a05SGarrett D'Amore int play_lasterror; 8888447a05SGarrett D'Amore int rec_lasterror; 8988447a05SGarrett D'Amore int play_errorparm; 9088447a05SGarrett D'Amore int rec_errorparm; 9188447a05SGarrett D'Amore int filler[16]; 9288447a05SGarrett D'Amore } audio_errinfo; 9388447a05SGarrett D'Amore 9488447a05SGarrett D'Amore /* 9588447a05SGarrett D'Amore * SNDCTL_DSP_GETIPTR and SNDCTL_DSP_GETOPTR 9688447a05SGarrett D'Amore */ 9788447a05SGarrett D'Amore typedef struct count_info { 9888447a05SGarrett D'Amore unsigned int bytes; /* Total # of bytes processed */ 9988447a05SGarrett D'Amore int blocks; /* # of fragment transitions since last time */ 10088447a05SGarrett D'Amore int ptr; /* Current DMA pointer value */ 10188447a05SGarrett D'Amore } count_info; 10288447a05SGarrett D'Amore 10388447a05SGarrett D'Amore /* 10488447a05SGarrett D'Amore * SNDCTL_DSP_CURENT_IPTR and SNDCTL_DSP_CURRENT_OPTR 10588447a05SGarrett D'Amore */ 10688447a05SGarrett D'Amore typedef struct { 10788447a05SGarrett D'Amore long long samples; /* Total # of samples */ 10888447a05SGarrett D'Amore int fifo_samples; /* Samples in device FIFO */ 10988447a05SGarrett D'Amore int filler[32]; /* For future use */ 11088447a05SGarrett D'Amore } oss_count_t; 11188447a05SGarrett D'Amore 11288447a05SGarrett D'Amore /* 11388447a05SGarrett D'Amore * SNDCTL_DSP_GET_RECSRC_NAMES and SNDCTL_DSP_GET_PLAYTGT_NAMES 11488447a05SGarrett D'Amore */ 11588447a05SGarrett D'Amore #define OSS_ENUM_MAXVALUE 255 11688447a05SGarrett D'Amore typedef struct oss_mixer_enuminfo { 11788447a05SGarrett D'Amore int dev; 11888447a05SGarrett D'Amore int ctrl; 11988447a05SGarrett D'Amore int nvalues; 12088447a05SGarrett D'Amore int version; 12188447a05SGarrett D'Amore short strindex[OSS_ENUM_MAXVALUE]; 12288447a05SGarrett D'Amore char strings[3000]; 12388447a05SGarrett D'Amore } oss_mixer_enuminfo; 12488447a05SGarrett D'Amore 12588447a05SGarrett D'Amore /* 12688447a05SGarrett D'Amore * Digital interface (S/PDIF) control interface 12788447a05SGarrett D'Amore * SNDCTL_DSP_READCTL and SNDCTL_DSP_WRITECTL 12888447a05SGarrett D'Amore */ 12988447a05SGarrett D'Amore typedef struct oss_digital_control { 13088447a05SGarrett D'Amore unsigned int caps; 13188447a05SGarrett D'Amore #define DIG_CBITIN_NONE 0x00000000 13288447a05SGarrett D'Amore #define DIG_CBITIN_LIMITED 0x00000001 13388447a05SGarrett D'Amore #define DIG_CBITIN_DATA 0x00000002 13488447a05SGarrett D'Amore #define DIG_CBITIN_BYTE0 0x00000004 13588447a05SGarrett D'Amore #define DIG_CBITIN_FULL 0x00000008 13688447a05SGarrett D'Amore #define DIG_CBITIN_MASK 0x0000000f 13788447a05SGarrett D'Amore #define DIG_CBITOUT_NONE 0x00000000 13888447a05SGarrett D'Amore #define DIG_CBITOUT_LIMITED 0x00000010 13988447a05SGarrett D'Amore #define DIG_CBITOUT_BYTE0 0x00000020 14088447a05SGarrett D'Amore #define DIG_CBITOUT_FULL 0x00000040 14188447a05SGarrett D'Amore #define DIG_CBITOUT_DATA 0x00000080 14288447a05SGarrett D'Amore #define DIG_CBITOUT_MASK 0x000000f0 14388447a05SGarrett D'Amore #define DIG_UBITIN 0x00000100 14488447a05SGarrett D'Amore #define DIG_UBITOUT 0x00000200 14588447a05SGarrett D'Amore #define DIG_VBITOUT 0x00000400 14688447a05SGarrett D'Amore #define DIG_OUTRATE 0x00000800 14788447a05SGarrett D'Amore #define DIG_INRATE 0x00001000 14888447a05SGarrett D'Amore #define DIG_INBITS 0x00002000 14988447a05SGarrett D'Amore #define DIG_OUTBITS 0x00004000 15088447a05SGarrett D'Amore #define DIG_EXACT 0x00010000 15188447a05SGarrett D'Amore #define DIG_PRO 0x00020000 15288447a05SGarrett D'Amore #define DIG_CONSUMER 0x00040000 15388447a05SGarrett D'Amore #define DIG_PASSTHROUGH 0x00080000 15488447a05SGarrett D'Amore #define DIG_OUTSEL 0x00100000 15588447a05SGarrett D'Amore 15688447a05SGarrett D'Amore unsigned int valid; 15788447a05SGarrett D'Amore #define VAL_CBITIN 0x00000001 15888447a05SGarrett D'Amore #define VAL_UBITIN 0x00000002 15988447a05SGarrett D'Amore #define VAL_CBITOUT 0x00000004 16088447a05SGarrett D'Amore #define VAL_UBITOUT 0x00000008 16188447a05SGarrett D'Amore #define VAL_ISTATUS 0x00000010 16288447a05SGarrett D'Amore #define VAL_IRATE 0x00000020 16388447a05SGarrett D'Amore #define VAL_ORATE 0x00000040 16488447a05SGarrett D'Amore #define VAL_INBITS 0x00000080 16588447a05SGarrett D'Amore #define VAL_OUTBITS 0x00000100 16688447a05SGarrett D'Amore #define VAL_REQUEST 0x00000200 16788447a05SGarrett D'Amore #define VAL_OUTSEL 0x00000400 16888447a05SGarrett D'Amore 16988447a05SGarrett D'Amore #define VAL_OUTMASK (VAL_CBITOUT|VAL_UBITOUT|VAL_ORATE|VAL_OUTBITS|VAL_OUTSEL) 17088447a05SGarrett D'Amore 17188447a05SGarrett D'Amore unsigned int request; 17288447a05SGarrett D'Amore unsigned int param; 17388447a05SGarrett D'Amore #define SPD_RQ_PASSTHROUGH 1 17488447a05SGarrett D'Amore 17588447a05SGarrett D'Amore unsigned char cbitin[24]; 17688447a05SGarrett D'Amore unsigned char ubitin[24]; 17788447a05SGarrett D'Amore unsigned char cbitout[24]; 17888447a05SGarrett D'Amore unsigned char ubitout[24]; 17988447a05SGarrett D'Amore 18088447a05SGarrett D'Amore unsigned int outsel; 18188447a05SGarrett D'Amore #define OUTSEL_DIGITAL 1 18288447a05SGarrett D'Amore #define OUTSEL_ANALOG 2 18388447a05SGarrett D'Amore #define OUTSEL_BOTH (OUTSEL_DIGITAL|OUTSEL_ANALOG) 18488447a05SGarrett D'Amore 18588447a05SGarrett D'Amore int in_data; /* Audio/data if autodetectable by receiver */ 18688447a05SGarrett D'Amore #define IND_UNKNOWN 0 18788447a05SGarrett D'Amore #define IND_AUDIO 1 18888447a05SGarrett D'Amore #define IND_DATA 2 18988447a05SGarrett D'Amore 19088447a05SGarrett D'Amore int in_locked; /* Receiver locked */ 19188447a05SGarrett D'Amore #define LOCK_NOT_INDICATED 0 19288447a05SGarrett D'Amore #define LOCK_UNLOCKED 1 19388447a05SGarrett D'Amore #define LOCK_LOCKED 2 19488447a05SGarrett D'Amore 19588447a05SGarrett D'Amore int in_quality; /* Input signal quality */ 19688447a05SGarrett D'Amore #define IN_QUAL_NOT_INDICATED 0 19788447a05SGarrett D'Amore #define IN_QUAL_POOR 1 19888447a05SGarrett D'Amore #define IN_QUAL_GOOD 2 19988447a05SGarrett D'Amore 20088447a05SGarrett D'Amore int in_vbit; 20188447a05SGarrett D'Amore int out_vbit; /* V bits */ 20288447a05SGarrett D'Amore #define VBIT_NOT_INDICATED 0 20388447a05SGarrett D'Amore #define VBIT_OFF 1 20488447a05SGarrett D'Amore #define VBIT_ON 2 20588447a05SGarrett D'Amore 20688447a05SGarrett D'Amore unsigned int in_errors; /* Various input error conditions */ 20788447a05SGarrett D'Amore #define INERR_CRC 0x0001 20888447a05SGarrett D'Amore #define INERR_QCODE_CRC 0x0002 20988447a05SGarrett D'Amore #define INERR_PARITY 0x0004 21088447a05SGarrett D'Amore #define INERR_BIPHASE 0x0008 21188447a05SGarrett D'Amore 21288447a05SGarrett D'Amore int srate_in; 21388447a05SGarrett D'Amore int srate_out; 21488447a05SGarrett D'Amore int bits_in; 21588447a05SGarrett D'Amore int bits_out; 21688447a05SGarrett D'Amore 21788447a05SGarrett D'Amore int filler[32]; 21888447a05SGarrett D'Amore } oss_digital_control; 21988447a05SGarrett D'Amore 22088447a05SGarrett D'Amore /* 22188447a05SGarrett D'Amore * The "new" mixer API. 22288447a05SGarrett D'Amore * 22388447a05SGarrett D'Amore * This improved mixer API makes it possible to access every possible feature 22488447a05SGarrett D'Amore * of every possible device. However you should read the mixer programming 22588447a05SGarrett D'Amore * section of the OSS API Developer's Manual. There is no chance that you 22688447a05SGarrett D'Amore * could use this interface correctly just by examining this header. 22788447a05SGarrett D'Amore */ 22888447a05SGarrett D'Amore #define OSS_VERSION 0x040003 22988447a05SGarrett D'Amore #define SOUND_VERSION OSS_VERSION 23088447a05SGarrett D'Amore 23188447a05SGarrett D'Amore typedef struct oss_sysinfo { 23288447a05SGarrett D'Amore char product[32]; /* E.g. SunOS Audio */ 23388447a05SGarrett D'Amore char version[32]; /* E.g. 4.0a */ 23488447a05SGarrett D'Amore int versionnum; /* See OSS_GETVERSION */ 23588447a05SGarrett D'Amore char options[128]; /* NOT SUPPORTED */ 23688447a05SGarrett D'Amore 23788447a05SGarrett D'Amore int numaudios; /* # of audio/dsp devices */ 23888447a05SGarrett D'Amore int openedaudio[8]; /* Mask of audio devices are busy */ 23988447a05SGarrett D'Amore 24088447a05SGarrett D'Amore int numsynths; /* NOT SUPPORTED, always 0 */ 24188447a05SGarrett D'Amore int nummidis; /* NOT SUPPORTED, always 0 */ 24288447a05SGarrett D'Amore int numtimers; /* NOT SUPPORTED, always 0 */ 24388447a05SGarrett D'Amore int nummixers; /* # of mixer devices */ 24488447a05SGarrett D'Amore 24588447a05SGarrett D'Amore int openedmidi[8]; /* Mask of midi devices are busy */ 24688447a05SGarrett D'Amore int numcards; /* Number of sound cards in the system */ 24788447a05SGarrett D'Amore int numaudioengines; /* Number of audio engines in the system */ 24888447a05SGarrett D'Amore char license[16]; /* E.g. "GPL" or "CDDL" */ 24988447a05SGarrett D'Amore char revision_info[256]; /* For internal use */ 25088447a05SGarrett D'Amore int filler[172]; /* For future expansion */ 25188447a05SGarrett D'Amore } oss_sysinfo; 25288447a05SGarrett D'Amore 25388447a05SGarrett D'Amore typedef struct oss_mixext { 25488447a05SGarrett D'Amore int dev; /* Mixer device number */ 25588447a05SGarrett D'Amore int ctrl; /* Extension number */ 25688447a05SGarrett D'Amore int type; /* Entry type */ 25788447a05SGarrett D'Amore #define MIXT_DEVROOT 0 /* Device root entry */ 25888447a05SGarrett D'Amore #define MIXT_GROUP 1 /* Controller group */ 25988447a05SGarrett D'Amore #define MIXT_ONOFF 2 /* OFF (0) or ON (1) */ 26088447a05SGarrett D'Amore #define MIXT_ENUM 3 /* Enumerated (0 to maxvalue) */ 26188447a05SGarrett D'Amore #define MIXT_MONOSLIDER 4 /* Mono slider (0 to 255) */ 26288447a05SGarrett D'Amore #define MIXT_STEREOSLIDER 5 /* Stereo slider (dual 0 to 255) */ 26388447a05SGarrett D'Amore #define MIXT_MESSAGE 6 /* (Readable) textual message */ 26488447a05SGarrett D'Amore #define MIXT_MONOVU 7 /* VU meter value (mono) */ 26588447a05SGarrett D'Amore #define MIXT_STEREOVU 8 /* VU meter value (stereo) */ 26688447a05SGarrett D'Amore #define MIXT_MONOPEAK 9 /* VU meter peak value (mono) */ 26788447a05SGarrett D'Amore #define MIXT_STEREOPEAK 10 /* VU meter peak value (stereo) */ 26888447a05SGarrett D'Amore #define MIXT_RADIOGROUP 11 /* Radio button group */ 26988447a05SGarrett D'Amore #define MIXT_MARKER 12 /* Separator between entries */ 27088447a05SGarrett D'Amore #define MIXT_VALUE 13 /* Decimal value entry */ 27188447a05SGarrett D'Amore #define MIXT_HEXVALUE 14 /* Hexadecimal value entry */ 27288447a05SGarrett D'Amore #define MIXT_MONODB 15 /* OBSOLETE */ 27388447a05SGarrett D'Amore #define MIXT_STEREODB 16 /* OBSOLETE */ 27488447a05SGarrett D'Amore #define MIXT_SLIDER 17 /* Slider (mono, 31 bit int range) */ 27588447a05SGarrett D'Amore #define MIXT_3D 18 27688447a05SGarrett D'Amore #define MIXT_MONOSLIDER16 19 /* Mono slider (0-32767) */ 27788447a05SGarrett D'Amore #define MIXT_STEREOSLIDER16 20 /* Stereo slider (dual 0-32767) */ 27888447a05SGarrett D'Amore #define MIXT_MUTE 21 /* Mute=1, unmute=0 */ 27988447a05SGarrett D'Amore 28088447a05SGarrett D'Amore /* Possible value range (minvalue to maxvalue) */ 28188447a05SGarrett D'Amore /* Note that maxvalue may also be smaller than minvalue */ 28288447a05SGarrett D'Amore int maxvalue; 28388447a05SGarrett D'Amore int minvalue; 28488447a05SGarrett D'Amore 28588447a05SGarrett D'Amore int flags; 28688447a05SGarrett D'Amore #define MIXF_READABLE 0x00000001 /* Has readable value */ 28788447a05SGarrett D'Amore #define MIXF_WRITEABLE 0x00000002 /* Has writeable value */ 28888447a05SGarrett D'Amore #define MIXF_POLL 0x00000004 /* May change itself */ 28988447a05SGarrett D'Amore #define MIXF_HZ 0x00000008 /* Hertz scale */ 29088447a05SGarrett D'Amore #define MIXF_STRING 0x00000010 /* Use dynamic extensions for value */ 29188447a05SGarrett D'Amore #define MIXF_DYNAMIC 0x00000010 /* Supports dynamic extensions */ 29288447a05SGarrett D'Amore #define MIXF_OKFAIL 0x00000020 /* Interpret value as 1=OK, 0=FAIL */ 29388447a05SGarrett D'Amore #define MIXF_FLAT 0x00000040 /* NOT SUPPORTED */ 29488447a05SGarrett D'Amore #define MIXF_LEGACY 0x00000080 /* NOT SUPPORTED */ 29588447a05SGarrett D'Amore #define MIXF_CENTIBEL 0x00000100 /* Centibel (0.1 dB) step size */ 29688447a05SGarrett D'Amore #define MIXF_DECIBEL 0x00000200 /* Step size of 1 dB */ 29788447a05SGarrett D'Amore #define MIXF_MAINVOL 0x00000400 /* Main volume control */ 29888447a05SGarrett D'Amore #define MIXF_PCMVOL 0x00000800 /* PCM output volume control */ 29988447a05SGarrett D'Amore #define MIXF_RECVOL 0x00001000 /* PCM recording volume control */ 30088447a05SGarrett D'Amore #define MIXF_MONVOL 0x00002000 /* Input->output monitor volume */ 30188447a05SGarrett D'Amore #define MIXF_WIDE 0x00004000 /* NOT SUPPORTED */ 30288447a05SGarrett D'Amore #define MIXF_DESCR 0x00008000 /* NOT SUPPORTED */ 30388447a05SGarrett D'Amore #define MIXF_DISABLE 0x00010000 /* Control has been disabled */ 30488447a05SGarrett D'Amore 30588447a05SGarrett D'Amore char id[16]; /* Mnemonic ID (internal use) */ 30688447a05SGarrett D'Amore int parent; /* Entry# of parent (-1 if root) */ 30788447a05SGarrett D'Amore 30888447a05SGarrett D'Amore int dummy; /* NOT SUPPORTED */ 30988447a05SGarrett D'Amore 31088447a05SGarrett D'Amore int timestamp; 31188447a05SGarrett D'Amore 31288447a05SGarrett D'Amore char data[64]; /* Misc data (entry type dependent) */ 31388447a05SGarrett D'Amore unsigned char enum_present[32]; /* Mask of allowed enum values */ 31488447a05SGarrett D'Amore int control_no; /* NOT SUPPORTED, always -1 */ 31588447a05SGarrett D'Amore 31688447a05SGarrett D'Amore unsigned int desc; /* Scope flags, etc */ 31788447a05SGarrett D'Amore #define MIXEXT_SCOPE_MASK 0x0000003f 31888447a05SGarrett D'Amore #define MIXEXT_SCOPE_OTHER 0x00000000 31988447a05SGarrett D'Amore #define MIXEXT_SCOPE_INPUT 0x00000001 32088447a05SGarrett D'Amore #define MIXEXT_SCOPE_OUTPUT 0x00000002 32188447a05SGarrett D'Amore #define MIXEXT_SCOPE_MONITOR 0x00000003 32288447a05SGarrett D'Amore #define MIXEXT_SCOPE_RECSWITCH 0x00000004 32388447a05SGarrett D'Amore 32488447a05SGarrett D'Amore char extname[32]; 32588447a05SGarrett D'Amore int update_counter; 32688447a05SGarrett D'Amore #ifdef _KERNEL 32788447a05SGarrett D'Amore int filler[6]; 32888447a05SGarrett D'Amore int enumbit; 32988447a05SGarrett D'Amore #else 33088447a05SGarrett D'Amore int filler[7]; 33188447a05SGarrett D'Amore #endif 33288447a05SGarrett D'Amore } oss_mixext; 33388447a05SGarrett D'Amore 33488447a05SGarrett D'Amore typedef struct oss_mixext_root { 33588447a05SGarrett D'Amore char id[16]; 33688447a05SGarrett D'Amore char name[48]; 33788447a05SGarrett D'Amore } oss_mixext_root; 33888447a05SGarrett D'Amore 33988447a05SGarrett D'Amore typedef struct oss_mixer_value { 34088447a05SGarrett D'Amore int dev; 34188447a05SGarrett D'Amore int ctrl; 34288447a05SGarrett D'Amore int value; 34388447a05SGarrett D'Amore int flags; /* Reserved for future use. Initialize to 0 */ 34488447a05SGarrett D'Amore int timestamp; /* Must be set to oss_mixext.timestamp */ 34588447a05SGarrett D'Amore int filler[8]; /* Reserved for future use. Initialize to 0 */ 34688447a05SGarrett D'Amore } oss_mixer_value; 34788447a05SGarrett D'Amore 34888447a05SGarrett D'Amore #define OSS_LONGNAME_SIZE 64 34988447a05SGarrett D'Amore #define OSS_LABEL_SIZE 16 35088447a05SGarrett D'Amore #define OSS_DEVNODE_SIZE 32 35188447a05SGarrett D'Amore typedef char oss_longname_t[OSS_LONGNAME_SIZE]; 35288447a05SGarrett D'Amore typedef char oss_label_t[OSS_LABEL_SIZE]; 35388447a05SGarrett D'Amore typedef char oss_devnode_t[OSS_DEVNODE_SIZE]; 35488447a05SGarrett D'Amore 35588447a05SGarrett D'Amore 35688447a05SGarrett D'Amore typedef struct oss_audioinfo { 35788447a05SGarrett D'Amore int dev; /* Audio device number */ 35888447a05SGarrett D'Amore char name[64]; 35988447a05SGarrett D'Amore int busy; /* 0, OPEN_READ, OPEN_WRITE, OPEN_READWRITE */ 36088447a05SGarrett D'Amore int pid; /* Process ID, not used in SunOS */ 36188447a05SGarrett D'Amore int caps; /* PCM_CAP_INPUT, PCM_CAP_OUTPUT */ 36288447a05SGarrett D'Amore int iformats; /* Supported input formats */ 36388447a05SGarrett D'Amore int oformats; /* Supported output formats */ 36488447a05SGarrett D'Amore int magic; /* Internal use only */ 36588447a05SGarrett D'Amore char cmd[64]; /* Command using the device (if known) */ 36688447a05SGarrett D'Amore int card_number; 36788447a05SGarrett D'Amore int port_number; 36888447a05SGarrett D'Amore int mixer_dev; 36988447a05SGarrett D'Amore int legacy_device; /* Obsolete field. Replaced by devnode */ 37088447a05SGarrett D'Amore int enabled; /* 1=enabled, 0=device not ready */ 37188447a05SGarrett D'Amore int flags; /* internal use only - no practical meaning */ 37288447a05SGarrett D'Amore int min_rate; /* Minimum sample rate */ 37388447a05SGarrett D'Amore int max_rate; /* Maximum sample rate */ 37488447a05SGarrett D'Amore int min_channels; /* Minimum number of channels */ 37588447a05SGarrett D'Amore int max_channels; /* Maximum number of channels */ 37688447a05SGarrett D'Amore int binding; /* DSP_BIND_FRONT, etc. 0 means undefined */ 37788447a05SGarrett D'Amore int rate_source; 37888447a05SGarrett D'Amore char handle[32]; 37988447a05SGarrett D'Amore #define OSS_MAX_SAMPLE_RATES 20 /* Cannot be changed */ 38088447a05SGarrett D'Amore unsigned int nrates; /* Array of supported sample rates */ 38188447a05SGarrett D'Amore unsigned int rates[OSS_MAX_SAMPLE_RATES]; 38288447a05SGarrett D'Amore oss_longname_t song_name; /* Song name (if given) */ 38388447a05SGarrett D'Amore oss_label_t label; /* Device label (if given) */ 38488447a05SGarrett D'Amore int latency; /* In usecs, -1=unknown */ 38588447a05SGarrett D'Amore oss_devnode_t devnode; /* Device special file name (absolute path) */ 38688447a05SGarrett D'Amore int next_play_engine; 38788447a05SGarrett D'Amore int next_rec_engine; 38888447a05SGarrett D'Amore int filler[184]; 38988447a05SGarrett D'Amore } oss_audioinfo; 39088447a05SGarrett D'Amore 39188447a05SGarrett D'Amore typedef struct oss_mixerinfo { 39288447a05SGarrett D'Amore int dev; 39388447a05SGarrett D'Amore char id[16]; 39488447a05SGarrett D'Amore char name[32]; 39588447a05SGarrett D'Amore int modify_counter; 39688447a05SGarrett D'Amore int card_number; 39788447a05SGarrett D'Amore int port_number; 39888447a05SGarrett D'Amore char handle[32]; 39988447a05SGarrett D'Amore int magic; /* Reserved */ 40088447a05SGarrett D'Amore int enabled; /* Reserved */ 40188447a05SGarrett D'Amore int caps; 40288447a05SGarrett D'Amore #define MIXER_CAP_VIRTUAL 0x00000001 40388447a05SGarrett D'Amore #define MIXER_CAP_LAYOUT_B 0x00000002 /* For internal use only */ 40488447a05SGarrett D'Amore #define MIXER_CAP_NARROW 0x00000004 /* Conserve horiz space */ 40588447a05SGarrett D'Amore int flags; /* Reserved */ 40688447a05SGarrett D'Amore int nrext; 40788447a05SGarrett D'Amore /* 40888447a05SGarrett D'Amore * The priority field can be used to select the default 40988447a05SGarrett D'Amore * (motherboard) mixer device. The mixer with the highest 41088447a05SGarrett D'Amore * priority is the most preferred one. -2 or less means that 41188447a05SGarrett D'Amore * this device cannot be used as the default mixer. 41288447a05SGarrett D'Amore */ 41388447a05SGarrett D'Amore int priority; 41488447a05SGarrett D'Amore oss_devnode_t devnode; /* Device special file name (absolute path) */ 41588447a05SGarrett D'Amore int legacy_device; 41688447a05SGarrett D'Amore int filler[245]; /* Reserved */ 41788447a05SGarrett D'Amore } oss_mixerinfo; 41888447a05SGarrett D'Amore 41988447a05SGarrett D'Amore typedef struct oss_card_info { 42088447a05SGarrett D'Amore int card; 42188447a05SGarrett D'Amore char shortname[16]; 42288447a05SGarrett D'Amore char longname[128]; 42388447a05SGarrett D'Amore int flags; 42488447a05SGarrett D'Amore char hw_info[400]; 42588447a05SGarrett D'Amore int intr_count; 42688447a05SGarrett D'Amore int ack_count; 42788447a05SGarrett D'Amore int filler[154]; 42888447a05SGarrett D'Amore } oss_card_info; 42988447a05SGarrett D'Amore 43088447a05SGarrett D'Amore typedef struct mixer_info { /* OBSOLETE */ 43188447a05SGarrett D'Amore char id[16]; 43288447a05SGarrett D'Amore char name[32]; 43388447a05SGarrett D'Amore int modify_counter; 43488447a05SGarrett D'Amore int card_number; 43588447a05SGarrett D'Amore int port_number; 43688447a05SGarrett D'Amore char handle[32]; 43788447a05SGarrett D'Amore } mixer_info; 43888447a05SGarrett D'Amore 43988447a05SGarrett D'Amore #define MAX_PEAK_CHANNELS 128 44088447a05SGarrett D'Amore typedef unsigned short oss_peaks_t[MAX_PEAK_CHANNELS]; 44188447a05SGarrett D'Amore 44288447a05SGarrett D'Amore /* For use with SNDCTL_DSP_GET_CHNORDER */ 44388447a05SGarrett D'Amore #define CHID_UNDEF 0 44488447a05SGarrett D'Amore #define CHID_L 1 44588447a05SGarrett D'Amore #define CHID_R 2 44688447a05SGarrett D'Amore #define CHID_C 3 44788447a05SGarrett D'Amore #define CHID_LFE 4 44888447a05SGarrett D'Amore #define CHID_LS 5 44988447a05SGarrett D'Amore #define CHID_RS 6 45088447a05SGarrett D'Amore #define CHID_LR 7 45188447a05SGarrett D'Amore #define CHID_RR 8 45288447a05SGarrett D'Amore #define CHNORDER_UNDEF 0x0000000000000000ULL 45388447a05SGarrett D'Amore #define CHNORDER_NORMAL 0x0000000087654321ULL 45488447a05SGarrett D'Amore 45588447a05SGarrett D'Amore 45688447a05SGarrett D'Amore #define OSSIOCPARM_MASK 0x1fff /* parameters must be < 8192 bytes */ 45788447a05SGarrett D'Amore #define OSSIOC_VOID 0x00000000 /* no parameters */ 45888447a05SGarrett D'Amore #define OSSIOC_OUT 0x20000000 /* copy out parameters */ 45988447a05SGarrett D'Amore #define OSSIOC_IN 0x40000000 /* copy in parameters */ 46088447a05SGarrett D'Amore #define OSSIOC_INOUT (OSSIOC_IN|OSSIOC_OUT) 46188447a05SGarrett D'Amore #define OSSIOC_SZ(t) ((sizeof (t) & OSSIOCPARM_MASK) << 16) 46288447a05SGarrett D'Amore #define OSSIOC_GETSZ(x) (((x) >> 16) & OSSIOCPARM_MASK) 46388447a05SGarrett D'Amore 46488447a05SGarrett D'Amore #define __OSSIO(x, y) ((int)(OSSIOC_VOID|(x<<8)|y)) 46588447a05SGarrett D'Amore #define __OSSIOR(x, y, t) ((int)(OSSIOC_OUT|OSSIOC_SZ(t)|(x<<8)|y)) 46688447a05SGarrett D'Amore #define __OSSIOW(x, y, t) ((int)(OSSIOC_IN|OSSIOC_SZ(t)|(x<<8)|y)) 46788447a05SGarrett D'Amore #define __OSSIOWR(x, y, t) ((int)(OSSIOC_INOUT|OSSIOC_SZ(t)|(x<<8)|y)) 46888447a05SGarrett D'Amore 46988447a05SGarrett D'Amore #define SNDCTL_SYSINFO __OSSIOR('X', 1, oss_sysinfo) 47088447a05SGarrett D'Amore #define OSS_SYSINFO SNDCTL_SYSINFO /* Old name */ 47188447a05SGarrett D'Amore 47288447a05SGarrett D'Amore #define SNDCTL_MIX_NRMIX __OSSIOR('X', 2, int) 47388447a05SGarrett D'Amore #define SNDCTL_MIX_NREXT __OSSIOWR('X', 3, int) 47488447a05SGarrett D'Amore #define SNDCTL_MIX_EXTINFO __OSSIOWR('X', 4, oss_mixext) 47588447a05SGarrett D'Amore #define SNDCTL_MIX_READ __OSSIOWR('X', 5, oss_mixer_value) 47688447a05SGarrett D'Amore #define SNDCTL_MIX_WRITE __OSSIOWR('X', 6, oss_mixer_value) 47788447a05SGarrett D'Amore 47888447a05SGarrett D'Amore #define SNDCTL_AUDIOINFO __OSSIOWR('X', 7, oss_audioinfo) 47988447a05SGarrett D'Amore #define SNDCTL_MIX_ENUMINFO __OSSIOWR('X', 8, oss_mixer_enuminfo) 48088447a05SGarrett D'Amore #define SNDCTL_MIDIINFO __OSSIO('X', 9) 48188447a05SGarrett D'Amore #define SNDCTL_MIXERINFO __OSSIOWR('X', 10, oss_mixerinfo) 48288447a05SGarrett D'Amore #define SNDCTL_CARDINFO __OSSIOWR('X', 11, oss_card_info) 48388447a05SGarrett D'Amore #define SNDCTL_ENGINEINFO __OSSIOWR('X', 12, oss_audioinfo) 48488447a05SGarrett D'Amore #define SNDCTL_AUDIOINFO_EX __OSSIOWR('X', 13, oss_audioinfo) 48588447a05SGarrett D'Amore #define SNDCTL_MIX_DESCRIPTION __OSSIOWR('X', 14, oss_mixer_enuminfo) 48688447a05SGarrett D'Amore 48788447a05SGarrett D'Amore /* ioctl codes 'X', 200-255 are reserved for internal use */ 48888447a05SGarrett D'Amore 48988447a05SGarrett D'Amore /* 49088447a05SGarrett D'Amore * Few more "globally" available ioctl calls. 49188447a05SGarrett D'Amore */ 49288447a05SGarrett D'Amore #define SNDCTL_SETSONG __OSSIOW('Y', 2, oss_longname_t) 49388447a05SGarrett D'Amore #define SNDCTL_GETSONG __OSSIOR('Y', 2, oss_longname_t) 49488447a05SGarrett D'Amore #define SNDCTL_SETNAME __OSSIOW('Y', 3, oss_longname_t) 49588447a05SGarrett D'Amore #define SNDCTL_SETLABEL __OSSIOW('Y', 4, oss_label_t) 49688447a05SGarrett D'Amore #define SNDCTL_GETLABEL __OSSIOR('Y', 4, oss_label_t) 49788447a05SGarrett D'Amore 49888447a05SGarrett D'Amore /* 49988447a05SGarrett D'Amore * IOCTL commands for /dev/dsp 50088447a05SGarrett D'Amore */ 50188447a05SGarrett D'Amore #define SNDCTL_DSP_HALT __OSSIO('P', 0) 50288447a05SGarrett D'Amore #define SNDCTL_DSP_RESET SNDCTL_DSP_HALT /* Old name */ 50388447a05SGarrett D'Amore #define SNDCTL_DSP_SYNC __OSSIO('P', 1) 50488447a05SGarrett D'Amore #define SNDCTL_DSP_SPEED __OSSIOWR('P', 2, int) 50588447a05SGarrett D'Amore 50688447a05SGarrett D'Amore #define SNDCTL_DSP_STEREO __OSSIOWR('P', 3, int) /* OBSOLETE */ 50788447a05SGarrett D'Amore 50888447a05SGarrett D'Amore #define SNDCTL_DSP_GETBLKSIZE __OSSIOWR('P', 4, int) 50988447a05SGarrett D'Amore #define SNDCTL_DSP_SAMPLESIZE SNDCTL_DSP_SETFMT 51088447a05SGarrett D'Amore #define SNDCTL_DSP_CHANNELS __OSSIOWR('P', 6, int) 51188447a05SGarrett D'Amore #define SNDCTL_DSP_POST __OSSIO('P', 8) 51288447a05SGarrett D'Amore #define SNDCTL_DSP_SUBDIVIDE __OSSIOWR('P', 9, int) 51388447a05SGarrett D'Amore #define SNDCTL_DSP_SETFRAGMENT __OSSIOWR('P', 10, int) 51488447a05SGarrett D'Amore 51588447a05SGarrett D'Amore #define SNDCTL_DSP_GETFMTS __OSSIOR('P', 11, int) /* Returns a mask */ 51688447a05SGarrett D'Amore #define SNDCTL_DSP_SETFMT __OSSIOWR('P', 5, int) /* Selects ONE fmt */ 51788447a05SGarrett D'Amore 51888447a05SGarrett D'Amore #define SNDCTL_DSP_GETOSPACE __OSSIOR('P', 12, audio_buf_info) 51988447a05SGarrett D'Amore #define SNDCTL_DSP_GETISPACE __OSSIOR('P', 13, audio_buf_info) 520*26025630SGarrett D'Amore #define SNDCTL_DSP_NONBLOCK __OSSIO('P', 14) /* Obsolete */ 52188447a05SGarrett D'Amore #define SNDCTL_DSP_GETCAPS __OSSIOR('P', 15, int) 52288447a05SGarrett D'Amore 52388447a05SGarrett D'Amore #define SNDCTL_DSP_GETTRIGGER __OSSIOR('P', 16, int) 52488447a05SGarrett D'Amore #define SNDCTL_DSP_SETTRIGGER __OSSIOW('P', 16, int) 52588447a05SGarrett D'Amore 52688447a05SGarrett D'Amore #define SNDCTL_DSP_GETIPTR __OSSIOR('P', 17, count_info) 52788447a05SGarrett D'Amore #define SNDCTL_DSP_GETOPTR __OSSIOR('P', 18, count_info) 52888447a05SGarrett D'Amore 52988447a05SGarrett D'Amore #define SNDCTL_DSP_SETSYNCRO __OSSIO('P', 21) 53088447a05SGarrett D'Amore #define SNDCTL_DSP_SETDUPLEX __OSSIO('P', 22) 53188447a05SGarrett D'Amore 53288447a05SGarrett D'Amore #define SNDCTL_DSP_PROFILE __OSSIOW('P', 23, int) /* OBSOLETE */ 53388447a05SGarrett D'Amore #define APF_NORMAL 0 /* Normal applications */ 53488447a05SGarrett D'Amore #define APF_NETWORK 1 /* Underruns caused by "external" delay */ 53588447a05SGarrett D'Amore #define APF_CPUINTENS 2 /* Underruns caused by "overheating" the CPU */ 53688447a05SGarrett D'Amore 53788447a05SGarrett D'Amore 53888447a05SGarrett D'Amore #define SNDCTL_DSP_GETODELAY __OSSIOR('P', 23, int) 53988447a05SGarrett D'Amore 54088447a05SGarrett D'Amore #define SNDCTL_DSP_GETPLAYVOL __OSSIOR('P', 24, int) 54188447a05SGarrett D'Amore #define SNDCTL_DSP_SETPLAYVOL __OSSIOWR('P', 24, int) 54288447a05SGarrett D'Amore #define SNDCTL_DSP_GETERROR __OSSIOR('P', 25, audio_errinfo) 54388447a05SGarrett D'Amore 54488447a05SGarrett D'Amore #define SNDCTL_DSP_READCTL __OSSIOWR('P', 26, oss_digital_control) 54588447a05SGarrett D'Amore #define SNDCTL_DSP_WRITECTL __OSSIOWR('P', 27, oss_digital_control) 54688447a05SGarrett D'Amore 54788447a05SGarrett D'Amore #define SNDCTL_DSP_SYNCGROUP __OSSIOWR('P', 28, oss_syncgroup) 54888447a05SGarrett D'Amore #define SNDCTL_DSP_SYNCSTART __OSSIOW('P', 29, int) 54988447a05SGarrett D'Amore 55088447a05SGarrett D'Amore #define SNDCTL_DSP_COOKEDMODE __OSSIOW('P', 30, int) 55188447a05SGarrett D'Amore 55288447a05SGarrett D'Amore #define SNDCTL_DSP_SILENCE __OSSIO('P', 31) 55388447a05SGarrett D'Amore #define SNDCTL_DSP_SKIP __OSSIO('P', 32) 55488447a05SGarrett D'Amore 55588447a05SGarrett D'Amore #define SNDCTL_DSP_HALT_INPUT __OSSIO('P', 33) 55688447a05SGarrett D'Amore #define SNDCTL_DSP_RESET_INPUT SNDCTL_DSP_HALT_INPUT /* Old name */ 55788447a05SGarrett D'Amore #define SNDCTL_DSP_HALT_OUTPUT __OSSIO('P', 34) 55888447a05SGarrett D'Amore #define SNDCTL_DSP_RESET_OUTPUT SNDCTL_DSP_HALT_OUTPUT /* Old name */ 55988447a05SGarrett D'Amore 56088447a05SGarrett D'Amore #define SNDCTL_DSP_LOW_WATER __OSSIOW('P', 34, int) 56188447a05SGarrett D'Amore 56288447a05SGarrett D'Amore #define SNDCTL_DSP_CURRENT_IPTR __OSSIOR('P', 35, oss_count_t) 56388447a05SGarrett D'Amore #define SNDCTL_DSP_CURRENT_OPTR __OSSIOR('P', 36, oss_count_t) 56488447a05SGarrett D'Amore 56588447a05SGarrett D'Amore #define SNDCTL_DSP_GET_RECSRC_NAMES __OSSIOR('P', 37, oss_mixer_enuminfo) 56688447a05SGarrett D'Amore #define SNDCTL_DSP_GET_RECSRC __OSSIOR('P', 38, int) 56788447a05SGarrett D'Amore #define SNDCTL_DSP_SET_RECSRC __OSSIOWR('P', 38, int) 56888447a05SGarrett D'Amore 56988447a05SGarrett D'Amore #define SNDCTL_DSP_GET_PLAYTGT_NAMES __OSSIOR('P', 39, oss_mixer_enuminfo) 57088447a05SGarrett D'Amore #define SNDCTL_DSP_GET_PLAYTGT __OSSIOR('P', 40, int) 57188447a05SGarrett D'Amore #define SNDCTL_DSP_SET_PLAYTGT __OSSIOWR('P', 40, int) 57288447a05SGarrett D'Amore #define SNDCTL_DSP_GETRECVOL __OSSIOR('P', 41, int) 57388447a05SGarrett D'Amore #define SNDCTL_DSP_SETRECVOL __OSSIOWR('P', 41, int) 57488447a05SGarrett D'Amore 57588447a05SGarrett D'Amore #define SNDCTL_DSP_GET_CHNORDER __OSSIOR('P', 42, unsigned long long) 57688447a05SGarrett D'Amore #define SNDCTL_DSP_SET_CHNORDER __OSSIOWR('P', 42, unsigned long long) 57788447a05SGarrett D'Amore 57888447a05SGarrett D'Amore #define SNDCTL_DSP_GETIPEAKS __OSSIOR('P', 43, oss_peaks_t) 57988447a05SGarrett D'Amore #define SNDCTL_DSP_GETOPEAKS __OSSIOR('P', 44, oss_peaks_t) 58088447a05SGarrett D'Amore 58188447a05SGarrett D'Amore #define SNDCTL_DSP_POLICY __OSSIOW('P', 45, int) /* See the manual */ 58288447a05SGarrett D'Amore 58388447a05SGarrett D'Amore #define SNDCTL_DSP_GETCHANNELMASK __OSSIOWR('P', 64, int) 58488447a05SGarrett D'Amore #define SNDCTL_DSP_BIND_CHANNEL __OSSIOWR('P', 65, int) 58588447a05SGarrett D'Amore 58688447a05SGarrett D'Amore /* 58788447a05SGarrett D'Amore * These definitions are here for the benefit of compiling application 58888447a05SGarrett D'Amore * code. Most of these are NOT implemented in the Solaris code, 58988447a05SGarrett D'Amore * however. This is the older 3.x OSS API, and only the master input and 59088447a05SGarrett D'Amore * output levels are actually supported. 59188447a05SGarrett D'Amore */ 59288447a05SGarrett D'Amore #define SOUND_MIXER_NRDEVICES 28 59388447a05SGarrett D'Amore #define SOUND_MIXER_VOLUME 0 59488447a05SGarrett D'Amore #define SOUND_MIXER_BASS 1 59588447a05SGarrett D'Amore #define SOUND_MIXER_TREBLE 2 59688447a05SGarrett D'Amore #define SOUND_MIXER_SYNTH 3 59788447a05SGarrett D'Amore #define SOUND_MIXER_PCM 4 59888447a05SGarrett D'Amore #define SOUND_MIXER_SPEAKER 5 59988447a05SGarrett D'Amore #define SOUND_MIXER_LINE 6 60088447a05SGarrett D'Amore #define SOUND_MIXER_MIC 7 60188447a05SGarrett D'Amore #define SOUND_MIXER_CD 8 60288447a05SGarrett D'Amore #define SOUND_MIXER_IMIX 9 /* Recording monitor */ 60388447a05SGarrett D'Amore #define SOUND_MIXER_ALTPCM 10 60488447a05SGarrett D'Amore #define SOUND_MIXER_RECLEV 11 /* Recording level */ 60588447a05SGarrett D'Amore #define SOUND_MIXER_IGAIN 12 /* Input gain */ 60688447a05SGarrett D'Amore #define SOUND_MIXER_OGAIN 13 /* Output gain */ 60788447a05SGarrett D'Amore #define SOUND_MIXER_LINE1 14 /* Input source 1 (aux1) */ 60888447a05SGarrett D'Amore #define SOUND_MIXER_LINE2 15 /* Input source 2 (aux2) */ 60988447a05SGarrett D'Amore #define SOUND_MIXER_LINE3 16 /* Input source 3 (line) */ 61088447a05SGarrett D'Amore #define SOUND_MIXER_DIGITAL1 17 /* Digital I/O 1 */ 61188447a05SGarrett D'Amore #define SOUND_MIXER_DIGITAL2 18 /* Digital I/O 2 */ 61288447a05SGarrett D'Amore #define SOUND_MIXER_DIGITAL3 19 /* Digital I/O 3 */ 61388447a05SGarrett D'Amore #define SOUND_MIXER_PHONE 20 /* Phone */ 61488447a05SGarrett D'Amore #define SOUND_MIXER_MONO 21 /* Mono Output */ 61588447a05SGarrett D'Amore #define SOUND_MIXER_VIDEO 22 /* Video/TV (audio) in */ 61688447a05SGarrett D'Amore #define SOUND_MIXER_RADIO 23 /* Radio in */ 61788447a05SGarrett D'Amore #define SOUND_MIXER_DEPTH 24 /* Surround depth */ 61888447a05SGarrett D'Amore #define SOUND_MIXER_REARVOL 25 /* Rear/Surround speaker vol */ 61988447a05SGarrett D'Amore #define SOUND_MIXER_CENTERVOL 26 /* Center/LFE speaker vol */ 62088447a05SGarrett D'Amore #define SOUND_MIXER_SIDEVOL 27 /* Side-Surround (8speaker) vol */ 62188447a05SGarrett D'Amore #define SOUND_MIXER_SURRVOL SOUND_MIXER_SIDEVOL 62288447a05SGarrett D'Amore #define SOUND_ONOFF_MIN 28 62388447a05SGarrett D'Amore #define SOUND_ONOFF_MAX 30 62488447a05SGarrett D'Amore #define SOUND_MIXER_NONE 31 62588447a05SGarrett D'Amore 62688447a05SGarrett D'Amore #define SOUND_MIXER_RECSRC 0xff /* Recording sources */ 62788447a05SGarrett D'Amore #define SOUND_MIXER_DEVMASK 0xfe /* Supported devices */ 62888447a05SGarrett D'Amore #define SOUND_MIXER_RECMASK 0xfd /* Recording sources */ 62988447a05SGarrett D'Amore #define SOUND_MIXER_CAPS 0xfc /* Mixer capabilities (do not use) */ 63088447a05SGarrett D'Amore #define SOUND_MIXER_STEREODEVS 0xfb /* Mixer channels supporting stereo */ 63188447a05SGarrett D'Amore #define SOUND_MIXER_OUTSRC 0xfa 63288447a05SGarrett D'Amore #define SOUND_MIXER_OUTMASK 0xf9 63388447a05SGarrett D'Amore 63488447a05SGarrett D'Amore #define SOUND_MIXER_ENHANCE SOUND_MIXER_NONE 63588447a05SGarrett D'Amore #define SOUND_MIXER_MUTE SOUND_MIXER_NONE 63688447a05SGarrett D'Amore #define SOUND_MIXER_LOUD SOUND_MIXER_NONE 63788447a05SGarrett D'Amore 63888447a05SGarrett D'Amore #define SOUND_MASK_VOLUME (1 << SOUND_MIXER_VOLUME) 63988447a05SGarrett D'Amore #define SOUND_MASK_BASS (1 << SOUND_MIXER_BASS) 64088447a05SGarrett D'Amore #define SOUND_MASK_TREBLE (1 << SOUND_MIXER_TREBLE) 64188447a05SGarrett D'Amore #define SOUND_MASK_SYNTH (1 << SOUND_MIXER_SYNTH) 64288447a05SGarrett D'Amore #define SOUND_MASK_PCM (1 << SOUND_MIXER_PCM) 64388447a05SGarrett D'Amore #define SOUND_MASK_SPEAKER (1 << SOUND_MIXER_SPEAKER) 64488447a05SGarrett D'Amore #define SOUND_MASK_LINE (1 << SOUND_MIXER_LINE) 64588447a05SGarrett D'Amore #define SOUND_MASK_MIC (1 << SOUND_MIXER_MIC) 64688447a05SGarrett D'Amore #define SOUND_MASK_CD (1 << SOUND_MIXER_CD) 64788447a05SGarrett D'Amore #define SOUND_MASK_IMIX (1 << SOUND_MIXER_IMIX) 64888447a05SGarrett D'Amore #define SOUND_MASK_ALTPCM (1 << SOUND_MIXER_ALTPCM) 64988447a05SGarrett D'Amore #define SOUND_MASK_RECLEV (1 << SOUND_MIXER_RECLEV) 65088447a05SGarrett D'Amore #define SOUND_MASK_IGAIN (1 << SOUND_MIXER_IGAIN) 65188447a05SGarrett D'Amore #define SOUND_MASK_OGAIN (1 << SOUND_MIXER_OGAIN) 65288447a05SGarrett D'Amore #define SOUND_MASK_LINE1 (1 << SOUND_MIXER_LINE1) 65388447a05SGarrett D'Amore #define SOUND_MASK_LINE2 (1 << SOUND_MIXER_LINE2) 65488447a05SGarrett D'Amore #define SOUND_MASK_LINE3 (1 << SOUND_MIXER_LINE3) 65588447a05SGarrett D'Amore #define SOUND_MASK_DIGITAL1 (1 << SOUND_MIXER_DIGITAL1) 65688447a05SGarrett D'Amore #define SOUND_MASK_DIGITAL2 (1 << SOUND_MIXER_DIGITAL2) 65788447a05SGarrett D'Amore #define SOUND_MASK_DIGITAL3 (1 << SOUND_MIXER_DIGITAL3) 65888447a05SGarrett D'Amore #define SOUND_MASK_MONO (1 << SOUND_MIXER_MONO) 65988447a05SGarrett D'Amore #define SOUND_MASK_PHONE (1 << SOUND_MIXER_PHONE) 66088447a05SGarrett D'Amore #define SOUND_MASK_RADIO (1 << SOUND_MIXER_RADIO) 66188447a05SGarrett D'Amore #define SOUND_MASK_VIDEO (1 << SOUND_MIXER_VIDEO) 66288447a05SGarrett D'Amore #define SOUND_MASK_DEPTH (1 << SOUND_MIXER_DEPTH) 66388447a05SGarrett D'Amore #define SOUND_MASK_REARVOL (1 << SOUND_MIXER_REARVOL) 66488447a05SGarrett D'Amore #define SOUND_MASK_CENTERVOL (1 << SOUND_MIXER_CENTERVOL) 66588447a05SGarrett D'Amore #define SOUND_MASK_SIDEVOL (1 << SOUND_MIXER_SIDEVOL) 66688447a05SGarrett D'Amore #define SOUND_MASK_SURRVOL SOUND_MASK_SIDEVOL 66788447a05SGarrett D'Amore #define SOUND_MASK_MUTE (1 << SOUND_MIXER_MUTE) 66888447a05SGarrett D'Amore #define SOUND_MASK_ENHANCE (1 << SOUND_MIXER_ENHANCE) 66988447a05SGarrett D'Amore #define SOUND_MASK_LOUD (1 << SOUND_MIXER_LOUD) 67088447a05SGarrett D'Amore 67188447a05SGarrett D'Amore /* 67288447a05SGarrett D'Amore * Again, DO NOT USE the following two macros. They are here for SOURCE 67388447a05SGarrett D'Amore * COMPATIBILITY ONLY. 67488447a05SGarrett D'Amore */ 67588447a05SGarrett D'Amore #define SOUND_DEVICE_LABELS { \ 67688447a05SGarrett D'Amore "Vol ", "Bass ", "Treble", "Synth", "Pcm ", "Speaker ", "Line ", \ 67788447a05SGarrett D'Amore "Mic ", "CD ", "Mix ", "Pcm2 ", "Rec ", "IGain", "OGain", \ 67888447a05SGarrett D'Amore "Aux1", "Aux2", "Aux3", "Digital1", "Digital2", "Digital3", \ 67988447a05SGarrett D'Amore "Phone", "Mono", "Video", "Radio", "Depth", \ 68088447a05SGarrett D'Amore "Rear", "Center", "Side" } 68188447a05SGarrett D'Amore 68288447a05SGarrett D'Amore #define SOUND_DEVICE_NAMES { \ 68388447a05SGarrett D'Amore "vol", "bass", "treble", "synth", "pcm", "speaker", "line", \ 68488447a05SGarrett D'Amore "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain", \ 68588447a05SGarrett D'Amore "aux1", "aux2", "aux3", "dig1", "dig2", "dig3", \ 68688447a05SGarrett D'Amore "phone", "mono", "video", "radio", "depth", \ 68788447a05SGarrett D'Amore "rear", "center", "side" } 68888447a05SGarrett D'Amore 68988447a05SGarrett D'Amore #define MIXER_READ(dev) __OSSIOR('M', dev, int) 69088447a05SGarrett D'Amore #define MIXER_WRITE(dev) __OSSIOWR('M', dev, int) 69188447a05SGarrett D'Amore #define SOUND_MIXER_INFO __OSSIOR('M', 101, mixer_info) 69288447a05SGarrett D'Amore #define OSS_GETVERSION __OSSIOR('M', 118, int) 69388447a05SGarrett D'Amore 69488447a05SGarrett D'Amore /* 69588447a05SGarrett D'Amore * These macros are useful for some applications. They are implemented 69688447a05SGarrett D'Amore * as soft values for the application, and do not affect real hardware. 69788447a05SGarrett D'Amore */ 69888447a05SGarrett D'Amore #define SOUND_MIXER_READ_VOLUME MIXER_READ(SOUND_MIXER_VOLUME) 69988447a05SGarrett D'Amore #define SOUND_MIXER_READ_OGAIN MIXER_READ(SOUND_MIXER_OGAIN) 70088447a05SGarrett D'Amore #define SOUND_MIXER_READ_PCM MIXER_READ(SOUND_MIXER_PCM) 70188447a05SGarrett D'Amore #define SOUND_MIXER_READ_IGAIN MIXER_READ(SOUND_MIXER_IGAIN) 70288447a05SGarrett D'Amore #define SOUND_MIXER_READ_RECLEV MIXER_READ(SOUND_MIXER_RECLEV) 70388447a05SGarrett D'Amore #define SOUND_MIXER_READ_RECSRC MIXER_READ(SOUND_MIXER_RECSRC) 70488447a05SGarrett D'Amore #define SOUND_MIXER_READ_DEVMASK MIXER_READ(SOUND_MIXER_DEVMASK) 70588447a05SGarrett D'Amore #define SOUND_MIXER_READ_RECMASK MIXER_READ(SOUND_MIXER_RECMASK) 70688447a05SGarrett D'Amore #define SOUND_MIXER_READ_CAPS MIXER_READ(SOUND_MIXER_CAPS) 70788447a05SGarrett D'Amore #define SOUND_MIXER_READ_STEREODEVS MIXER_READ(SOUND_MIXER_STEREODEVS) 70888447a05SGarrett D'Amore #define SOUND_MIXER_READ_RECGAIN __OSSIOR('M', 119, int) 70988447a05SGarrett D'Amore #define SOUND_MIXER_READ_MONGAIN __OSSIOR('M', 120, int) 71088447a05SGarrett D'Amore 71188447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_VOLUME MIXER_WRITE(SOUND_MIXER_VOLUME) 71288447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_OGAIN MIXER_WRITE(SOUND_MIXER_OGAIN) 71388447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_PCM MIXER_WRITE(SOUND_MIXER_PCM) 71488447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_IGAIN MIXER_WRITE(SOUND_MIXER_IGAIN) 71588447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_RECLEV MIXER_WRITE(SOUND_MIXER_RECLEV) 71688447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_RECSRC MIXER_WRITE(SOUND_MIXER_RECSRC) 71788447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_RECGAIN __OSSIOWR('M', 119, int) 71888447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_MONGAIN __OSSIOWR('M', 120, int) 71988447a05SGarrett D'Amore 72088447a05SGarrett D'Amore /* 72188447a05SGarrett D'Amore * These macros are here for source compatibility. They intentionally don't 72288447a05SGarrett D'Amore * map to any real hardware. NOT SUPPORTED! 72388447a05SGarrett D'Amore */ 72488447a05SGarrett D'Amore #define SOUND_MIXER_READ_BASS MIXER_READ(SOUND_MIXER_BASS) 72588447a05SGarrett D'Amore #define SOUND_MIXER_READ_TREBLE MIXER_READ(SOUND_MIXER_TREBLE) 72688447a05SGarrett D'Amore #define SOUND_MIXER_READ_SYNTH MIXER_READ(SOUND_MIXER_SYNTH) 72788447a05SGarrett D'Amore #define SOUND_MIXER_READ_SPEAKER MIXER_READ(SOUND_MIXER_SPEAKER) 72888447a05SGarrett D'Amore #define SOUND_MIXER_READ_LINE MIXER_READ(SOUND_MIXER_LINE) 72988447a05SGarrett D'Amore #define SOUND_MIXER_READ_MIC MIXER_READ(SOUND_MIXER_MIC) 73088447a05SGarrett D'Amore #define SOUND_MIXER_READ_CD MIXER_READ(SOUND_MIXER_CD) 73188447a05SGarrett D'Amore #define SOUND_MIXER_READ_IMIX MIXER_READ(SOUND_MIXER_IMIX) 73288447a05SGarrett D'Amore #define SOUND_MIXER_READ_ALTPCM MIXER_READ(SOUND_MIXER_ALTPCM) 73388447a05SGarrett D'Amore #define SOUND_MIXER_READ_LINE1 MIXER_READ(SOUND_MIXER_LINE1) 73488447a05SGarrett D'Amore #define SOUND_MIXER_READ_LINE2 MIXER_READ(SOUND_MIXER_LINE2) 73588447a05SGarrett D'Amore #define SOUND_MIXER_READ_LINE3 MIXER_READ(SOUND_MIXER_LINE3) 73688447a05SGarrett D'Amore 73788447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_BASS MIXER_WRITE(SOUND_MIXER_BASS) 73888447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_TREBLE MIXER_WRITE(SOUND_MIXER_TREBLE) 73988447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_SYNTH MIXER_WRITE(SOUND_MIXER_SYNTH) 74088447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_SPEAKER MIXER_WRITE(SOUND_MIXER_SPEAKER) 74188447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_LINE MIXER_WRITE(SOUND_MIXER_LINE) 74288447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_MIC MIXER_WRITE(SOUND_MIXER_MIC) 74388447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_CD MIXER_WRITE(SOUND_MIXER_CD) 74488447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_IMIX MIXER_WRITE(SOUND_MIXER_IMIX) 74588447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_ALTPCM MIXER_WRITE(SOUND_MIXER_ALTPCM) 74688447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_LINE1 MIXER_WRITE(SOUND_MIXER_LINE1) 74788447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_LINE2 MIXER_WRITE(SOUND_MIXER_LINE2) 74888447a05SGarrett D'Amore #define SOUND_MIXER_WRITE_LINE3 MIXER_WRITE(SOUND_MIXER_LINE3) 74988447a05SGarrett D'Amore 75088447a05SGarrett D'Amore /* 75188447a05SGarrett D'Amore * Audio encoding types (Note! U8=8 and S16_LE=16 for compatibility) 75288447a05SGarrett D'Amore */ 75388447a05SGarrett D'Amore #define AFMT_QUERY 0x00000000 /* Return current fmt */ 75488447a05SGarrett D'Amore #define AFMT_MU_LAW 0x00000001 75588447a05SGarrett D'Amore #define AFMT_A_LAW 0x00000002 75688447a05SGarrett D'Amore #define AFMT_IMA_ADPCM 0x00000004 75788447a05SGarrett D'Amore #define AFMT_U8 0x00000008 75888447a05SGarrett D'Amore #define AFMT_S16_LE 0x00000010 75988447a05SGarrett D'Amore #define AFMT_S16_BE 0x00000020 76088447a05SGarrett D'Amore #define AFMT_S8 0x00000040 76188447a05SGarrett D'Amore #define AFMT_U16_LE 0x00000080 76288447a05SGarrett D'Amore #define AFMT_U16_BE 0x00000100 76388447a05SGarrett D'Amore #define AFMT_MPEG 0x00000200 /* NOT SUPPORTED: MPEG (2) audio */ 76488447a05SGarrett D'Amore #define AFMT_AC3 0x00000400 /* NOT SUPPORTED: AC3 compressed */ 76588447a05SGarrett D'Amore #define AFMT_VORBIS 0x00000800 /* NOT SUPPORTED: Ogg Vorbis */ 76688447a05SGarrett D'Amore #define AFMT_S32_LE 0x00001000 76788447a05SGarrett D'Amore #define AFMT_S32_BE 0x00002000 76888447a05SGarrett D'Amore #define AFMT_FLOAT 0x00004000 /* NOT SUPPORTED: IEEE double float */ 76988447a05SGarrett D'Amore #define AFMT_S24_LE 0x00008000 /* LSB aligned in 32 bit word */ 77088447a05SGarrett D'Amore #define AFMT_S24_BE 0x00010000 /* LSB aligned in 32 bit word */ 77188447a05SGarrett D'Amore #define AFMT_SPDIF_RAW 0x00020000 /* NOT SUPPORTED: Raw S/PDIF frames */ 77288447a05SGarrett D'Amore #define AFMT_S24_PACKED 0x00040000 /* 24 bit packed little endian */ 77388447a05SGarrett D'Amore /* 77488447a05SGarrett D'Amore * Some big endian/little endian handling macros (native endian and 77588447a05SGarrett D'Amore * opposite endian formats). 77688447a05SGarrett D'Amore */ 77788447a05SGarrett D'Amore #if defined(_BIG_ENDIAN) 77888447a05SGarrett D'Amore #define AFMT_S16_NE AFMT_S16_BE 77988447a05SGarrett D'Amore #define AFMT_U16_NE AFMT_U16_BE 78088447a05SGarrett D'Amore #define AFMT_S32_NE AFMT_S32_BE 78188447a05SGarrett D'Amore #define AFMT_S24_NE AFMT_S24_BE 78288447a05SGarrett D'Amore #define AFMT_S16_OE AFMT_S16_LE 78388447a05SGarrett D'Amore #define AFMT_S32_OE AFMT_S32_LE 78488447a05SGarrett D'Amore #define AFMT_S24_OE AFMT_S24_LE 78588447a05SGarrett D'Amore #else 78688447a05SGarrett D'Amore #define AFMT_S16_NE AFMT_S16_LE 78788447a05SGarrett D'Amore #define AFMT_U16_NE AFMT_U16_LE 78888447a05SGarrett D'Amore #define AFMT_S32_NE AFMT_S32_LE 78988447a05SGarrett D'Amore #define AFMT_S24_NE AFMT_S24_LE 79088447a05SGarrett D'Amore #define AFMT_S16_OE AFMT_S16_BE 79188447a05SGarrett D'Amore #define AFMT_S32_OE AFMT_S32_BE 79288447a05SGarrett D'Amore #define AFMT_S24_OE AFMT_S24_BE 79388447a05SGarrett D'Amore #endif 79488447a05SGarrett D'Amore 79588447a05SGarrett D'Amore /* 79688447a05SGarrett D'Amore * SNDCTL_DSP_GETCAPS bits 79788447a05SGarrett D'Amore */ 79888447a05SGarrett D'Amore #define PCM_CAP_REVISION 0x000000ff /* Revision level (0 to 255) */ 79988447a05SGarrett D'Amore #define PCM_CAP_DUPLEX 0x00000100 /* Full duplex rec/play */ 80088447a05SGarrett D'Amore #define PCM_CAP_REALTIME 0x00000200 /* NOT SUPPORTED */ 80188447a05SGarrett D'Amore #define PCM_CAP_BATCH 0x00000400 /* NOT SUPPORTED */ 80288447a05SGarrett D'Amore #define PCM_CAP_COPROC 0x00000800 /* NOT SUPPORTED */ 80388447a05SGarrett D'Amore #define PCM_CAP_TRIGGER 0x00001000 /* Supports SETTRIGGER */ 80488447a05SGarrett D'Amore #define PCM_CAP_MMAP 0x00002000 /* Supports mmap() */ 80588447a05SGarrett D'Amore #define PCM_CAP_MULTI 0x00004000 /* Supports multiple open */ 80688447a05SGarrett D'Amore #define PCM_CAP_BIND 0x00008000 /* Supports channel binding */ 80788447a05SGarrett D'Amore #define PCM_CAP_INPUT 0x00010000 /* Supports recording */ 80888447a05SGarrett D'Amore #define PCM_CAP_OUTPUT 0x00020000 /* Supports playback */ 80988447a05SGarrett D'Amore #define PCM_CAP_VIRTUAL 0x00040000 /* Virtual device */ 81088447a05SGarrett D'Amore #define PCM_CAP_ANALOGOUT 0x00100000 /* NOT SUPPORTED */ 81188447a05SGarrett D'Amore #define PCM_CAP_ANALOGIN 0x00200000 /* NOT SUPPORTED */ 81288447a05SGarrett D'Amore #define PCM_CAP_DIGITALOUT 0x00400000 /* NOT SUPPORTED */ 81388447a05SGarrett D'Amore #define PCM_CAP_DIGITALIN 0x00800000 /* NOT SUPPORTED */ 81488447a05SGarrett D'Amore #define PCM_CAP_ADMASK 0x00f00000 /* NOT SUPPORTED */ 81588447a05SGarrett D'Amore #define PCM_CAP_SHADOW 0x01000000 /* "Shadow" device */ 81688447a05SGarrett D'Amore #define PCM_CAP_CH_MASK 0x06000000 /* See DSP_CH_MASK below */ 81788447a05SGarrett D'Amore #define PCM_CAP_HIDDEN 0x08000000 /* NOT SUPPORTED */ 81888447a05SGarrett D'Amore #define PCM_CAP_FREERATE 0x10000000 81988447a05SGarrett D'Amore #define PCM_CAP_MODEM 0x20000000 /* NOT SUPPORTED */ 82088447a05SGarrett D'Amore #define PCM_CAP_DEFAULT 0x40000000 /* "Default" device */ 82188447a05SGarrett D'Amore 82288447a05SGarrett D'Amore /* 82388447a05SGarrett D'Amore * Preferred channel usage. These bits can be used to give 82488447a05SGarrett D'Amore * recommendations to the application. Used by few drivers. For 82588447a05SGarrett D'Amore * example if ((caps & DSP_CH_MASK) == DSP_CH_MONO) means that the 82688447a05SGarrett D'Amore * device works best in mono mode. However it doesn't necessarily mean 82788447a05SGarrett D'Amore * that the device cannot be used in stereo. These bits should only be 82888447a05SGarrett D'Amore * used by special applications such as multi track hard disk 82988447a05SGarrett D'Amore * recorders to find out the initial setup. However the user should be 83088447a05SGarrett D'Amore * able to override this selection. 83188447a05SGarrett D'Amore * 83288447a05SGarrett D'Amore * To find out which modes are actually supported the application 83388447a05SGarrett D'Amore * should try to select them using SNDCTL_DSP_CHANNELS. 83488447a05SGarrett D'Amore */ 83588447a05SGarrett D'Amore #define DSP_CH_MASK 0x06000000 /* Mask */ 83688447a05SGarrett D'Amore #define DSP_CH_ANY 0x00000000 /* No preferred mode */ 83788447a05SGarrett D'Amore #define DSP_CH_MONO 0x02000000 83888447a05SGarrett D'Amore #define DSP_CH_STEREO 0x04000000 83988447a05SGarrett D'Amore #define DSP_CH_MULTI 0x06000000 /* More than two channels */ 84088447a05SGarrett D'Amore 84188447a05SGarrett D'Amore 84288447a05SGarrett D'Amore /* 84388447a05SGarrett D'Amore * The PCM_CAP_* capability names used to be known as DSP_CAP_*, so 84488447a05SGarrett D'Amore * it's necessary to define the older names too. 84588447a05SGarrett D'Amore */ 84688447a05SGarrett D'Amore #define DSP_CAP_ADMASK PCM_CAP_ADMASK 84788447a05SGarrett D'Amore #define DSP_CAP_ANALOGIN PCM_CAP_ANALOGIN 84888447a05SGarrett D'Amore #define DSP_CAP_ANALOGOUT PCM_CAP_ANALOGOUT 84988447a05SGarrett D'Amore #define DSP_CAP_BATCH PCM_CAP_BATCH 85088447a05SGarrett D'Amore #define DSP_CAP_BIND PCM_CAP_BIND 85188447a05SGarrett D'Amore #define DSP_CAP_COPROC PCM_CAP_COPROC 85288447a05SGarrett D'Amore #define DSP_CAP_DEFAULT PCM_CAP_DEFAULT 85388447a05SGarrett D'Amore #define DSP_CAP_DIGITALIN PCM_CAP_DIGITALIN 85488447a05SGarrett D'Amore #define DSP_CAP_DIGITALOUT PCM_CAP_DIGITALOUT 85588447a05SGarrett D'Amore #define DSP_CAP_DUPLEX PCM_CAP_DUPLEX 85688447a05SGarrett D'Amore #define DSP_CAP_FREERATE PCM_CAP_FREERATE 85788447a05SGarrett D'Amore #define DSP_CAP_HIDDEN PCM_CAP_HIDDEN 85888447a05SGarrett D'Amore #define DSP_CAP_INPUT PCM_CAP_INPUT 85988447a05SGarrett D'Amore #define DSP_CAP_MMAP PCM_CAP_MMAP 86088447a05SGarrett D'Amore #define DSP_CAP_MODEM PCM_CAP_MODEM 86188447a05SGarrett D'Amore #define DSP_CAP_MULTI PCM_CAP_MULTI 86288447a05SGarrett D'Amore #define DSP_CAP_OUTPUT PCM_CAP_OUTPUT 86388447a05SGarrett D'Amore #define DSP_CAP_REALTIME PCM_CAP_REALTIME 86488447a05SGarrett D'Amore #define DSP_CAP_REVISION PCM_CAP_REVISION 86588447a05SGarrett D'Amore #define DSP_CAP_SHADOW PCM_CAP_SHADOW 86688447a05SGarrett D'Amore #define DSP_CAP_TRIGGER PCM_CAP_TRIGGER 86788447a05SGarrett D'Amore #define DSP_CAP_VIRTUAL PCM_CAP_VIRTUAL 86888447a05SGarrett D'Amore 86988447a05SGarrett D'Amore /* 87088447a05SGarrett D'Amore * SNDCTL_DSP_GETTRIGGER and SNDCTL_DSP_SETTRIGGER 87188447a05SGarrett D'Amore */ 87288447a05SGarrett D'Amore #define PCM_ENABLE_INPUT 0x00000001 87388447a05SGarrett D'Amore #define PCM_ENABLE_OUTPUT 0x00000002 87488447a05SGarrett D'Amore 87588447a05SGarrett D'Amore /* 87688447a05SGarrett D'Amore * SNDCTL_DSP_BIND_CHANNEL 87788447a05SGarrett D'Amore */ 87888447a05SGarrett D'Amore #define DSP_BIND_QUERY 0x00000000 87988447a05SGarrett D'Amore #define DSP_BIND_FRONT 0x00000001 88088447a05SGarrett D'Amore #define DSP_BIND_SURR 0x00000002 88188447a05SGarrett D'Amore #define DSP_BIND_CENTER_LFE 0x00000004 88288447a05SGarrett D'Amore #define DSP_BIND_HANDSET 0x00000008 88388447a05SGarrett D'Amore #define DSP_BIND_MIC 0x00000010 88488447a05SGarrett D'Amore #define DSP_BIND_MODEM1 0x00000020 88588447a05SGarrett D'Amore #define DSP_BIND_MODEM2 0x00000040 88688447a05SGarrett D'Amore #define DSP_BIND_I2S 0x00000080 88788447a05SGarrett D'Amore #define DSP_BIND_SPDIF 0x00000100 88888447a05SGarrett D'Amore #define DSP_BIND_REAR 0x00000200 88988447a05SGarrett D'Amore 89088447a05SGarrett D'Amore /* 89188447a05SGarrett D'Amore * SOUND_MIXER_READ_CAPS 89288447a05SGarrett D'Amore */ 89388447a05SGarrett D'Amore #define SOUND_CAP_EXCL_INPUT 0x00000001 89488447a05SGarrett D'Amore #define SOUND_CAP_NOLEGACY 0x00000004 89588447a05SGarrett D'Amore #define SOUND_CAP_NORECSRC 0x00000008 89688447a05SGarrett D'Amore 89788447a05SGarrett D'Amore /* 89888447a05SGarrett D'Amore * The following ioctl is for internal use only -- it is used to 89988447a05SGarrett D'Amore * coordinate /dev/sndstat numbering with file names in /dev/sound. 90088447a05SGarrett D'Amore * Applications must not use it. (This is duplicated in sys/audioio.h 90188447a05SGarrett D'Amore * as well.) 90288447a05SGarrett D'Amore */ 90388447a05SGarrett D'Amore #define SNDCTL_SUN_SEND_NUMBER __OSSIOW('X', 200, int) 90488447a05SGarrett D'Amore 90588447a05SGarrett D'Amore #ifdef __cplusplus 90688447a05SGarrett D'Amore } 90788447a05SGarrett D'Amore #endif 90888447a05SGarrett D'Amore 90988447a05SGarrett D'Amore #endif /* _SYS_AUDIO_OSS_H */ 910