aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:19:28 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:09 -0500
commitdc4cafbadad1ae2322e598f2cb72720ef4095fee (patch)
treec7b93b3a5d8f8ffffe951dcb03579859c198eeb6 /include/sound
parent97f02e05f246a2346275c1c93a3079e8933e74b2 (diff)
[ALSA] Remove xxx_t typedefs: I2C drivers
Modules: AK4114 receiver,AK4117 receiver,AK4XXX AD/DA converters [Missing files in last commit] Remove xxx_t typedefs from the i2c drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/ak4114.h30
-rw-r--r--include/sound/ak4117.h24
-rw-r--r--include/sound/ak4xxx-adda.h22
3 files changed, 36 insertions, 40 deletions
diff --git a/include/sound/ak4114.h b/include/sound/ak4114.h
index f3f2c3e5ae51..11702aa0bea9 100644
--- a/include/sound/ak4114.h
+++ b/include/sound/ak4114.h
@@ -163,10 +163,8 @@
163typedef void (ak4114_write_t)(void *private_data, unsigned char addr, unsigned char data); 163typedef void (ak4114_write_t)(void *private_data, unsigned char addr, unsigned char data);
164typedef unsigned char (ak4114_read_t)(void *private_data, unsigned char addr); 164typedef unsigned char (ak4114_read_t)(void *private_data, unsigned char addr);
165 165
166typedef struct ak4114 ak4114_t;
167
168struct ak4114 { 166struct ak4114 {
169 snd_card_t * card; 167 struct snd_card *card;
170 ak4114_write_t * write; 168 ak4114_write_t * write;
171 ak4114_read_t * read; 169 ak4114_read_t * read;
172 void * private_data; 170 void * private_data;
@@ -174,9 +172,9 @@ struct ak4114 {
174 spinlock_t lock; 172 spinlock_t lock;
175 unsigned char regmap[7]; 173 unsigned char regmap[7];
176 unsigned char txcsb[5]; 174 unsigned char txcsb[5];
177 snd_kcontrol_t *kctls[AK4114_CONTROLS]; 175 struct snd_kcontrol *kctls[AK4114_CONTROLS];
178 snd_pcm_substream_t *playback_substream; 176 struct snd_pcm_substream *playback_substream;
179 snd_pcm_substream_t *capture_substream; 177 struct snd_pcm_substream *capture_substream;
180 unsigned long parity_errors; 178 unsigned long parity_errors;
181 unsigned long v_bit_errors; 179 unsigned long v_bit_errors;
182 unsigned long qcrc_errors; 180 unsigned long qcrc_errors;
@@ -186,20 +184,20 @@ struct ak4114 {
186 struct workqueue_struct *workqueue; 184 struct workqueue_struct *workqueue;
187 struct work_struct work; 185 struct work_struct work;
188 void *change_callback_private; 186 void *change_callback_private;
189 void (*change_callback)(ak4114_t *ak4114, unsigned char c0, unsigned char c1); 187 void (*change_callback)(struct ak4114 *ak4114, unsigned char c0, unsigned char c1);
190}; 188};
191 189
192int snd_ak4114_create(snd_card_t *card, 190int snd_ak4114_create(struct snd_card *card,
193 ak4114_read_t *read, ak4114_write_t *write, 191 ak4114_read_t *read, ak4114_write_t *write,
194 unsigned char pgm[7], unsigned char txcsb[5], 192 unsigned char pgm[7], unsigned char txcsb[5],
195 void *private_data, ak4114_t **r_ak4114); 193 void *private_data, struct ak4114 **r_ak4114);
196void snd_ak4114_reg_write(ak4114_t *ak4114, unsigned char reg, unsigned char mask, unsigned char val); 194void snd_ak4114_reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char mask, unsigned char val);
197void snd_ak4114_reinit(ak4114_t *ak4114); 195void snd_ak4114_reinit(struct ak4114 *ak4114);
198int snd_ak4114_build(ak4114_t *ak4114, 196int snd_ak4114_build(struct ak4114 *ak4114,
199 snd_pcm_substream_t *playback_substream, 197 struct snd_pcm_substream *playback_substream,
200 snd_pcm_substream_t *capture_substream); 198 struct snd_pcm_substream *capture_substream);
201int snd_ak4114_external_rate(ak4114_t *ak4114); 199int snd_ak4114_external_rate(struct ak4114 *ak4114);
202int snd_ak4114_check_rate_and_errors(ak4114_t *ak4114, unsigned int flags); 200int snd_ak4114_check_rate_and_errors(struct ak4114 *ak4114, unsigned int flags);
203 201
204#endif /* __SOUND_AK4114_H */ 202#endif /* __SOUND_AK4114_H */
205 203
diff --git a/include/sound/ak4117.h b/include/sound/ak4117.h
index 9e1dab17c33e..2b96c32f06fd 100644
--- a/include/sound/ak4117.h
+++ b/include/sound/ak4117.h
@@ -155,18 +155,16 @@
155typedef void (ak4117_write_t)(void *private_data, unsigned char addr, unsigned char data); 155typedef void (ak4117_write_t)(void *private_data, unsigned char addr, unsigned char data);
156typedef unsigned char (ak4117_read_t)(void *private_data, unsigned char addr); 156typedef unsigned char (ak4117_read_t)(void *private_data, unsigned char addr);
157 157
158typedef struct ak4117 ak4117_t;
159
160struct ak4117 { 158struct ak4117 {
161 snd_card_t * card; 159 struct snd_card *card;
162 ak4117_write_t * write; 160 ak4117_write_t * write;
163 ak4117_read_t * read; 161 ak4117_read_t * read;
164 void * private_data; 162 void * private_data;
165 unsigned int init: 1; 163 unsigned int init: 1;
166 spinlock_t lock; 164 spinlock_t lock;
167 unsigned char regmap[5]; 165 unsigned char regmap[5];
168 snd_kcontrol_t *kctls[AK4117_CONTROLS]; 166 struct snd_kcontrol *kctls[AK4117_CONTROLS];
169 snd_pcm_substream_t *substream; 167 struct snd_pcm_substream *substream;
170 unsigned long parity_errors; 168 unsigned long parity_errors;
171 unsigned long v_bit_errors; 169 unsigned long v_bit_errors;
172 unsigned long qcrc_errors; 170 unsigned long qcrc_errors;
@@ -176,16 +174,16 @@ struct ak4117 {
176 unsigned char rcs2; 174 unsigned char rcs2;
177 struct timer_list timer; /* statistic timer */ 175 struct timer_list timer; /* statistic timer */
178 void *change_callback_private; 176 void *change_callback_private;
179 void (*change_callback)(ak4117_t *ak4117, unsigned char c0, unsigned char c1); 177 void (*change_callback)(struct ak4117 *ak4117, unsigned char c0, unsigned char c1);
180}; 178};
181 179
182int snd_ak4117_create(snd_card_t *card, ak4117_read_t *read, ak4117_write_t *write, 180int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t *write,
183 unsigned char pgm[5], void *private_data, ak4117_t **r_ak4117); 181 unsigned char pgm[5], void *private_data, struct ak4117 **r_ak4117);
184void snd_ak4117_reg_write(ak4117_t *ak4117, unsigned char reg, unsigned char mask, unsigned char val); 182void snd_ak4117_reg_write(struct ak4117 *ak4117, unsigned char reg, unsigned char mask, unsigned char val);
185void snd_ak4117_reinit(ak4117_t *ak4117); 183void snd_ak4117_reinit(struct ak4117 *ak4117);
186int snd_ak4117_build(ak4117_t *ak4117, snd_pcm_substream_t *capture_substream); 184int snd_ak4117_build(struct ak4117 *ak4117, struct snd_pcm_substream *capture_substream);
187int snd_ak4117_external_rate(ak4117_t *ak4117); 185int snd_ak4117_external_rate(struct ak4117 *ak4117);
188int snd_ak4117_check_rate_and_errors(ak4117_t *ak4117, unsigned int flags); 186int snd_ak4117_check_rate_and_errors(struct ak4117 *ak4117, unsigned int flags);
189 187
190#endif /* __SOUND_AK4117_H */ 188#endif /* __SOUND_AK4117_H */
191 189
diff --git a/include/sound/ak4xxx-adda.h b/include/sound/ak4xxx-adda.h
index e94ac0282318..3bf5911fe827 100644
--- a/include/sound/ak4xxx-adda.h
+++ b/include/sound/ak4xxx-adda.h
@@ -27,20 +27,20 @@
27#define AK4XXX_MAX_CHIPS 4 27#define AK4XXX_MAX_CHIPS 4
28#endif 28#endif
29 29
30typedef struct snd_akm4xxx akm4xxx_t; 30struct snd_akm4xxx;
31 31
32struct snd_ak4xxx_ops { 32struct snd_ak4xxx_ops {
33 void (*lock)(akm4xxx_t *ak, int chip); 33 void (*lock)(struct snd_akm4xxx *ak, int chip);
34 void (*unlock)(akm4xxx_t *ak, int chip); 34 void (*unlock)(struct snd_akm4xxx *ak, int chip);
35 void (*write)(akm4xxx_t *ak, int chip, unsigned char reg, unsigned char val); 35 void (*write)(struct snd_akm4xxx *ak, int chip, unsigned char reg, unsigned char val);
36 // unsigned char (*read)(akm4xxx_t *ak, int chip, unsigned char reg); 36 // unsigned char (*read)(struct snd_akm4xxx *ak, int chip, unsigned char reg);
37 void (*set_rate_val)(akm4xxx_t *ak, unsigned int rate); 37 void (*set_rate_val)(struct snd_akm4xxx *ak, unsigned int rate);
38}; 38};
39 39
40#define AK4XXX_IMAGE_SIZE (AK4XXX_MAX_CHIPS * 16) /* 64 bytes */ 40#define AK4XXX_IMAGE_SIZE (AK4XXX_MAX_CHIPS * 16) /* 64 bytes */
41 41
42struct snd_akm4xxx { 42struct snd_akm4xxx {
43 snd_card_t *card; 43 struct snd_card *card;
44 unsigned int num_adcs; /* AK4524 or AK4528 ADCs */ 44 unsigned int num_adcs; /* AK4524 or AK4528 ADCs */
45 unsigned int num_dacs; /* AK4524 or AK4528 DACs */ 45 unsigned int num_dacs; /* AK4524 or AK4528 DACs */
46 unsigned char images[AK4XXX_IMAGE_SIZE]; /* saved register image */ 46 unsigned char images[AK4XXX_IMAGE_SIZE]; /* saved register image */
@@ -56,10 +56,10 @@ struct snd_akm4xxx {
56 struct snd_ak4xxx_ops ops; 56 struct snd_ak4xxx_ops ops;
57}; 57};
58 58
59void snd_akm4xxx_write(akm4xxx_t *ak, int chip, unsigned char reg, unsigned char val); 59void snd_akm4xxx_write(struct snd_akm4xxx *ak, int chip, unsigned char reg, unsigned char val);
60void snd_akm4xxx_reset(akm4xxx_t *ak, int state); 60void snd_akm4xxx_reset(struct snd_akm4xxx *ak, int state);
61void snd_akm4xxx_init(akm4xxx_t *ak); 61void snd_akm4xxx_init(struct snd_akm4xxx *ak);
62int snd_akm4xxx_build_controls(akm4xxx_t *ak); 62int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak);
63 63
64#define snd_akm4xxx_get(ak,chip,reg) (ak)->images[(chip) * 16 + (reg)] 64#define snd_akm4xxx_get(ak,chip,reg) (ak)->images[(chip) * 16 + (reg)]
65#define snd_akm4xxx_set(ak,chip,reg,val) ((ak)->images[(chip) * 16 + (reg)] = (val)) 65#define snd_akm4xxx_set(ak,chip,reg,val) ((ak)->images[(chip) * 16 + (reg)] = (val))