1 /* 2 * Emuxki BeOS Driver for Creative Labs SBLive!/Audigy series 3 * 4 * Copyright (c) 2002, Jerome Duval (jerome.duval@free.fr) 5 * 6 * Original code : BeOS Driver for Intel ICH AC'97 Link interface 7 * Copyright (c) 2002, Marcus Overhagen <marcus@overhagen.de> 8 * 9 * All rights reserved. 10 * Redistribution and use in source and binary forms, with or without modification, 11 * are permitted provided that the following conditions are met: 12 * 13 * - Redistributions of source code must retain the above copyright notice, 14 * this list of conditions and the following disclaimer. 15 * - Redistributions in binary form must reproduce the above copyright notice, 16 * this list of conditions and the following disclaimer in the documentation 17 * and/or other materials provided with the distribution. 18 * 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 25 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 28 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * 30 */ 31 #ifndef _IO_H_ 32 #define _IO_H_ 33 34 #include "config.h" 35 36 uint8 emuxki_reg_read_8(device_config *config, int regno); 37 uint16 emuxki_reg_read_16(device_config *config, int regno); 38 uint32 emuxki_reg_read_32(device_config *config, int regno); 39 40 void emuxki_reg_write_8(device_config *config, int regno, uint8 value); 41 void emuxki_reg_write_16(device_config *config, int regno, uint16 value); 42 void emuxki_reg_write_32(device_config *config, int regno, uint32 value); 43 44 uint32 emuxki_chan_read(device_config *config, uint16 chano, uint32 reg); 45 void emuxki_chan_write(device_config *config, uint16 chano, uint32 reg, uint32 data); 46 47 void emuxki_dsp_addop(device_config *config, uint16 *pc, uint8 op, 48 uint16 r, uint16 a, uint16 x, uint16 y); 49 void emuxki_dsp_getop(device_config *config, uint16 *pc, uint8 *op, 50 uint16 *r, uint16 *a, uint16 *x, uint16 *y); 51 52 void emuxki_write_gpr(device_config *config, uint32 pc, uint32 data); 53 uint32 emuxki_read_gpr(device_config *config, uint32 pc); 54 55 uint16 emuxki_codec_read(device_config *config, int regno); 56 void emuxki_codec_write(device_config *config, int regno, uint16 value); 57 58 void emuxki_inte_enable(device_config *config, uint32 value); 59 void emuxki_inte_disable(device_config *config, uint32 value); 60 61 uint32 emuxki_p16v_read(device_config *config, uint16 chano, uint16 reg); 62 void emuxki_p16v_write(device_config *config, uint16 chano, uint16 reg, uint32 data); 63 64 #endif 65