[142] | 1 | /* $Id: cardwi.h 142 2000-04-23 14:55:46Z ktk $ */
|
---|
| 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 |
|
---|
| 38 | struct 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 |
|
---|
| 50 | struct 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 |
|
---|
| 66 | struct 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 |
|
---|
| 84 | int emu10k1_wavein_open(struct emu10k1_wavedevice *);
|
---|
| 85 | void emu10k1_wavein_close(struct emu10k1_wavedevice *);
|
---|
| 86 | void emu10k1_wavein_start(struct emu10k1_wavedevice *);
|
---|
| 87 | void emu10k1_wavein_stop(struct emu10k1_wavedevice *);
|
---|
| 88 | void emu10k1_wavein_getxfersize(struct wiinst *, u32 *);
|
---|
| 89 | void emu10k1_wavein_xferdata(struct wiinst *, u8 *, u32 *);
|
---|
| 90 | int emu10k1_wavein_setformat(struct emu10k1_wavedevice *);
|
---|
| 91 | void emu10k1_wavein_update(struct wiinst *);
|
---|
| 92 |
|
---|
| 93 |
|
---|
| 94 | #endif /* _CARDWI_H */
|
---|