Skip to content

Commit af26367

Browse files
tiwaiJaroslav Kysela
authored andcommitted
[ALSA] Remove xxx_t typedefs: VXdriver
Remove xxx_t typedefs from the VXdriver codes (vx_core support, vx222 and vxpocket). Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 9f38945 commit af26367

13 files changed

Lines changed: 410 additions & 389 deletions

File tree

‎include/sound/vx_core.h‎

Lines changed: 61 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@
3636
struct firmware;
3737
struct device;
3838

39-
typedef struct snd_vx_core vx_core_t;
40-
typedef struct vx_pipe vx_pipe_t;
41-
4239
#define VX_DRIVER_VERSION 0x010000 /* 1.0.0 */
4340

4441
/*
@@ -76,7 +73,7 @@ struct vx_pipe {
7673
int channels;
7774
unsigned int differed_type;
7875
pcx_time_t pcx_time;
79-
snd_pcm_substream_t *substream;
76+
struct snd_pcm_substream *substream;
8077

8178
int hbuf_size; /* H-buffer size in bytes */
8279
int buffer_bytes; /* the ALSA pcm buffer size in bytes */
@@ -88,36 +85,38 @@ struct vx_pipe {
8885
u64 cur_count; /* current sample position (for playback) */
8986

9087
unsigned int references; /* an output pipe may be used for monitoring and/or playback */
91-
vx_pipe_t *monitoring_pipe; /* pointer to the monitoring pipe (capture pipe only)*/
88+
struct vx_pipe *monitoring_pipe; /* pointer to the monitoring pipe (capture pipe only)*/
9289

9390
struct tasklet_struct start_tq;
9491
};
9592

93+
struct vx_core;
94+
9695
struct snd_vx_ops {
9796
/* low-level i/o */
98-
unsigned char (*in8)(vx_core_t *chip, int reg);
99-
unsigned int (*in32)(vx_core_t *chip, int reg);
100-
void (*out8)(vx_core_t *chip, int reg, unsigned char val);
101-
void (*out32)(vx_core_t *chip, int reg, unsigned int val);
97+
unsigned char (*in8)(struct vx_core *chip, int reg);
98+
unsigned int (*in32)(struct vx_core *chip, int reg);
99+
void (*out8)(struct vx_core *chip, int reg, unsigned char val);
100+
void (*out32)(struct vx_core *chip, int reg, unsigned int val);
102101
/* irq */
103-
int (*test_and_ack)(vx_core_t *chip);
104-
void (*validate_irq)(vx_core_t *chip, int enable);
102+
int (*test_and_ack)(struct vx_core *chip);
103+
void (*validate_irq)(struct vx_core *chip, int enable);
105104
/* codec */
106-
void (*write_codec)(vx_core_t *chip, int codec, unsigned int data);
107-
void (*akm_write)(vx_core_t *chip, int reg, unsigned int data);
108-
void (*reset_codec)(vx_core_t *chip);
109-
void (*change_audio_source)(vx_core_t *chip, int src);
110-
void (*set_clock_source)(vx_core_t *chp, int src);
105+
void (*write_codec)(struct vx_core *chip, int codec, unsigned int data);
106+
void (*akm_write)(struct vx_core *chip, int reg, unsigned int data);
107+
void (*reset_codec)(struct vx_core *chip);
108+
void (*change_audio_source)(struct vx_core *chip, int src);
109+
void (*set_clock_source)(struct vx_core *chp, int src);
111110
/* chip init */
112-
int (*load_dsp)(vx_core_t *chip, int idx, const struct firmware *fw);
113-
void (*reset_dsp)(vx_core_t *chip);
114-
void (*reset_board)(vx_core_t *chip, int cold_reset);
115-
int (*add_controls)(vx_core_t *chip);
111+
int (*load_dsp)(struct vx_core *chip, int idx, const struct firmware *fw);
112+
void (*reset_dsp)(struct vx_core *chip);
113+
void (*reset_board)(struct vx_core *chip, int cold_reset);
114+
int (*add_controls)(struct vx_core *chip);
116115
/* pcm */
117-
void (*dma_write)(vx_core_t *chip, snd_pcm_runtime_t *runtime,
118-
vx_pipe_t *pipe, int count);
119-
void (*dma_read)(vx_core_t *chip, snd_pcm_runtime_t *runtime,
120-
vx_pipe_t *pipe, int count);
116+
void (*dma_write)(struct vx_core *chip, struct snd_pcm_runtime *runtime,
117+
struct vx_pipe *pipe, int count);
118+
void (*dma_read)(struct vx_core *chip, struct snd_pcm_runtime *runtime,
119+
struct vx_pipe *pipe, int count);
121120
};
122121

123122
struct snd_vx_hardware {
@@ -158,10 +157,10 @@ enum {
158157
/* min/max values for analog output for old codecs */
159158
#define VX_ANALOG_OUT_LEVEL_MAX 0xe3
160159

161-
struct snd_vx_core {
160+
struct vx_core {
162161
/* ALSA stuff */
163-
snd_card_t *card;
164-
snd_pcm_t *pcm[VX_MAX_CODECS];
162+
struct snd_card *card;
163+
struct snd_pcm *pcm[VX_MAX_CODECS];
165164
int type; /* VX_TYPE_XXX */
166165

167166
int irq;
@@ -179,7 +178,7 @@ struct snd_vx_core {
179178
unsigned int pcm_running;
180179

181180
struct device *dev;
182-
snd_hwdep_t *hwdep;
181+
struct snd_hwdep *hwdep;
183182

184183
struct vx_rmh irq_rmh; /* RMH used in interrupts */
185184

@@ -216,14 +215,14 @@ struct snd_vx_core {
216215
/*
217216
* constructor
218217
*/
219-
vx_core_t *snd_vx_create(snd_card_t *card, struct snd_vx_hardware *hw,
220-
struct snd_vx_ops *ops, int extra_size);
221-
int snd_vx_setup_firmware(vx_core_t *chip);
222-
int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *dsp);
223-
int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *dsp);
224-
int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp);
218+
struct vx_core *snd_vx_create(struct snd_card *card, struct snd_vx_hardware *hw,
219+
struct snd_vx_ops *ops, int extra_size);
220+
int snd_vx_setup_firmware(struct vx_core *chip);
221+
int snd_vx_load_boot_image(struct vx_core *chip, const struct firmware *dsp);
222+
int snd_vx_dsp_boot(struct vx_core *chip, const struct firmware *dsp);
223+
int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp);
225224

226-
void snd_vx_free_firmware(vx_core_t *chip);
225+
void snd_vx_free_firmware(struct vx_core *chip);
227226

228227
/*
229228
* interrupt handler; exported for pcmcia
@@ -233,37 +232,37 @@ irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs);
233232
/*
234233
* lowlevel functions
235234
*/
236-
static inline int vx_test_and_ack(vx_core_t *chip)
235+
static inline int vx_test_and_ack(struct vx_core *chip)
237236
{
238237
snd_assert(chip->ops->test_and_ack, return -ENXIO);
239238
return chip->ops->test_and_ack(chip);
240239
}
241240

242-
static inline void vx_validate_irq(vx_core_t *chip, int enable)
241+
static inline void vx_validate_irq(struct vx_core *chip, int enable)
243242
{
244243
snd_assert(chip->ops->validate_irq, return);
245244
chip->ops->validate_irq(chip, enable);
246245
}
247246

248-
static inline unsigned char snd_vx_inb(vx_core_t *chip, int reg)
247+
static inline unsigned char snd_vx_inb(struct vx_core *chip, int reg)
249248
{
250249
snd_assert(chip->ops->in8, return 0);
251250
return chip->ops->in8(chip, reg);
252251
}
253252

254-
static inline unsigned int snd_vx_inl(vx_core_t *chip, int reg)
253+
static inline unsigned int snd_vx_inl(struct vx_core *chip, int reg)
255254
{
256255
snd_assert(chip->ops->in32, return 0);
257256
return chip->ops->in32(chip, reg);
258257
}
259258

260-
static inline void snd_vx_outb(vx_core_t *chip, int reg, unsigned char val)
259+
static inline void snd_vx_outb(struct vx_core *chip, int reg, unsigned char val)
261260
{
262261
snd_assert(chip->ops->out8, return);
263262
chip->ops->out8(chip, reg, val);
264263
}
265264

266-
static inline void snd_vx_outl(vx_core_t *chip, int reg, unsigned int val)
265+
static inline void snd_vx_outl(struct vx_core *chip, int reg, unsigned int val)
267266
{
268267
snd_assert(chip->ops->out32, return);
269268
chip->ops->out32(chip, reg, val);
@@ -274,25 +273,25 @@ static inline void snd_vx_outl(vx_core_t *chip, int reg, unsigned int val)
274273
#define vx_inl(chip,reg) snd_vx_inl(chip, VX_##reg)
275274
#define vx_outl(chip,reg,val) snd_vx_outl(chip, VX_##reg,val)
276275

277-
static inline void vx_reset_dsp(vx_core_t *chip)
276+
static inline void vx_reset_dsp(struct vx_core *chip)
278277
{
279278
snd_assert(chip->ops->reset_dsp, return);
280279
chip->ops->reset_dsp(chip);
281280
}
282281

283-
int vx_send_msg(vx_core_t *chip, struct vx_rmh *rmh);
284-
int vx_send_msg_nolock(vx_core_t *chip, struct vx_rmh *rmh);
285-
int vx_send_rih(vx_core_t *chip, int cmd);
286-
int vx_send_rih_nolock(vx_core_t *chip, int cmd);
282+
int vx_send_msg(struct vx_core *chip, struct vx_rmh *rmh);
283+
int vx_send_msg_nolock(struct vx_core *chip, struct vx_rmh *rmh);
284+
int vx_send_rih(struct vx_core *chip, int cmd);
285+
int vx_send_rih_nolock(struct vx_core *chip, int cmd);
287286

288-
void vx_reset_codec(vx_core_t *chip, int cold_reset);
287+
void vx_reset_codec(struct vx_core *chip, int cold_reset);
289288

290289
/*
291290
* check the bit on the specified register
292291
* returns zero if a bit matches, or a negative error code.
293292
* exported for vxpocket driver
294293
*/
295-
int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time);
294+
int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int time);
296295
#define vx_check_isr(chip,mask,bit,time) snd_vx_check_reg_bit(chip, VX_ISR, mask, bit, time)
297296
#define vx_wait_isr_bit(chip,bit) vx_check_isr(chip, bit, bit, 200)
298297
#define vx_wait_for_rx_full(chip) vx_wait_isr_bit(chip, ISR_RX_FULL)
@@ -301,15 +300,15 @@ int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time);
301300
/*
302301
* pseudo-DMA transfer
303302
*/
304-
static inline void vx_pseudo_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime,
305-
vx_pipe_t *pipe, int count)
303+
static inline void vx_pseudo_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime,
304+
struct vx_pipe *pipe, int count)
306305
{
307306
snd_assert(chip->ops->dma_write, return);
308307
chip->ops->dma_write(chip, runtime, pipe, count);
309308
}
310309

311-
static inline void vx_pseudo_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime,
312-
vx_pipe_t *pipe, int count)
310+
static inline void vx_pseudo_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime,
311+
struct vx_pipe *pipe, int count)
313312
{
314313
snd_assert(chip->ops->dma_read, return);
315314
chip->ops->dma_read(chip, runtime, pipe, count);
@@ -327,24 +326,24 @@ static inline void vx_pseudo_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtim
327326
/*
328327
* pcm stuff
329328
*/
330-
int snd_vx_pcm_new(vx_core_t *chip);
331-
void vx_pcm_update_intr(vx_core_t *chip, unsigned int events);
329+
int snd_vx_pcm_new(struct vx_core *chip);
330+
void vx_pcm_update_intr(struct vx_core *chip, unsigned int events);
332331

333332
/*
334333
* mixer stuff
335334
*/
336-
int snd_vx_mixer_new(vx_core_t *chip);
337-
void vx_toggle_dac_mute(vx_core_t *chip, int mute);
338-
int vx_sync_audio_source(vx_core_t *chip);
339-
int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active);
335+
int snd_vx_mixer_new(struct vx_core *chip);
336+
void vx_toggle_dac_mute(struct vx_core *chip, int mute);
337+
int vx_sync_audio_source(struct vx_core *chip);
338+
int vx_set_monitor_level(struct vx_core *chip, int audio, int level, int active);
340339

341340
/*
342341
* IEC958 & clock stuff
343342
*/
344-
void vx_set_iec958_status(vx_core_t *chip, unsigned int bits);
345-
int vx_set_clock(vx_core_t *chip, unsigned int freq);
346-
void vx_set_internal_clock(vx_core_t *chip, unsigned int freq);
347-
int vx_change_frequency(vx_core_t *chip);
343+
void vx_set_iec958_status(struct vx_core *chip, unsigned int bits);
344+
int vx_set_clock(struct vx_core *chip, unsigned int freq);
345+
void vx_set_internal_clock(struct vx_core *chip, unsigned int freq);
346+
int vx_change_frequency(struct vx_core *chip);
348347

349348

350349
/*

0 commit comments

Comments
 (0)