Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
aw2-saa7146.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * Copyright (C) 2008 Cedric Bregardis <[email protected]> and
4  * Jean-Christian Hassler <[email protected]>
5  *
6  * This file is part of the Audiowerk2 ALSA driver
7  *
8  * The Audiowerk2 ALSA driver is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; version 2.
11  *
12  * The Audiowerk2 ALSA driver is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with the Audiowerk2 ALSA driver; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20  * USA.
21  *
22  *****************************************************************************/
23 
24 #ifndef AW2_SAA7146_H
25 #define AW2_SAA7146_H
26 
27 #define NB_STREAM_PLAYBACK 2
28 #define NB_STREAM_CAPTURE 1
29 
30 #define NUM_STREAM_PLAYBACK_ANA 0
31 #define NUM_STREAM_PLAYBACK_DIG 1
32 
33 #define NUM_STREAM_CAPTURE_ANA 0
34 
35 typedef void (*snd_aw2_saa7146_it_cb) (void *);
36 
40 };
41 
42 /* definition of the chip-specific record */
43 
46 };
47 
48 extern void snd_aw2_saa7146_setup(struct snd_aw2_saa7146 *chip,
49  void __iomem *pci_base_addr);
50 extern int snd_aw2_saa7146_free(struct snd_aw2_saa7146 *chip);
51 
53  int stream_number,
54  unsigned long dma_addr,
55  unsigned long period_size,
56  unsigned long buffer_size);
58  int stream_number,
59  unsigned long dma_addr,
60  unsigned long period_size,
61  unsigned long buffer_size);
62 extern void snd_aw2_saa7146_define_it_playback_callback(unsigned int
65  p_it_callback,
66  void *p_callback_param);
67 extern void snd_aw2_saa7146_define_it_capture_callback(unsigned int
70  p_it_callback,
71  void *p_callback_param);
73  *chip, int stream_number);
75  *chip, int stream_number);
76 
78  *chip,
79  int stream_number);
81  *chip, int stream_number);
82 
83 extern irqreturn_t snd_aw2_saa7146_interrupt(int irq, void *dev_id);
85  *chip,
86  int stream_number,
87  unsigned char
88  *start_addr,
89  unsigned int
90  buffer_size);
91 extern unsigned int snd_aw2_saa7146_get_hw_ptr_capture(struct snd_aw2_saa7146
92  *chip,
93  int stream_number,
94  unsigned char
95  *start_addr,
96  unsigned int
97  buffer_size);
98 
100  int use_digital);
101 
103  *chip);
104 
105 #endif