2 **********************************************************************
3 * passthrough.h -- Emu10k1 digital passthrough header file
4 * Copyright (C) 2001 Juha Yrjölä <jyrjola@cc.hut.fi>
6 **********************************************************************
8 * Date Author Summary of changes
9 * ---- ------ ------------------
10 * May 15, 2001 Juha Yrjölä base code release
12 **********************************************************************
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License as
16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public
25 * License along with this program; if not, write to the Free
26 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
29 **********************************************************************
32 #ifndef _PASSTHROUGH_H
33 #define _PASSTHROUGH_H
37 /* number of 16-bit stereo samples in XTRAM buffer */
38 #define PT_SAMPLES 0x8000
39 #define PT_BLOCKSAMPLES 0x400
40 #define PT_BLOCKSIZE (PT_BLOCKSAMPLES*4)
41 #define PT_BLOCKSIZE_LOG2 12
42 #define PT_BLOCKCOUNT (PT_SAMPLES/PT_BLOCKSAMPLES)
43 #define PT_INITPTR (PT_SAMPLES/2-1)
45 #define PT_STATE_INACTIVE 0
46 #define PT_STATE_ACTIVATED 1
47 #define PT_STATE_PLAYING 2
49 /* passthrough struct */
52 u8 selected, state, spcs_to_use;
53 int intr_gpr, enable_gpr, pos_gpr;
54 u32 blocks_played, blocks_copied, old_spcs[3];
60 char *patch_name, *intr_gpr_name, *enable_gpr_name, *pos_gpr_name;
62 wait_queue_head_t wait;
66 ssize_t emu10k1_pt_write(struct file *file, const char *buf, size_t count);
67 void emu10k1_pt_stop(struct emu10k1_card *card);
68 void emu10k1_pt_waveout_update(struct emu10k1_wavedevice *wave_dev);
70 #endif /* _PASSTHROUGH_H */