aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/ad1848.h43
-rw-r--r--include/sound/wss.h6
2 files changed, 13 insertions, 36 deletions
diff --git a/include/sound/ad1848.h b/include/sound/ad1848.h
index d9aebdf6db63..d740e633e81b 100644
--- a/include/sound/ad1848.h
+++ b/include/sound/ad1848.h
@@ -25,6 +25,8 @@
25#include "pcm.h" 25#include "pcm.h"
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27 27
28#include "wss.h" /* temporary till the driver is removed */
29
28/* IO ports */ 30/* IO ports */
29 31
30#define AD1848P( chip, x ) ( (chip) -> port + c_d_c_AD1848##x ) 32#define AD1848P( chip, x ) ( (chip) -> port + c_d_c_AD1848##x )
@@ -127,48 +129,20 @@
127#define AD1848_THINKPAD_CTL_PORT2 0x15e9 129#define AD1848_THINKPAD_CTL_PORT2 0x15e9
128#define AD1848_THINKPAD_CS4248_ENABLE_BIT 0x02 130#define AD1848_THINKPAD_CS4248_ENABLE_BIT 0x02
129 131
130struct snd_ad1848 {
131 unsigned long port; /* i/o port */
132 struct resource *res_port;
133 int irq; /* IRQ line */
134 int dma; /* data DMA */
135 unsigned short version; /* version of CODEC chip */
136 unsigned short mode; /* see to AD1848_MODE_XXXX */
137 unsigned short hardware; /* see to AD1848_HW_XXXX */
138 unsigned short single_dma:1; /* forced single DMA mode (GUS 16-bit daughter board) or dma1 == dma2 */
139
140 struct snd_pcm *pcm;
141 struct snd_pcm_substream *playback_substream;
142 struct snd_pcm_substream *capture_substream;
143 struct snd_card *card;
144
145 unsigned char image[32]; /* SGalaxy needs an access to extended registers */
146 int mce_bit;
147 int calibrate_mute;
148 int dma_size;
149 int thinkpad_flag; /* Thinkpad CS4248 needs some extra help */
150
151#ifdef CONFIG_PM
152 void (*suspend)(struct snd_ad1848 *chip);
153 void (*resume)(struct snd_ad1848 *chip);
154#endif
155
156 spinlock_t reg_lock;
157};
158
159/* exported functions */ 132/* exported functions */
160 133
161void snd_ad1848_out(struct snd_ad1848 *chip, unsigned char reg, unsigned char value); 134void snd_ad1848_out(struct snd_wss *chip, unsigned char reg,
135 unsigned char value);
162 136
163int snd_ad1848_create(struct snd_card *card, 137int snd_ad1848_create(struct snd_card *card,
164 unsigned long port, 138 unsigned long port,
165 int irq, int dma, 139 int irq, int dma,
166 unsigned short hardware, 140 unsigned short hardware,
167 struct snd_ad1848 ** chip); 141 struct snd_wss **chip);
168 142
169int snd_ad1848_pcm(struct snd_ad1848 * chip, int device, struct snd_pcm **rpcm); 143int snd_ad1848_pcm(struct snd_wss *chip, int device, struct snd_pcm **rpcm);
170const struct snd_pcm_ops *snd_ad1848_get_pcm_ops(int direction); 144const struct snd_pcm_ops *snd_ad1848_get_pcm_ops(int direction);
171int snd_ad1848_mixer(struct snd_ad1848 * chip); 145int snd_ad1848_mixer(struct snd_wss *chip);
172 146
173/* exported mixer stuffs */ 147/* exported mixer stuffs */
174enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE }; 148enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE };
@@ -213,6 +187,7 @@ struct ad1848_mix_elem {
213 .private_value = AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert), \ 187 .private_value = AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert), \
214 .tlv = xtlv } 188 .tlv = xtlv }
215 189
216int snd_ad1848_add_ctl_elem(struct snd_ad1848 *chip, const struct ad1848_mix_elem *c); 190int snd_ad1848_add_ctl_elem(struct snd_wss *chip,
191 const struct ad1848_mix_elem *c);
217 192
218#endif /* __SOUND_AD1848_H */ 193#endif /* __SOUND_AD1848_H */
diff --git a/include/sound/wss.h b/include/sound/wss.h
index 3b53973f96a7..1e0dc77f0d25 100644
--- a/include/sound/wss.h
+++ b/include/sound/wss.h
@@ -77,8 +77,10 @@ struct snd_wss {
77 unsigned short mode; /* see to WSS_MODE_XXXX */ 77 unsigned short mode; /* see to WSS_MODE_XXXX */
78 unsigned short hardware; /* see to WSS_HW_XXXX */ 78 unsigned short hardware; /* see to WSS_HW_XXXX */
79 unsigned short hwshare; /* shared resources */ 79 unsigned short hwshare; /* shared resources */
80 unsigned short single_dma:1, /* forced single DMA mode (GUS 16-bit daughter board) or dma1 == dma2 */ 80 unsigned short single_dma:1, /* forced single DMA mode (GUS 16-bit */
81 ebus_flag:1; /* SPARC: EBUS present */ 81 /* daughter board) or dma1 == dma2 */
82 ebus_flag:1, /* SPARC: EBUS present */
83 thinkpad_flag:1; /* Thinkpad CS4248 needs extra help */
82 84
83 struct snd_card *card; 85 struct snd_card *card;
84 struct snd_pcm *pcm; 86 struct snd_pcm *pcm;