source: cmedia/trunk/Sblive/cardwi.h@ 354

Last change on this file since 354 was 354, checked in by stevenhl, 17 years ago

Import untested baseline cmedia sources, work products and binaries
Binaries and work products should be deleted from repository.
once new builds are verified to work.

File size: 2.8 KB
Line 
1/* $Id: cardwi.h,v 1.1 2000/04/23 14:55:42 ktk Exp $ */
2
3/*
4 **********************************************************************
5 * cardwi.h -- header file for card wave input functions
6 * Copyright 1999, 2000 Creative Labs, Inc.
7 *
8 **********************************************************************
9 *
10 * Date Author Summary of changes
11 * ---- ------ ------------------
12 * October 20, 1999 Bertrand Lee base code release
13 *
14 **********************************************************************
15 *
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License as
18 * published by the Free Software Foundation; either version 2 of
19 * the License, or (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public
27 * License along with this program; if not, write to the Free
28 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
29 * USA.
30 *
31 **********************************************************************
32 */
33#ifndef _CARDWI_H
34#define _CARDWI_H
35
36#include "icardwav.h"
37
38struct wave_in
39{
40 struct list_head list;
41
42 u32 state;
43 struct record *rec_ptr;
44 struct memhandle *memhandle;
45 struct emu_timer *timer;
46 u32 callbacksize;
47 struct wave_format wave_fmt;
48};
49
50struct wiinst
51{
52 struct wave_in *wave_in;
53 struct wave_format wave_fmt;
54 u16 ossfragshift;
55 u32 fragment_size;
56 u32 numfrags;
57 wait_queue_head_t wait_queue;
58 int mapped;
59 u32 total_recorded; /* total bytes read() from device */
60 u32 blocks;
61 u32 curpos; /* hardware cursor position */
62 spinlock_t lock;
63 u8 recsrc;
64};
65
66struct emu10k1_wavein
67{
68 struct wave_in *ac97;
69 struct wave_in *mic;
70 struct wave_in *fx;
71
72 u8 recsrc;
73};
74
75
76#define WAVEIN_MAXBUFSIZE 65536
77#define WAVEIN_MINBUFSIZE 368
78
79#define WAVEIN_DEFAULTFRAGLEN 100
80#define WAVEIN_DEFAULTBUFLEN 1000
81
82#define WAVEIN_MINFRAGSHIFT 8
83
84int emu10k1_wavein_open(struct emu10k1_wavedevice *);
85void emu10k1_wavein_close(struct emu10k1_wavedevice *);
86void emu10k1_wavein_start(struct emu10k1_wavedevice *);
87void emu10k1_wavein_stop(struct emu10k1_wavedevice *);
88void emu10k1_wavein_getxfersize(struct wiinst *, u32 *);
89void emu10k1_wavein_xferdata(struct wiinst *, u8 *, u32 *);
90int emu10k1_wavein_setformat(struct emu10k1_wavedevice *);
91void emu10k1_wavein_update(struct wiinst *);
92
93
94#endif /* _CARDWI_H */
Note: See TracBrowser for help on using the repository browser.