aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pcmcia/vx/vxp_ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pcmcia/vx/vxp_ops.c')
-rw-r--r--sound/pcmcia/vx/vxp_ops.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/sound/pcmcia/vx/vxp_ops.c b/sound/pcmcia/vx/vxp_ops.c
index 2754d657a4d6..7f82f619f9f4 100644
--- a/sound/pcmcia/vx/vxp_ops.c
+++ b/sound/pcmcia/vx/vxp_ops.c
@@ -49,7 +49,7 @@ static int vxp_reg_offset[VX_REG_MAX] = {
49}; 49};
50 50
51 51
52static inline unsigned long vxp_reg_addr(vx_core_t *_chip, int reg) 52static inline unsigned long vxp_reg_addr(struct vx_core *_chip, int reg)
53{ 53{
54 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 54 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
55 return chip->port + vxp_reg_offset[reg]; 55 return chip->port + vxp_reg_offset[reg];
@@ -59,7 +59,7 @@ static inline unsigned long vxp_reg_addr(vx_core_t *_chip, int reg)
59 * snd_vx_inb - read a byte from the register 59 * snd_vx_inb - read a byte from the register
60 * @offset: register offset 60 * @offset: register offset
61 */ 61 */
62static unsigned char vxp_inb(vx_core_t *chip, int offset) 62static unsigned char vxp_inb(struct vx_core *chip, int offset)
63{ 63{
64 return inb(vxp_reg_addr(chip, offset)); 64 return inb(vxp_reg_addr(chip, offset));
65} 65}
@@ -69,7 +69,7 @@ static unsigned char vxp_inb(vx_core_t *chip, int offset)
69 * @offset: the register offset 69 * @offset: the register offset
70 * @val: the value to write 70 * @val: the value to write
71 */ 71 */
72static void vxp_outb(vx_core_t *chip, int offset, unsigned char val) 72static void vxp_outb(struct vx_core *chip, int offset, unsigned char val)
73{ 73{
74 outb(val, vxp_reg_addr(chip, offset)); 74 outb(val, vxp_reg_addr(chip, offset));
75} 75}
@@ -78,9 +78,9 @@ static void vxp_outb(vx_core_t *chip, int offset, unsigned char val)
78 * redefine macros to call directly 78 * redefine macros to call directly
79 */ 79 */
80#undef vx_inb 80#undef vx_inb
81#define vx_inb(chip,reg) vxp_inb((vx_core_t*)(chip), VX_##reg) 81#define vx_inb(chip,reg) vxp_inb((struct vx_core *)(chip), VX_##reg)
82#undef vx_outb 82#undef vx_outb
83#define vx_outb(chip,reg,val) vxp_outb((vx_core_t*)(chip), VX_##reg,val) 83#define vx_outb(chip,reg,val) vxp_outb((struct vx_core *)(chip), VX_##reg,val)
84 84
85 85
86/* 86/*
@@ -88,7 +88,7 @@ static void vxp_outb(vx_core_t *chip, int offset, unsigned char val)
88 * 88 *
89 * returns zero if a magic word is detected, or a negative error code. 89 * returns zero if a magic word is detected, or a negative error code.
90 */ 90 */
91static int vx_check_magic(vx_core_t *chip) 91static int vx_check_magic(struct vx_core *chip)
92{ 92{
93 unsigned long end_time = jiffies + HZ / 5; 93 unsigned long end_time = jiffies + HZ / 5;
94 int c; 94 int c;
@@ -109,7 +109,7 @@ static int vx_check_magic(vx_core_t *chip)
109 109
110#define XX_DSP_RESET_WAIT_TIME 2 /* ms */ 110#define XX_DSP_RESET_WAIT_TIME 2 /* ms */
111 111
112static void vxp_reset_dsp(vx_core_t *_chip) 112static void vxp_reset_dsp(struct vx_core *_chip)
113{ 113{
114 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 114 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
115 115
@@ -127,7 +127,7 @@ static void vxp_reset_dsp(vx_core_t *_chip)
127/* 127/*
128 * reset codec bit 128 * reset codec bit
129 */ 129 */
130static void vxp_reset_codec(vx_core_t *_chip) 130static void vxp_reset_codec(struct vx_core *_chip)
131{ 131{
132 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 132 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
133 133
@@ -146,7 +146,7 @@ static void vxp_reset_codec(vx_core_t *_chip)
146 * vx_load_xilinx_binary - load the xilinx binary image 146 * vx_load_xilinx_binary - load the xilinx binary image
147 * the binary image is the binary array converted from the bitstream file. 147 * the binary image is the binary array converted from the bitstream file.
148 */ 148 */
149static int vxp_load_xilinx_binary(vx_core_t *_chip, const struct firmware *fw) 149static int vxp_load_xilinx_binary(struct vx_core *_chip, const struct firmware *fw)
150{ 150{
151 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 151 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
152 unsigned int i; 152 unsigned int i;
@@ -244,7 +244,7 @@ static int vxp_load_xilinx_binary(vx_core_t *_chip, const struct firmware *fw)
244/* 244/*
245 * vxp_load_dsp - load_dsp callback 245 * vxp_load_dsp - load_dsp callback
246 */ 246 */
247static int vxp_load_dsp(vx_core_t *vx, int index, const struct firmware *fw) 247static int vxp_load_dsp(struct vx_core *vx, int index, const struct firmware *fw)
248{ 248{
249 int err; 249 int err;
250 250
@@ -279,7 +279,7 @@ static int vxp_load_dsp(vx_core_t *vx, int index, const struct firmware *fw)
279 * 279 *
280 * spinlock held! 280 * spinlock held!
281 */ 281 */
282static int vxp_test_and_ack(vx_core_t *_chip) 282static int vxp_test_and_ack(struct vx_core *_chip)
283{ 283{
284 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 284 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
285 285
@@ -306,7 +306,7 @@ static int vxp_test_and_ack(vx_core_t *_chip)
306/* 306/*
307 * vx_validate_irq - enable/disable IRQ 307 * vx_validate_irq - enable/disable IRQ
308 */ 308 */
309static void vxp_validate_irq(vx_core_t *_chip, int enable) 309static void vxp_validate_irq(struct vx_core *_chip, int enable)
310{ 310{
311 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 311 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
312 312
@@ -322,7 +322,7 @@ static void vxp_validate_irq(vx_core_t *_chip, int enable)
322 * vx_setup_pseudo_dma - set up the pseudo dma read/write mode. 322 * vx_setup_pseudo_dma - set up the pseudo dma read/write mode.
323 * @do_write: 0 = read, 1 = set up for DMA write 323 * @do_write: 0 = read, 1 = set up for DMA write
324 */ 324 */
325static void vx_setup_pseudo_dma(vx_core_t *_chip, int do_write) 325static void vx_setup_pseudo_dma(struct vx_core *_chip, int do_write)
326{ 326{
327 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 327 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
328 328
@@ -342,7 +342,7 @@ static void vx_setup_pseudo_dma(vx_core_t *_chip, int do_write)
342/* 342/*
343 * vx_release_pseudo_dma - disable the pseudo-DMA mode 343 * vx_release_pseudo_dma - disable the pseudo-DMA mode
344 */ 344 */
345static void vx_release_pseudo_dma(vx_core_t *_chip) 345static void vx_release_pseudo_dma(struct vx_core *_chip)
346{ 346{
347 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 347 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
348 348
@@ -362,8 +362,8 @@ static void vx_release_pseudo_dma(vx_core_t *_chip)
362 * data size must be aligned to 6 bytes to ensure the 24bit alignment on DSP. 362 * data size must be aligned to 6 bytes to ensure the 24bit alignment on DSP.
363 * NB: call with a certain lock! 363 * NB: call with a certain lock!
364 */ 364 */
365static void vxp_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime, 365static void vxp_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime,
366 vx_pipe_t *pipe, int count) 366 struct vx_pipe *pipe, int count)
367{ 367{
368 long port = vxp_reg_addr(chip, VX_DMA); 368 long port = vxp_reg_addr(chip, VX_DMA);
369 int offset = pipe->hw_ptr; 369 int offset = pipe->hw_ptr;
@@ -401,8 +401,8 @@ static void vxp_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime,
401 * the read length must be aligned to 6 bytes, as well as write. 401 * the read length must be aligned to 6 bytes, as well as write.
402 * NB: call with a certain lock! 402 * NB: call with a certain lock!
403 */ 403 */
404static void vxp_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime, 404static void vxp_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime,
405 vx_pipe_t *pipe, int count) 405 struct vx_pipe *pipe, int count)
406{ 406{
407 struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip; 407 struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip;
408 long port = vxp_reg_addr(chip, VX_DMA); 408 long port = vxp_reg_addr(chip, VX_DMA);
@@ -442,7 +442,7 @@ static void vxp_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime,
442/* 442/*
443 * write a codec data (24bit) 443 * write a codec data (24bit)
444 */ 444 */
445static void vxp_write_codec_reg(vx_core_t *chip, int codec, unsigned int data) 445static void vxp_write_codec_reg(struct vx_core *chip, int codec, unsigned int data)
446{ 446{
447 int i; 447 int i;
448 448
@@ -465,7 +465,7 @@ static void vxp_write_codec_reg(vx_core_t *chip, int codec, unsigned int data)
465 * vx_set_mic_boost - set mic boost level (on vxp440 only) 465 * vx_set_mic_boost - set mic boost level (on vxp440 only)
466 * @boost: 0 = 20dB, 1 = +38dB 466 * @boost: 0 = 20dB, 1 = +38dB
467 */ 467 */
468void vx_set_mic_boost(vx_core_t *chip, int boost) 468void vx_set_mic_boost(struct vx_core *chip, int boost)
469{ 469{
470 struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip; 470 struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip;
471 unsigned long flags; 471 unsigned long flags;
@@ -508,7 +508,7 @@ static int vx_compute_mic_level(int level)
508 * vx_set_mic_level - set mic level (on vxpocket only) 508 * vx_set_mic_level - set mic level (on vxpocket only)
509 * @level: the mic level = 0 - 8 (max) 509 * @level: the mic level = 0 - 8 (max)
510 */ 510 */
511void vx_set_mic_level(vx_core_t *chip, int level) 511void vx_set_mic_level(struct vx_core *chip, int level)
512{ 512{
513 struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip; 513 struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip;
514 unsigned long flags; 514 unsigned long flags;
@@ -528,7 +528,7 @@ void vx_set_mic_level(vx_core_t *chip, int level)
528/* 528/*
529 * change the input audio source 529 * change the input audio source
530 */ 530 */
531static void vxp_change_audio_source(vx_core_t *_chip, int src) 531static void vxp_change_audio_source(struct vx_core *_chip, int src)
532{ 532{
533 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 533 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
534 534
@@ -568,7 +568,7 @@ static void vxp_change_audio_source(vx_core_t *_chip, int src)
568 * change the clock source 568 * change the clock source
569 * source = INTERNAL_QUARTZ or UER_SYNC 569 * source = INTERNAL_QUARTZ or UER_SYNC
570 */ 570 */
571static void vxp_set_clock_source(vx_core_t *_chip, int source) 571static void vxp_set_clock_source(struct vx_core *_chip, int source)
572{ 572{
573 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 573 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
574 574
@@ -583,7 +583,7 @@ static void vxp_set_clock_source(vx_core_t *_chip, int source)
583/* 583/*
584 * reset the board 584 * reset the board
585 */ 585 */
586static void vxp_reset_board(vx_core_t *_chip, int cold_reset) 586static void vxp_reset_board(struct vx_core *_chip, int cold_reset)
587{ 587{
588 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 588 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
589 589