2 **********************************************************************
3 * cardwi.h -- header file for card wave input functions
4 * Copyright 1999, 2000 Creative Labs, Inc.
6 **********************************************************************
8 * Date Author Summary of changes
9 * ---- ------ ------------------
10 * October 20, 1999 Bertrand Lee 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 **********************************************************************
38 struct wavein_buffer
{
42 u32 hw_pos
; /* hardware cursor position */
43 u32 pos
; /* software cursor position */
44 u32 bytestocopy
; /* bytes of recorded data available */
54 dma_addr_t dma_handle
;
60 struct emu_timer timer
;
61 struct wave_format format
;
62 struct wavein_buffer buffer
;
63 wait_queue_head_t wait_queue
;
65 u32 total_recorded
; /* total bytes read() from device */
72 #define WAVEIN_MAXBUFSIZE 65536
73 #define WAVEIN_MINBUFSIZE 368
75 #define WAVEIN_DEFAULTFRAGLEN 100
76 #define WAVEIN_DEFAULTBUFLEN 1000
78 #define WAVEIN_MINFRAGSHIFT 8
79 #define WAVEIN_MINFRAGS 2
81 int emu10k1_wavein_open(struct emu10k1_wavedevice
*);
82 void emu10k1_wavein_close(struct emu10k1_wavedevice
*);
83 void emu10k1_wavein_start(struct emu10k1_wavedevice
*);
84 void emu10k1_wavein_stop(struct emu10k1_wavedevice
*);
85 void emu10k1_wavein_getxfersize(struct wiinst
*, u32
*);
86 void emu10k1_wavein_xferdata(struct wiinst
*, u8 __user
*, u32
*);
87 int emu10k1_wavein_setformat(struct emu10k1_wavedevice
*, struct wave_format
*);
88 void emu10k1_wavein_update(struct emu10k1_card
*, struct wiinst
*);
91 #endif /* _CARDWI_H */