1 /* 2 * cdda - CD Digital Audio support 3 * 4 * Copyright (C) 1993-2004 Ti Kan 5 * E-mail: xmcd@amb.org 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 */ 21 22 /* 23 * Sun Solaris support 24 * 25 * This software fragment contains code that interfaces the 26 * application to the Solaris operating environment. The name "Sun" 27 * and "Solaris" are used here for identification purposes only. 28 * 29 * Contributing author: Darragh O'Brien <darragh.obrien@sun.com> 30 */ 31 #ifndef __WR_SOL_H__ 32 #define __WR_SOL_H__ 33 34 #ifndef lint 35 static char *_wr_sol_h_ident_ = "@(#)wr_sol.h 7.34 03/12/12"; 36 #endif 37 38 #if defined(CDDA_WR_SOL) && defined(CDDA_SUPPORTED) 39 40 #define DEFAULT_DEV_AUDIO "/dev/audio" /* default audio device */ 41 42 #define SOL_MAX_VOL AUDIO_MAX_GAIN 43 #define SOL_HALF_VOL (SOL_MAX_VOL / 2) 44 #define SOL_M_BAL AUDIO_MID_BALANCE 45 #define SOL_L_BAL 0 46 #define SOL_R_BAL AUDIO_RIGHT_BALANCE 47 48 /* Adapted from <sys/audio.h> and put here because audio.h is not found 49 * on all systems. Renamed from AUDIO_INIT to avoid clash with other 50 * platforms. 51 */ 52 #define SOL_AUDIO_INIT(I, S) { \ 53 byte_t *__x__; \ 54 for (__x__ = (byte_t *)(I); \ 55 __x__ < (((byte_t *)(I)) + (S)); \ 56 *__x__++ = (byte_t)~0); \ 57 } 58 59 /* Arch codes */ 60 #define ARCH_MASK 0xF0 61 #define ARCH_SUN2 0x00 62 #define ARCH_SUN3 0x10 63 #define ARCH_SUN4 0x20 64 #define ARCH_SUN386 0x30 65 #define ARCH_SUN3X 0x40 66 #define ARCH_SUN4C 0x50 67 #define ARCH_SUN4E 0x60 68 #define ARCH_SUN4M 0x70 69 #define ARCH_SUNX 0x80 70 71 /* Exported function prototypes */ 72 extern word32_t sol_winit(void); 73 extern bool_t sol_write(curstat_t *); 74 extern void sol_wdone(bool_t); 75 extern void sol_winfo(char *); 76 77 #else 78 79 #define sol_winit NULL 80 #define sol_write NULL 81 #define sol_wdone NULL 82 #define sol_winfo NULL 83 84 #endif /* CDDA_WR_SOL CDDA_SUPPORTED */ 85 86 #endif /* __WR_SOL_H__ */ 87 88