Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/sound
File: emu10k1.h
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* Copyright (c) by Jaroslav Kysela <perex@perex.cz>,
[2] Fix | Delete
* Creative Labs, Inc.
[3] Fix | Delete
* Definitions for EMU10K1 (SB Live!) chips
[4] Fix | Delete
*/
[5] Fix | Delete
#ifndef __SOUND_EMU10K1_H
[6] Fix | Delete
#define __SOUND_EMU10K1_H
[7] Fix | Delete
[8] Fix | Delete
#ifdef __linux__
[9] Fix | Delete
#include <linux/types.h>
[10] Fix | Delete
#endif
[11] Fix | Delete
[12] Fix | Delete
/*
[13] Fix | Delete
* ---- FX8010 ----
[14] Fix | Delete
*/
[15] Fix | Delete
[16] Fix | Delete
#define EMU10K1_FX8010_PCM_COUNT 8
[17] Fix | Delete
[18] Fix | Delete
/*
[19] Fix | Delete
* Following definition is copied from linux/types.h to support compiling
[20] Fix | Delete
* this header file in userspace since they are not generally available for
[21] Fix | Delete
* uapi headers.
[22] Fix | Delete
*/
[23] Fix | Delete
#define __EMU10K1_DECLARE_BITMAP(name,bits) \
[24] Fix | Delete
unsigned long name[(bits) / (sizeof(unsigned long) * 8)]
[25] Fix | Delete
[26] Fix | Delete
/* instruction set */
[27] Fix | Delete
#define iMAC0 0x00 /* R = A + (X * Y >> 31) ; saturation */
[28] Fix | Delete
#define iMAC1 0x01 /* R = A + (-X * Y >> 31) ; saturation */
[29] Fix | Delete
#define iMAC2 0x02 /* R = A + (X * Y >> 31) ; wraparound */
[30] Fix | Delete
#define iMAC3 0x03 /* R = A + (-X * Y >> 31) ; wraparound */
[31] Fix | Delete
#define iMACINT0 0x04 /* R = A + X * Y ; saturation */
[32] Fix | Delete
#define iMACINT1 0x05 /* R = A + X * Y ; wraparound (31-bit) */
[33] Fix | Delete
#define iACC3 0x06 /* R = A + X + Y ; saturation */
[34] Fix | Delete
#define iMACMV 0x07 /* R = A, acc += X * Y >> 31 */
[35] Fix | Delete
#define iANDXOR 0x08 /* R = (A & X) ^ Y */
[36] Fix | Delete
#define iTSTNEG 0x09 /* R = (A >= Y) ? X : ~X */
[37] Fix | Delete
#define iLIMITGE 0x0a /* R = (A >= Y) ? X : Y */
[38] Fix | Delete
#define iLIMITLT 0x0b /* R = (A < Y) ? X : Y */
[39] Fix | Delete
#define iLOG 0x0c /* R = linear_data, A (log_data), X (max_exp), Y (format_word) */
[40] Fix | Delete
#define iEXP 0x0d /* R = log_data, A (linear_data), X (max_exp), Y (format_word) */
[41] Fix | Delete
#define iINTERP 0x0e /* R = A + (X * (Y - A) >> 31) ; saturation */
[42] Fix | Delete
#define iSKIP 0x0f /* R = A (cc_reg), X (count), Y (cc_test) */
[43] Fix | Delete
[44] Fix | Delete
#define LOWORD_OPX_MASK 0x000ffc00 /* Instruction operand X */
[45] Fix | Delete
#define LOWORD_OPY_MASK 0x000003ff /* Instruction operand Y */
[46] Fix | Delete
#define HIWORD_OPCODE_MASK 0x00f00000 /* Instruction opcode */
[47] Fix | Delete
#define HIWORD_RESULT_MASK 0x000ffc00 /* Instruction result */
[48] Fix | Delete
#define HIWORD_OPA_MASK 0x000003ff /* Instruction operand A */
[49] Fix | Delete
[50] Fix | Delete
/* Audigy Soundcards have a different instruction format */
[51] Fix | Delete
#define A_LOWORD_OPX_MASK 0x007ff000
[52] Fix | Delete
#define A_LOWORD_OPY_MASK 0x000007ff
[53] Fix | Delete
#define A_HIWORD_OPCODE_MASK 0x0f000000
[54] Fix | Delete
#define A_HIWORD_RESULT_MASK 0x007ff000
[55] Fix | Delete
#define A_HIWORD_OPA_MASK 0x000007ff
[56] Fix | Delete
[57] Fix | Delete
/* GPRs */
[58] Fix | Delete
#define FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x0f */
[59] Fix | Delete
#define EXTIN(x) (0x10 + (x)) /* x = 0x00 - 0x0f */
[60] Fix | Delete
#define EXTOUT(x) (0x20 + (x)) /* x = 0x00 - 0x0f physical outs -> FXWC low 16 bits */
[61] Fix | Delete
#define FXBUS2(x) (0x30 + (x)) /* x = 0x00 - 0x0f copies of fx buses for capture -> FXWC high 16 bits */
[62] Fix | Delete
/* NB: 0x31 and 0x32 are shared with Center/LFE on SB live 5.1 */
[63] Fix | Delete
[64] Fix | Delete
#define A_FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x3f FX buses */
[65] Fix | Delete
#define A_EXTIN(x) (0x40 + (x)) /* x = 0x00 - 0x0f physical ins */
[66] Fix | Delete
#define A_P16VIN(x) (0x50 + (x)) /* x = 0x00 - 0x0f p16v ins (A2 only) "EMU32 inputs" */
[67] Fix | Delete
#define A_EXTOUT(x) (0x60 + (x)) /* x = 0x00 - 0x1f physical outs -> A_FXWC1 0x79-7f unknown */
[68] Fix | Delete
#define A_FXBUS2(x) (0x80 + (x)) /* x = 0x00 - 0x1f extra outs used for EFX capture -> A_FXWC2 */
[69] Fix | Delete
#define A_EMU32OUTH(x) (0xa0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_10 - _1F" */
[70] Fix | Delete
#define A_EMU32OUTL(x) (0xb0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_01 - _0F" */
[71] Fix | Delete
#define A3_EMU32IN(x) (0x160 + (x)) /* x = 0x00 - 0x1f "EMU32_IN_00 - _1F" - Only when .device = 0x0008 */
[72] Fix | Delete
#define A3_EMU32OUT(x) (0x1E0 + (x)) /* x = 0x00 - 0x1f "EMU32_OUT_00 - _1F" - Only when .device = 0x0008 */
[73] Fix | Delete
[74] Fix | Delete
#define C_00000000 0x40
[75] Fix | Delete
#define C_00000001 0x41
[76] Fix | Delete
#define C_00000002 0x42
[77] Fix | Delete
#define C_00000003 0x43
[78] Fix | Delete
#define C_00000004 0x44
[79] Fix | Delete
#define C_00000008 0x45
[80] Fix | Delete
#define C_00000010 0x46
[81] Fix | Delete
#define C_00000020 0x47
[82] Fix | Delete
#define C_00000100 0x48
[83] Fix | Delete
#define C_00010000 0x49
[84] Fix | Delete
#define C_00080000 0x4a
[85] Fix | Delete
#define C_10000000 0x4b
[86] Fix | Delete
#define C_20000000 0x4c
[87] Fix | Delete
#define C_40000000 0x4d
[88] Fix | Delete
#define C_80000000 0x4e
[89] Fix | Delete
#define C_7fffffff 0x4f
[90] Fix | Delete
#define C_ffffffff 0x50
[91] Fix | Delete
#define C_fffffffe 0x51
[92] Fix | Delete
#define C_c0000000 0x52
[93] Fix | Delete
#define C_4f1bbcdc 0x53
[94] Fix | Delete
#define C_5a7ef9db 0x54
[95] Fix | Delete
#define C_00100000 0x55 /* ?? */
[96] Fix | Delete
#define GPR_ACCU 0x56 /* ACCUM, accumulator */
[97] Fix | Delete
#define GPR_COND 0x57 /* CCR, condition register */
[98] Fix | Delete
#define GPR_NOISE0 0x58 /* noise source */
[99] Fix | Delete
#define GPR_NOISE1 0x59 /* noise source */
[100] Fix | Delete
#define GPR_IRQ 0x5a /* IRQ register */
[101] Fix | Delete
#define GPR_DBAC 0x5b /* TRAM Delay Base Address Counter */
[102] Fix | Delete
[103] Fix | Delete
/* Audigy constants */
[104] Fix | Delete
#define A_C_00000000 0xc0
[105] Fix | Delete
#define A_C_00000001 0xc1
[106] Fix | Delete
#define A_C_00000002 0xc2
[107] Fix | Delete
#define A_C_00000003 0xc3
[108] Fix | Delete
#define A_C_00000004 0xc4
[109] Fix | Delete
#define A_C_00000008 0xc5
[110] Fix | Delete
#define A_C_00000010 0xc6
[111] Fix | Delete
#define A_C_00000020 0xc7
[112] Fix | Delete
#define A_C_00000100 0xc8
[113] Fix | Delete
#define A_C_00010000 0xc9
[114] Fix | Delete
#define A_C_00000800 0xca
[115] Fix | Delete
#define A_C_10000000 0xcb
[116] Fix | Delete
#define A_C_20000000 0xcc
[117] Fix | Delete
#define A_C_40000000 0xcd
[118] Fix | Delete
#define A_C_80000000 0xce
[119] Fix | Delete
#define A_C_7fffffff 0xcf
[120] Fix | Delete
#define A_C_ffffffff 0xd0
[121] Fix | Delete
#define A_C_fffffffe 0xd1
[122] Fix | Delete
#define A_C_c0000000 0xd2
[123] Fix | Delete
#define A_C_4f1bbcdc 0xd3
[124] Fix | Delete
#define A_C_5a7ef9db 0xd4
[125] Fix | Delete
#define A_C_00100000 0xd5
[126] Fix | Delete
#define A_GPR_ACCU 0xd6 /* ACCUM, accumulator */
[127] Fix | Delete
#define A_GPR_COND 0xd7 /* CCR, condition register */
[128] Fix | Delete
#define A_GPR_NOISE0 0xd8 /* noise source */
[129] Fix | Delete
#define A_GPR_NOISE1 0xd9 /* noise source */
[130] Fix | Delete
#define A_GPR_IRQ 0xda /* IRQ register */
[131] Fix | Delete
#define A_GPR_DBAC 0xdb /* TRAM Delay Base Address Counter - internal */
[132] Fix | Delete
#define A_GPR_DBACE 0xde /* TRAM Delay Base Address Counter - external */
[133] Fix | Delete
[134] Fix | Delete
/* Each FX general purpose register is 32 bits in length, all bits are used */
[135] Fix | Delete
#define FXGPREGBASE 0x100 /* FX general purpose registers base */
[136] Fix | Delete
#define A_FXGPREGBASE 0x400 /* Audigy GPRs, 0x400 to 0x5ff */
[137] Fix | Delete
[138] Fix | Delete
#define A_TANKMEMCTLREGBASE 0x100 /* Tank memory control registers base - only for Audigy */
[139] Fix | Delete
#define A_TANKMEMCTLREG_MASK 0x1f /* only 5 bits used - only for Audigy */
[140] Fix | Delete
[141] Fix | Delete
/* Tank audio data is logarithmically compressed down to 16 bits before writing to TRAM and is */
[142] Fix | Delete
/* decompressed back to 20 bits on a read. There are a total of 160 locations, the last 32 */
[143] Fix | Delete
/* locations are for external TRAM. */
[144] Fix | Delete
#define TANKMEMDATAREGBASE 0x200 /* Tank memory data registers base */
[145] Fix | Delete
#define TANKMEMDATAREG_MASK 0x000fffff /* 20 bit tank audio data field */
[146] Fix | Delete
[147] Fix | Delete
/* Combined address field and memory opcode or flag field. 160 locations, last 32 are external */
[148] Fix | Delete
#define TANKMEMADDRREGBASE 0x300 /* Tank memory address registers base */
[149] Fix | Delete
#define TANKMEMADDRREG_ADDR_MASK 0x000fffff /* 20 bit tank address field */
[150] Fix | Delete
#define TANKMEMADDRREG_CLEAR 0x00800000 /* Clear tank memory */
[151] Fix | Delete
#define TANKMEMADDRREG_ALIGN 0x00400000 /* Align read or write relative to tank access */
[152] Fix | Delete
#define TANKMEMADDRREG_WRITE 0x00200000 /* Write to tank memory */
[153] Fix | Delete
#define TANKMEMADDRREG_READ 0x00100000 /* Read from tank memory */
[154] Fix | Delete
[155] Fix | Delete
#define GPR(x) (FXGPREGBASE + (x)) /* free GPRs: x = 0x00 - 0xff */
[156] Fix | Delete
#define ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */
[157] Fix | Delete
#define ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */
[158] Fix | Delete
#define ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */
[159] Fix | Delete
#define ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */
[160] Fix | Delete
[161] Fix | Delete
#define A_GPR(x) (A_FXGPREGBASE + (x))
[162] Fix | Delete
#define A_ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */
[163] Fix | Delete
#define A_ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */
[164] Fix | Delete
#define A_ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */
[165] Fix | Delete
#define A_ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */
[166] Fix | Delete
#define A_ITRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */
[167] Fix | Delete
#define A_ETRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */
[168] Fix | Delete
[169] Fix | Delete
/* cc_reg constants */
[170] Fix | Delete
#define CC_REG_NORMALIZED C_00000001
[171] Fix | Delete
#define CC_REG_BORROW C_00000002
[172] Fix | Delete
#define CC_REG_MINUS C_00000004
[173] Fix | Delete
#define CC_REG_ZERO C_00000008
[174] Fix | Delete
#define CC_REG_SATURATE C_00000010
[175] Fix | Delete
#define CC_REG_NONZERO C_00000100
[176] Fix | Delete
[177] Fix | Delete
#define A_CC_REG_NORMALIZED A_C_00000001
[178] Fix | Delete
#define A_CC_REG_BORROW A_C_00000002
[179] Fix | Delete
#define A_CC_REG_MINUS A_C_00000004
[180] Fix | Delete
#define A_CC_REG_ZERO A_C_00000008
[181] Fix | Delete
#define A_CC_REG_SATURATE A_C_00000010
[182] Fix | Delete
#define A_CC_REG_NONZERO A_C_00000100
[183] Fix | Delete
[184] Fix | Delete
/* FX buses */
[185] Fix | Delete
// These are arbitrary mappings; our DSP code simply expects
[186] Fix | Delete
// the config files to route the channels this way.
[187] Fix | Delete
// The numbers are documented in {audigy,sb-live}-mixer.rst.
[188] Fix | Delete
#define FXBUS_PCM_LEFT 0x00
[189] Fix | Delete
#define FXBUS_PCM_RIGHT 0x01
[190] Fix | Delete
#define FXBUS_PCM_LEFT_REAR 0x02
[191] Fix | Delete
#define FXBUS_PCM_RIGHT_REAR 0x03
[192] Fix | Delete
#define FXBUS_MIDI_LEFT 0x04
[193] Fix | Delete
#define FXBUS_MIDI_RIGHT 0x05
[194] Fix | Delete
#define FXBUS_PCM_CENTER 0x06
[195] Fix | Delete
#define FXBUS_PCM_LFE 0x07
[196] Fix | Delete
#define FXBUS_PCM_LEFT_FRONT 0x08
[197] Fix | Delete
#define FXBUS_PCM_RIGHT_FRONT 0x09
[198] Fix | Delete
#define FXBUS_MIDI_REVERB 0x0c
[199] Fix | Delete
#define FXBUS_MIDI_CHORUS 0x0d
[200] Fix | Delete
#define FXBUS_PCM_LEFT_SIDE 0x0e
[201] Fix | Delete
#define FXBUS_PCM_RIGHT_SIDE 0x0f
[202] Fix | Delete
#define FXBUS_PT_LEFT 0x14
[203] Fix | Delete
#define FXBUS_PT_RIGHT 0x15
[204] Fix | Delete
[205] Fix | Delete
/* Inputs */
[206] Fix | Delete
#define EXTIN_AC97_L 0x00 /* AC'97 capture channel - left */
[207] Fix | Delete
#define EXTIN_AC97_R 0x01 /* AC'97 capture channel - right */
[208] Fix | Delete
#define EXTIN_SPDIF_CD_L 0x02 /* internal S/PDIF CD - onboard - left */
[209] Fix | Delete
#define EXTIN_SPDIF_CD_R 0x03 /* internal S/PDIF CD - onboard - right */
[210] Fix | Delete
#define EXTIN_ZOOM_L 0x04 /* Zoom Video I2S - left */
[211] Fix | Delete
#define EXTIN_ZOOM_R 0x05 /* Zoom Video I2S - right */
[212] Fix | Delete
#define EXTIN_TOSLINK_L 0x06 /* LiveDrive - TOSLink Optical - left */
[213] Fix | Delete
#define EXTIN_TOSLINK_R 0x07 /* LiveDrive - TOSLink Optical - right */
[214] Fix | Delete
#define EXTIN_LINE1_L 0x08 /* LiveDrive - Line/Mic 1 - left */
[215] Fix | Delete
#define EXTIN_LINE1_R 0x09 /* LiveDrive - Line/Mic 1 - right */
[216] Fix | Delete
#define EXTIN_COAX_SPDIF_L 0x0a /* LiveDrive - Coaxial S/PDIF - left */
[217] Fix | Delete
#define EXTIN_COAX_SPDIF_R 0x0b /* LiveDrive - Coaxial S/PDIF - right */
[218] Fix | Delete
#define EXTIN_LINE2_L 0x0c /* LiveDrive - Line/Mic 2 - left */
[219] Fix | Delete
#define EXTIN_LINE2_R 0x0d /* LiveDrive - Line/Mic 2 - right */
[220] Fix | Delete
[221] Fix | Delete
/* Outputs */
[222] Fix | Delete
#define EXTOUT_AC97_L 0x00 /* AC'97 playback channel - left */
[223] Fix | Delete
#define EXTOUT_AC97_R 0x01 /* AC'97 playback channel - right */
[224] Fix | Delete
#define EXTOUT_TOSLINK_L 0x02 /* LiveDrive - TOSLink Optical - left */
[225] Fix | Delete
#define EXTOUT_TOSLINK_R 0x03 /* LiveDrive - TOSLink Optical - right */
[226] Fix | Delete
#define EXTOUT_AC97_CENTER 0x04 /* SB Live 5.1 - center */
[227] Fix | Delete
#define EXTOUT_AC97_LFE 0x05 /* SB Live 5.1 - LFE */
[228] Fix | Delete
#define EXTOUT_HEADPHONE_L 0x06 /* LiveDrive - Headphone - left */
[229] Fix | Delete
#define EXTOUT_HEADPHONE_R 0x07 /* LiveDrive - Headphone - right */
[230] Fix | Delete
#define EXTOUT_REAR_L 0x08 /* Rear channel - left */
[231] Fix | Delete
#define EXTOUT_REAR_R 0x09 /* Rear channel - right */
[232] Fix | Delete
#define EXTOUT_ADC_CAP_L 0x0a /* ADC Capture buffer - left */
[233] Fix | Delete
#define EXTOUT_ADC_CAP_R 0x0b /* ADC Capture buffer - right */
[234] Fix | Delete
#define EXTOUT_MIC_CAP 0x0c /* MIC Capture buffer */
[235] Fix | Delete
#define EXTOUT_AC97_REAR_L 0x0d /* SB Live 5.1 (c) 2003 - Rear Left */
[236] Fix | Delete
#define EXTOUT_AC97_REAR_R 0x0e /* SB Live 5.1 (c) 2003 - Rear Right */
[237] Fix | Delete
#define EXTOUT_ACENTER 0x11 /* Analog Center */
[238] Fix | Delete
#define EXTOUT_ALFE 0x12 /* Analog LFE */
[239] Fix | Delete
[240] Fix | Delete
/* Audigy Inputs */
[241] Fix | Delete
#define A_EXTIN_AC97_L 0x00 /* AC'97 capture channel - left */
[242] Fix | Delete
#define A_EXTIN_AC97_R 0x01 /* AC'97 capture channel - right */
[243] Fix | Delete
#define A_EXTIN_SPDIF_CD_L 0x02 /* digital CD left */
[244] Fix | Delete
#define A_EXTIN_SPDIF_CD_R 0x03 /* digital CD left */
[245] Fix | Delete
#define A_EXTIN_OPT_SPDIF_L 0x04 /* audigy drive Optical SPDIF - left */
[246] Fix | Delete
#define A_EXTIN_OPT_SPDIF_R 0x05 /* right */
[247] Fix | Delete
#define A_EXTIN_LINE2_L 0x08 /* audigy drive line2/mic2 - left */
[248] Fix | Delete
#define A_EXTIN_LINE2_R 0x09 /* right */
[249] Fix | Delete
#define A_EXTIN_ADC_L 0x0a /* Philips ADC - left */
[250] Fix | Delete
#define A_EXTIN_ADC_R 0x0b /* right */
[251] Fix | Delete
#define A_EXTIN_AUX2_L 0x0c /* audigy drive aux2 - left */
[252] Fix | Delete
#define A_EXTIN_AUX2_R 0x0d /* - right */
[253] Fix | Delete
[254] Fix | Delete
/* Audigiy Outputs */
[255] Fix | Delete
#define A_EXTOUT_FRONT_L 0x00 /* digital front left */
[256] Fix | Delete
#define A_EXTOUT_FRONT_R 0x01 /* right */
[257] Fix | Delete
#define A_EXTOUT_CENTER 0x02 /* digital front center */
[258] Fix | Delete
#define A_EXTOUT_LFE 0x03 /* digital front lfe */
[259] Fix | Delete
#define A_EXTOUT_HEADPHONE_L 0x04 /* headphone audigy drive left */
[260] Fix | Delete
#define A_EXTOUT_HEADPHONE_R 0x05 /* right */
[261] Fix | Delete
#define A_EXTOUT_REAR_L 0x06 /* digital rear left */
[262] Fix | Delete
#define A_EXTOUT_REAR_R 0x07 /* right */
[263] Fix | Delete
#define A_EXTOUT_AFRONT_L 0x08 /* analog front left */
[264] Fix | Delete
#define A_EXTOUT_AFRONT_R 0x09 /* right */
[265] Fix | Delete
#define A_EXTOUT_ACENTER 0x0a /* analog center */
[266] Fix | Delete
#define A_EXTOUT_ALFE 0x0b /* analog LFE */
[267] Fix | Delete
#define A_EXTOUT_ASIDE_L 0x0c /* analog side left - Audigy 2 ZS */
[268] Fix | Delete
#define A_EXTOUT_ASIDE_R 0x0d /* right - Audigy 2 ZS */
[269] Fix | Delete
#define A_EXTOUT_AREAR_L 0x0e /* analog rear left */
[270] Fix | Delete
#define A_EXTOUT_AREAR_R 0x0f /* right */
[271] Fix | Delete
#define A_EXTOUT_AC97_L 0x10 /* AC97 left (front) */
[272] Fix | Delete
#define A_EXTOUT_AC97_R 0x11 /* right */
[273] Fix | Delete
#define A_EXTOUT_ADC_CAP_L 0x16 /* ADC capture buffer left */
[274] Fix | Delete
#define A_EXTOUT_ADC_CAP_R 0x17 /* right */
[275] Fix | Delete
#define A_EXTOUT_MIC_CAP 0x18 /* Mic capture buffer */
[276] Fix | Delete
[277] Fix | Delete
/* Definitions for debug register. Note that these are for emu10k1 ONLY. */
[278] Fix | Delete
#define EMU10K1_DBG_ZC 0x80000000 /* zero tram counter */
[279] Fix | Delete
#define EMU10K1_DBG_SATURATION_OCCURED 0x02000000 /* saturation control */
[280] Fix | Delete
#define EMU10K1_DBG_SATURATION_ADDR 0x01ff0000 /* saturation address */
[281] Fix | Delete
#define EMU10K1_DBG_SINGLE_STEP 0x00008000 /* single step mode */
[282] Fix | Delete
#define EMU10K1_DBG_STEP 0x00004000 /* start single step */
[283] Fix | Delete
#define EMU10K1_DBG_CONDITION_CODE 0x00003e00 /* condition code */
[284] Fix | Delete
#define EMU10K1_DBG_SINGLE_STEP_ADDR 0x000001ff /* single step address */
[285] Fix | Delete
[286] Fix | Delete
/* Definitions for emu10k2 debug register. */
[287] Fix | Delete
#define A_DBG_ZC 0x40000000 /* zero tram counter */
[288] Fix | Delete
#define A_DBG_SATURATION_OCCURED 0x20000000
[289] Fix | Delete
#define A_DBG_SATURATION_ADDR 0x0ffc0000
[290] Fix | Delete
#define A_DBG_SINGLE_STEP 0x00020000 /* Set to zero to start dsp */
[291] Fix | Delete
#define A_DBG_STEP 0x00010000
[292] Fix | Delete
#define A_DBG_CONDITION_CODE 0x0000f800
[293] Fix | Delete
#define A_DBG_STEP_ADDR 0x000003ff
[294] Fix | Delete
[295] Fix | Delete
struct snd_emu10k1_fx8010_info {
[296] Fix | Delete
unsigned int internal_tram_size; /* in samples */
[297] Fix | Delete
unsigned int external_tram_size; /* in samples */
[298] Fix | Delete
char fxbus_names[16][32]; /* names of FXBUSes */
[299] Fix | Delete
char extin_names[16][32]; /* names of external inputs */
[300] Fix | Delete
char extout_names[32][32]; /* names of external outputs */
[301] Fix | Delete
unsigned int gpr_controls; /* count of GPR controls */
[302] Fix | Delete
};
[303] Fix | Delete
[304] Fix | Delete
#define EMU10K1_GPR_TRANSLATION_NONE 0
[305] Fix | Delete
#define EMU10K1_GPR_TRANSLATION_TABLE100 1
[306] Fix | Delete
#define EMU10K1_GPR_TRANSLATION_BASS 2
[307] Fix | Delete
#define EMU10K1_GPR_TRANSLATION_TREBLE 3
[308] Fix | Delete
#define EMU10K1_GPR_TRANSLATION_ONOFF 4
[309] Fix | Delete
[310] Fix | Delete
enum emu10k1_ctl_elem_iface {
[311] Fix | Delete
EMU10K1_CTL_ELEM_IFACE_MIXER = 2, /* virtual mixer device */
[312] Fix | Delete
EMU10K1_CTL_ELEM_IFACE_PCM = 3, /* PCM device */
[313] Fix | Delete
};
[314] Fix | Delete
[315] Fix | Delete
struct emu10k1_ctl_elem_id {
[316] Fix | Delete
unsigned int pad; /* don't use */
[317] Fix | Delete
int iface; /* interface identifier */
[318] Fix | Delete
unsigned int device; /* device/client number */
[319] Fix | Delete
unsigned int subdevice; /* subdevice (substream) number */
[320] Fix | Delete
unsigned char name[44]; /* ASCII name of item */
[321] Fix | Delete
unsigned int index; /* index of item */
[322] Fix | Delete
};
[323] Fix | Delete
[324] Fix | Delete
struct snd_emu10k1_fx8010_control_gpr {
[325] Fix | Delete
struct emu10k1_ctl_elem_id id; /* full control ID definition */
[326] Fix | Delete
unsigned int vcount; /* visible count */
[327] Fix | Delete
unsigned int count; /* count of GPR (1..16) */
[328] Fix | Delete
unsigned short gpr[32]; /* GPR number(s) */
[329] Fix | Delete
unsigned int value[32]; /* initial values */
[330] Fix | Delete
unsigned int min; /* minimum range */
[331] Fix | Delete
unsigned int max; /* maximum range */
[332] Fix | Delete
unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */
[333] Fix | Delete
const unsigned int *tlv;
[334] Fix | Delete
};
[335] Fix | Delete
[336] Fix | Delete
/* old ABI without TLV support */
[337] Fix | Delete
struct snd_emu10k1_fx8010_control_old_gpr {
[338] Fix | Delete
struct emu10k1_ctl_elem_id id;
[339] Fix | Delete
unsigned int vcount;
[340] Fix | Delete
unsigned int count;
[341] Fix | Delete
unsigned short gpr[32];
[342] Fix | Delete
unsigned int value[32];
[343] Fix | Delete
unsigned int min;
[344] Fix | Delete
unsigned int max;
[345] Fix | Delete
unsigned int translation;
[346] Fix | Delete
};
[347] Fix | Delete
[348] Fix | Delete
struct snd_emu10k1_fx8010_code {
[349] Fix | Delete
char name[128];
[350] Fix | Delete
[351] Fix | Delete
__EMU10K1_DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */
[352] Fix | Delete
__u32 *gpr_map; /* initializers */
[353] Fix | Delete
[354] Fix | Delete
unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */
[355] Fix | Delete
struct snd_emu10k1_fx8010_control_gpr *gpr_add_controls; /* GPR controls to add/replace */
[356] Fix | Delete
[357] Fix | Delete
unsigned int gpr_del_control_count; /* count of GPR controls to remove */
[358] Fix | Delete
struct emu10k1_ctl_elem_id *gpr_del_controls; /* IDs of GPR controls to remove */
[359] Fix | Delete
[360] Fix | Delete
unsigned int gpr_list_control_count; /* count of GPR controls to list */
[361] Fix | Delete
unsigned int gpr_list_control_total; /* total count of GPR controls */
[362] Fix | Delete
struct snd_emu10k1_fx8010_control_gpr *gpr_list_controls; /* listed GPR controls */
[363] Fix | Delete
[364] Fix | Delete
__EMU10K1_DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */
[365] Fix | Delete
__u32 *tram_data_map; /* data initializers */
[366] Fix | Delete
__u32 *tram_addr_map; /* map initializers */
[367] Fix | Delete
[368] Fix | Delete
__EMU10K1_DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */
[369] Fix | Delete
__u32 *code; /* one instruction - 64 bits */
[370] Fix | Delete
};
[371] Fix | Delete
[372] Fix | Delete
struct snd_emu10k1_fx8010_tram {
[373] Fix | Delete
unsigned int address; /* 31.bit == 1 -> external TRAM */
[374] Fix | Delete
unsigned int size; /* size in samples (4 bytes) */
[375] Fix | Delete
unsigned int *samples; /* pointer to samples (20-bit) */
[376] Fix | Delete
/* NULL->clear memory */
[377] Fix | Delete
};
[378] Fix | Delete
[379] Fix | Delete
struct snd_emu10k1_fx8010_pcm_rec {
[380] Fix | Delete
unsigned int substream; /* substream number */
[381] Fix | Delete
unsigned int res1; /* reserved */
[382] Fix | Delete
unsigned int channels; /* 16-bit channels count, zero = remove this substream */
[383] Fix | Delete
unsigned int tram_start; /* ring buffer position in TRAM (in samples) */
[384] Fix | Delete
unsigned int buffer_size; /* count of buffered samples */
[385] Fix | Delete
unsigned short gpr_size; /* GPR containing size of ringbuffer in samples (host) */
[386] Fix | Delete
unsigned short gpr_ptr; /* GPR containing current pointer in the ring buffer (host = reset, FX8010) */
[387] Fix | Delete
unsigned short gpr_count; /* GPR containing count of samples between two interrupts (host) */
[388] Fix | Delete
unsigned short gpr_tmpcount; /* GPR containing current count of samples to interrupt (host = set, FX8010) */
[389] Fix | Delete
unsigned short gpr_trigger; /* GPR containing trigger (activate) information (host) */
[390] Fix | Delete
unsigned short gpr_running; /* GPR containing info if PCM is running (FX8010) */
[391] Fix | Delete
unsigned char pad; /* reserved */
[392] Fix | Delete
unsigned char etram[32]; /* external TRAM address & data (one per channel) */
[393] Fix | Delete
unsigned int res2; /* reserved */
[394] Fix | Delete
};
[395] Fix | Delete
[396] Fix | Delete
#define SNDRV_EMU10K1_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1)
[397] Fix | Delete
[398] Fix | Delete
#define SNDRV_EMU10K1_IOCTL_INFO _IOR ('H', 0x10, struct snd_emu10k1_fx8010_info)
[399] Fix | Delete
#define SNDRV_EMU10K1_IOCTL_CODE_POKE _IOW ('H', 0x11, struct snd_emu10k1_fx8010_code)
[400] Fix | Delete
#define SNDRV_EMU10K1_IOCTL_CODE_PEEK _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code)
[401] Fix | Delete
#define SNDRV_EMU10K1_IOCTL_TRAM_SETUP _IOW ('H', 0x20, int)
[402] Fix | Delete
#define SNDRV_EMU10K1_IOCTL_TRAM_POKE _IOW ('H', 0x21, struct snd_emu10k1_fx8010_tram)
[403] Fix | Delete
#define SNDRV_EMU10K1_IOCTL_TRAM_PEEK _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram)
[404] Fix | Delete
#define SNDRV_EMU10K1_IOCTL_PCM_POKE _IOW ('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec)
[405] Fix | Delete
#define SNDRV_EMU10K1_IOCTL_PCM_PEEK _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec)
[406] Fix | Delete
#define SNDRV_EMU10K1_IOCTL_PVERSION _IOR ('H', 0x40, int)
[407] Fix | Delete
#define SNDRV_EMU10K1_IOCTL_STOP _IO ('H', 0x80)
[408] Fix | Delete
#define SNDRV_EMU10K1_IOCTL_CONTINUE _IO ('H', 0x81)
[409] Fix | Delete
#define SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER _IO ('H', 0x82)
[410] Fix | Delete
#define SNDRV_EMU10K1_IOCTL_SINGLE_STEP _IOW ('H', 0x83, int)
[411] Fix | Delete
#define SNDRV_EMU10K1_IOCTL_DBG_READ _IOR ('H', 0x84, int)
[412] Fix | Delete
[413] Fix | Delete
#endif /* __SOUND_EMU10K1_H */
[414] Fix | Delete
[415] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function