Commit 029d64b0 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] Remove xxx_t typedefs: ISA SB8/SB16/SBAWE

Remove xxx_t typedefs from the ISA SB8/SB16/SBAWE drivers.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d3a7e476
...@@ -56,9 +56,9 @@ enum { ...@@ -56,9 +56,9 @@ enum {
* some of the channels may be used for other things so max_channels is * some of the channels may be used for other things so max_channels is
* the number in use for wave voices. * the number in use for wave voices.
*/ */
typedef struct snd_emu8000 { struct snd_emu8000 {
snd_emux_t *emu; struct snd_emux *emu;
int index; /* sequencer client index */ int index; /* sequencer client index */
int seq_ports; /* number of sequencer ports */ int seq_ports; /* number of sequencer ports */
...@@ -77,44 +77,45 @@ typedef struct snd_emu8000 { ...@@ -77,44 +77,45 @@ typedef struct snd_emu8000 {
int dram_checked; int dram_checked;
snd_card_t *card; /* The card that this belongs to */ struct snd_card *card; /* The card that this belongs to */
int chorus_mode; int chorus_mode;
int reverb_mode; int reverb_mode;
int bass_level; int bass_level;
int treble_level; int treble_level;
snd_util_memhdr_t *memhdr; struct snd_util_memhdr *memhdr;
spinlock_t control_lock; spinlock_t control_lock;
snd_kcontrol_t *controls[EMU8000_NUM_CONTROLS]; struct snd_kcontrol *controls[EMU8000_NUM_CONTROLS];
snd_pcm_t *pcm; /* pcm on emu8000 wavetable */ struct snd_pcm *pcm; /* pcm on emu8000 wavetable */
} emu8000_t; };
/* sequencer device id */ /* sequencer device id */
#define SNDRV_SEQ_DEV_ID_EMU8000 "emu8000-synth" #define SNDRV_SEQ_DEV_ID_EMU8000 "emu8000-synth"
/* exported functions */ /* exported functions */
int snd_emu8000_new(snd_card_t *card, int device, long port, int seq_ports, snd_seq_device_t **ret); int snd_emu8000_new(struct snd_card *card, int device, long port, int seq_ports,
void snd_emu8000_poke(emu8000_t *emu, unsigned int port, unsigned int reg, struct snd_seq_device **ret);
void snd_emu8000_poke(struct snd_emu8000 *emu, unsigned int port, unsigned int reg,
unsigned int val); unsigned int val);
unsigned short snd_emu8000_peek(emu8000_t *emu, unsigned int port, unsigned short snd_emu8000_peek(struct snd_emu8000 *emu, unsigned int port,
unsigned int reg); unsigned int reg);
void snd_emu8000_poke_dw(emu8000_t *emu, unsigned int port, unsigned int reg, void snd_emu8000_poke_dw(struct snd_emu8000 *emu, unsigned int port, unsigned int reg,
unsigned int val); unsigned int val);
unsigned int snd_emu8000_peek_dw(emu8000_t *emu, unsigned int port, unsigned int snd_emu8000_peek_dw(struct snd_emu8000 *emu, unsigned int port,
unsigned int reg); unsigned int reg);
void snd_emu8000_dma_chan(emu8000_t *emu, int ch, int mode); void snd_emu8000_dma_chan(struct snd_emu8000 *emu, int ch, int mode);
void snd_emu8000_init_fm(emu8000_t *emu); void snd_emu8000_init_fm(struct snd_emu8000 *emu);
void snd_emu8000_update_chorus_mode(emu8000_t *emu); void snd_emu8000_update_chorus_mode(struct snd_emu8000 *emu);
void snd_emu8000_update_reverb_mode(emu8000_t *emu); void snd_emu8000_update_reverb_mode(struct snd_emu8000 *emu);
void snd_emu8000_update_equalizer(emu8000_t *emu); void snd_emu8000_update_equalizer(struct snd_emu8000 *emu);
int snd_emu8000_load_chorus_fx(emu8000_t *emu, int mode, const void __user *buf, long len); int snd_emu8000_load_chorus_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len);
int snd_emu8000_load_reverb_fx(emu8000_t *emu, int mode, const void __user *buf, long len); int snd_emu8000_load_reverb_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len);
#endif /* __SOUND_EMU8000_H */ #endif /* __SOUND_EMU8000_H */
...@@ -60,7 +60,7 @@ enum sb_hw_type { ...@@ -60,7 +60,7 @@ enum sb_hw_type {
#define SB_MPU_INPUT 1 #define SB_MPU_INPUT 1
struct _snd_sb { struct snd_sb {
unsigned long port; /* base port of DSP chip */ unsigned long port; /* base port of DSP chip */
struct resource *res_port; struct resource *res_port;
unsigned long mpu_port; /* MPU port for SB DSP 4.0+ */ unsigned long mpu_port; /* MPU port for SB DSP 4.0+ */
...@@ -92,25 +92,23 @@ struct _snd_sb { ...@@ -92,25 +92,23 @@ struct _snd_sb {
void *csp; /* used only when CONFIG_SND_SB16_CSP is set */ void *csp; /* used only when CONFIG_SND_SB16_CSP is set */
snd_card_t *card; struct snd_card *card;
snd_pcm_t *pcm; struct snd_pcm *pcm;
snd_pcm_substream_t *playback_substream; struct snd_pcm_substream *playback_substream;
snd_pcm_substream_t *capture_substream; struct snd_pcm_substream *capture_substream;
snd_rawmidi_t *rmidi; struct snd_rawmidi *rmidi;
snd_rawmidi_substream_t *midi_substream_input; struct snd_rawmidi_substream *midi_substream_input;
snd_rawmidi_substream_t *midi_substream_output; struct snd_rawmidi_substream *midi_substream_output;
irqreturn_t (*rmidi_callback)(int irq, void *dev_id, struct pt_regs *regs); irqreturn_t (*rmidi_callback)(int irq, void *dev_id, struct pt_regs *regs);
spinlock_t reg_lock; spinlock_t reg_lock;
spinlock_t open_lock; spinlock_t open_lock;
spinlock_t midi_input_lock; spinlock_t midi_input_lock;
snd_info_entry_t *proc_entry; struct snd_info_entry *proc_entry;
}; };
typedef struct _snd_sb sb_t;
/* I/O ports */ /* I/O ports */
#define SBP(chip, x) ((chip)->port + s_b_SB_##x) #define SBP(chip, x) ((chip)->port + s_b_SB_##x)
...@@ -267,48 +265,48 @@ typedef struct _snd_sb sb_t; ...@@ -267,48 +265,48 @@ typedef struct _snd_sb sb_t;
* *
*/ */
static inline void snd_sb_ack_8bit(sb_t *chip) static inline void snd_sb_ack_8bit(struct snd_sb *chip)
{ {
inb(SBP(chip, DATA_AVAIL)); inb(SBP(chip, DATA_AVAIL));
} }
static inline void snd_sb_ack_16bit(sb_t *chip) static inline void snd_sb_ack_16bit(struct snd_sb *chip)
{ {
inb(SBP(chip, DATA_AVAIL_16)); inb(SBP(chip, DATA_AVAIL_16));
} }
/* sb_common.c */ /* sb_common.c */
int snd_sbdsp_command(sb_t *chip, unsigned char val); int snd_sbdsp_command(struct snd_sb *chip, unsigned char val);
int snd_sbdsp_get_byte(sb_t *chip); int snd_sbdsp_get_byte(struct snd_sb *chip);
int snd_sbdsp_reset(sb_t *chip); int snd_sbdsp_reset(struct snd_sb *chip);
int snd_sbdsp_create(snd_card_t *card, int snd_sbdsp_create(struct snd_card *card,
unsigned long port, unsigned long port,
int irq, int irq,
irqreturn_t (*irq_handler)(int, void *, struct pt_regs *), irqreturn_t (*irq_handler)(int, void *, struct pt_regs *),
int dma8, int dma16, int dma8, int dma16,
unsigned short hardware, unsigned short hardware,
sb_t **r_chip); struct snd_sb **r_chip);
/* sb_mixer.c */ /* sb_mixer.c */
void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data); void snd_sbmixer_write(struct snd_sb *chip, unsigned char reg, unsigned char data);
unsigned char snd_sbmixer_read(sb_t *chip, unsigned char reg); unsigned char snd_sbmixer_read(struct snd_sb *chip, unsigned char reg);
int snd_sbmixer_new(sb_t *chip); int snd_sbmixer_new(struct snd_sb *chip);
/* sb8_init.c */ /* sb8_init.c */
int snd_sb8dsp_pcm(sb_t *chip, int device, snd_pcm_t ** rpcm); int snd_sb8dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm);
/* sb8.c */ /* sb8.c */
irqreturn_t snd_sb8dsp_interrupt(sb_t *chip); irqreturn_t snd_sb8dsp_interrupt(struct snd_sb *chip);
int snd_sb8_playback_open(snd_pcm_substream_t *substream); int snd_sb8_playback_open(struct snd_pcm_substream *substream);
int snd_sb8_capture_open(snd_pcm_substream_t *substream); int snd_sb8_capture_open(struct snd_pcm_substream *substream);
int snd_sb8_playback_close(snd_pcm_substream_t *substream); int snd_sb8_playback_close(struct snd_pcm_substream *substream);
int snd_sb8_capture_close(snd_pcm_substream_t *substream); int snd_sb8_capture_close(struct snd_pcm_substream *substream);
/* midi8.c */ /* midi8.c */
irqreturn_t snd_sb8dsp_midi_interrupt(sb_t *chip); irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb *chip);
int snd_sb8dsp_midi(sb_t *chip, int device, snd_rawmidi_t ** rrawmidi); int snd_sb8dsp_midi(struct snd_sb *chip, int device, struct snd_rawmidi ** rrawmidi);
/* sb16_init.c */ /* sb16_init.c */
int snd_sb16dsp_pcm(sb_t *chip, int device, snd_pcm_t ** rpcm); int snd_sb16dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm);
const snd_pcm_ops_t *snd_sb16dsp_get_pcm_ops(int direction); const struct snd_pcm_ops *snd_sb16dsp_get_pcm_ops(int direction);
int snd_sb16dsp_configure(sb_t *chip); int snd_sb16dsp_configure(struct snd_sb *chip);
/* sb16.c */ /* sb16.c */
irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs); irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs);
...@@ -328,7 +326,7 @@ enum { ...@@ -328,7 +326,7 @@ enum {
#define SB_MIXVAL_INPUT_SW(reg1, reg2, left_shift, right_shift) \ #define SB_MIXVAL_INPUT_SW(reg1, reg2, left_shift, right_shift) \
((reg1) | ((reg2) << 8) | ((left_shift) << 16) | ((right_shift) << 24)) ((reg1) | ((reg2) << 8) | ((left_shift) << 16) | ((right_shift) << 24))
int snd_sbmixer_add_ctl(sb_t *chip, const char *name, int index, int type, unsigned long value); int snd_sbmixer_add_ctl(struct snd_sb *chip, const char *name, int index, int type, unsigned long value);
/* for ease of use */ /* for ease of use */
struct sbmix_elem { struct sbmix_elem {
...@@ -352,7 +350,7 @@ struct sbmix_elem { ...@@ -352,7 +350,7 @@ struct sbmix_elem {
.type = SB_MIX_INPUT_SW, \ .type = SB_MIX_INPUT_SW, \
.private_value = SB_MIXVAL_INPUT_SW(reg1, reg2, left_shift, right_shift) } .private_value = SB_MIXVAL_INPUT_SW(reg1, reg2, left_shift, right_shift) }
static inline int snd_sbmixer_add_ctl_elem(sb_t *chip, const struct sbmix_elem *c) static inline int snd_sbmixer_add_ctl_elem(struct snd_sb *chip, const struct sbmix_elem *c)
{ {
return snd_sbmixer_add_ctl(chip, c->name, 0, c->type, c->private_value); return snd_sbmixer_add_ctl(chip, c->name, 0, c->type, c->private_value);
} }
......
...@@ -63,25 +63,25 @@ ...@@ -63,25 +63,25 @@
#define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE 0x3000 #define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE 0x3000
/* microcode header */ /* microcode header */
typedef struct snd_sb_csp_mc_header { struct snd_sb_csp_mc_header {
char codec_name[16]; /* id name of codec */ char codec_name[16]; /* id name of codec */
unsigned short func_req; /* requested function */ unsigned short func_req; /* requested function */
} snd_sb_csp_mc_header_t; };
/* microcode to be loaded */ /* microcode to be loaded */
typedef struct snd_sb_csp_microcode { struct snd_sb_csp_microcode {
snd_sb_csp_mc_header_t info; struct snd_sb_csp_mc_header info;
unsigned char data[SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE]; unsigned char data[SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE];
} snd_sb_csp_microcode_t; };
/* start CSP with sample_width in mono/stereo */ /* start CSP with sample_width in mono/stereo */
typedef struct snd_sb_csp_start { struct snd_sb_csp_start {
int sample_width; /* sample width, look above */ int sample_width; /* sample width, look above */
int channels; /* channels, look above */ int channels; /* channels, look above */
} snd_sb_csp_start_t; };
/* CSP information */ /* CSP information */
typedef struct snd_sb_csp_info { struct snd_sb_csp_info {
char codec_name[16]; /* id name of codec */ char codec_name[16]; /* id name of codec */
unsigned short func_nr; /* function number */ unsigned short func_nr; /* function number */
unsigned int acc_format; /* accepted PCM formats */ unsigned int acc_format; /* accepted PCM formats */
...@@ -93,17 +93,17 @@ typedef struct snd_sb_csp_info { ...@@ -93,17 +93,17 @@ typedef struct snd_sb_csp_info {
unsigned short run_width; /* current sample width */ unsigned short run_width; /* current sample width */
unsigned short version; /* version id: 0x10 - 0x1f */ unsigned short version; /* version id: 0x10 - 0x1f */
unsigned short state; /* state bits */ unsigned short state; /* state bits */
} snd_sb_csp_info_t; };
/* HWDEP controls */ /* HWDEP controls */
/* get CSP information */ /* get CSP information */
#define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, snd_sb_csp_info_t) #define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_info)
/* load microcode to CSP */ /* load microcode to CSP */
#define SNDRV_SB_CSP_IOCTL_LOAD_CODE _IOW('H', 0x11, snd_sb_csp_microcode_t) #define SNDRV_SB_CSP_IOCTL_LOAD_CODE _IOW('H', 0x11, struct snd_sb_csp_microcode)
/* unload microcode from CSP */ /* unload microcode from CSP */
#define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12) #define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12)
/* start CSP */ /* start CSP */
#define SNDRV_SB_CSP_IOCTL_START _IOW('H', 0x13, snd_sb_csp_start_t) #define SNDRV_SB_CSP_IOCTL_START _IOW('H', 0x13, struct snd_sb_csp_start)
/* stop CSP */ /* stop CSP */
#define SNDRV_SB_CSP_IOCTL_STOP _IO('H', 0x14) #define SNDRV_SB_CSP_IOCTL_STOP _IO('H', 0x14)
/* pause CSP and DMA transfer */ /* pause CSP and DMA transfer */
...@@ -115,25 +115,25 @@ typedef struct snd_sb_csp_info { ...@@ -115,25 +115,25 @@ typedef struct snd_sb_csp_info {
#include "sb.h" #include "sb.h"
#include "hwdep.h" #include "hwdep.h"
typedef struct snd_sb_csp snd_sb_csp_t; struct snd_sb_csp;
/* /*
* CSP operators * CSP operators
*/ */
typedef struct { struct snd_sb_csp_ops {
int (*csp_use) (snd_sb_csp_t * p); int (*csp_use) (struct snd_sb_csp * p);
int (*csp_unuse) (snd_sb_csp_t * p); int (*csp_unuse) (struct snd_sb_csp * p);
int (*csp_autoload) (snd_sb_csp_t * p, int pcm_sfmt, int play_rec_mode); int (*csp_autoload) (struct snd_sb_csp * p, int pcm_sfmt, int play_rec_mode);
int (*csp_start) (snd_sb_csp_t * p, int sample_width, int channels); int (*csp_start) (struct snd_sb_csp * p, int sample_width, int channels);
int (*csp_stop) (snd_sb_csp_t * p); int (*csp_stop) (struct snd_sb_csp * p);
int (*csp_qsound_transfer) (snd_sb_csp_t * p); int (*csp_qsound_transfer) (struct snd_sb_csp * p);
} snd_sb_csp_ops_t; };
/* /*
* CSP private data * CSP private data
*/ */
struct snd_sb_csp { struct snd_sb_csp {
sb_t *chip; /* SB16 DSP */ struct snd_sb *chip; /* SB16 DSP */
int used; /* usage flag - exclusive */ int used; /* usage flag - exclusive */
char codec_name[16]; /* name of codec */ char codec_name[16]; /* name of codec */
unsigned short func_nr; /* function number */ unsigned short func_nr; /* function number */
...@@ -147,7 +147,7 @@ struct snd_sb_csp { ...@@ -147,7 +147,7 @@ struct snd_sb_csp {
int version; /* CSP version (0x10 - 0x1f) */ int version; /* CSP version (0x10 - 0x1f) */
int running; /* running state */ int running; /* running state */
snd_sb_csp_ops_t ops; /* operators */ struct snd_sb_csp_ops ops; /* operators */
spinlock_t q_lock; /* locking */ spinlock_t q_lock; /* locking */
int q_enabled; /* enabled flag */ int q_enabled; /* enabled flag */
...@@ -155,13 +155,13 @@ struct snd_sb_csp { ...@@ -155,13 +155,13 @@ struct snd_sb_csp {
int qpos_right; /* right position */ int qpos_right; /* right position */
int qpos_changed; /* position changed flag */ int qpos_changed; /* position changed flag */
snd_kcontrol_t *qsound_switch; struct snd_kcontrol *qsound_switch;
snd_kcontrol_t *qsound_space; struct snd_kcontrol *qsound_space;
struct semaphore access_mutex; /* locking */ struct semaphore access_mutex; /* locking */
}; };
int snd_sb_csp_new(sb_t *chip, int device, snd_hwdep_t ** rhwdep); int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep);
#endif #endif
#endif /* __SOUND_SB16_CSP */ #endif /* __SOUND_SB16_CSP */
This diff is collapsed.
...@@ -25,27 +25,30 @@ ...@@ -25,27 +25,30 @@
/* /*
* prototypes * prototypes
*/ */
static snd_emux_voice_t *get_voice(snd_emux_t *emu, snd_emux_port_t *port); static struct snd_emux_voice *get_voice(struct snd_emux *emu,
static int start_voice(snd_emux_voice_t *vp); struct snd_emux_port *port);
static void trigger_voice(snd_emux_voice_t *vp); static int start_voice(struct snd_emux_voice *vp);
static void release_voice(snd_emux_voice_t *vp); static void trigger_voice(struct snd_emux_voice *vp);
static void update_voice(snd_emux_voice_t *vp, int update); static void release_voice(struct snd_emux_voice *vp);
static void reset_voice(snd_emux_t *emu, int ch); static void update_voice(struct snd_emux_voice *vp, int update);
static void terminate_voice(snd_emux_voice_t *vp); static void reset_voice(struct snd_emux *emu, int ch);
static void sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *chset); static void terminate_voice(struct snd_emux_voice *vp);
static void sysex(struct snd_emux *emu, char *buf, int len, int parsed,
struct snd_midi_channel_set *chset);
#ifdef CONFIG_SND_SEQUENCER_OSS #ifdef CONFIG_SND_SEQUENCER_OSS
static int oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2); static int oss_ioctl(struct snd_emux *emu, int cmd, int p1, int p2);
#endif #endif
static int load_fx(snd_emux_t *emu, int type, int mode, const void __user *buf, long len); static int load_fx(struct snd_emux *emu, int type, int mode,
const void __user *buf, long len);
static void set_pitch(emu8000_t *hw, snd_emux_voice_t *vp);
static void set_volume(emu8000_t *hw, snd_emux_voice_t *vp); static void set_pitch(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
static void set_pan(emu8000_t *hw, snd_emux_voice_t *vp); static void set_volume(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
static void set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp); static void set_pan(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
static void set_tremfreq(emu8000_t *hw, snd_emux_voice_t *vp); static void set_fmmod(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
static void set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp); static void set_tremfreq(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
static void set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp); static void set_fm2frq2(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
static void snd_emu8000_tweak_voice(emu8000_t *emu, int ch); static void set_filterQ(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
static void snd_emu8000_tweak_voice(struct snd_emu8000 *emu, int ch);
/* /*
* Ensure a value is between two points * Ensure a value is between two points
...@@ -58,7 +61,7 @@ static void snd_emu8000_tweak_voice(emu8000_t *emu, int ch); ...@@ -58,7 +61,7 @@ static void snd_emu8000_tweak_voice(emu8000_t *emu, int ch);
/* /*
* set up operators * set up operators
*/ */
static snd_emux_operators_t emu8000_ops = { static struct snd_emux_operators emu8000_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.get_voice = get_voice, .get_voice = get_voice,
.prepare = start_voice, .prepare = start_voice,
...@@ -78,7 +81,7 @@ static snd_emux_operators_t emu8000_ops = { ...@@ -78,7 +81,7 @@ static snd_emux_operators_t emu8000_ops = {
}; };
void void
snd_emu8000_ops_setup(emu8000_t *hw) snd_emu8000_ops_setup(struct snd_emu8000 *hw)
{ {
hw->emu->ops = emu8000_ops; hw->emu->ops = emu8000_ops;
} }
...@@ -89,10 +92,10 @@ snd_emu8000_ops_setup(emu8000_t *hw) ...@@ -89,10 +92,10 @@ snd_emu8000_ops_setup(emu8000_t *hw)
* Terminate a voice * Terminate a voice
*/ */
static void static void
release_voice(snd_emux_voice_t *vp) release_voice(struct snd_emux_voice *vp)
{ {
int dcysusv; int dcysusv;
emu8000_t *hw; struct snd_emu8000 *hw;
hw = vp->hw; hw = vp->hw;
dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease; dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease;
...@@ -105,9 +108,9 @@ release_voice(snd_emux_voice_t *vp) ...@@ -105,9 +108,9 @@ release_voice(snd_emux_voice_t *vp)
/* /*
*/ */
static void static void
terminate_voice(snd_emux_voice_t *vp) terminate_voice(struct snd_emux_voice *vp)
{ {
emu8000_t *hw; struct snd_emu8000 *hw;
hw = vp->hw; hw = vp->hw;
EMU8000_DCYSUSV_WRITE(hw, vp->ch, 0x807F); EMU8000_DCYSUSV_WRITE(hw, vp->ch, 0x807F);
...@@ -117,9 +120,9 @@ terminate_voice(snd_emux_voice_t *vp) ...@@ -117,9 +120,9 @@ terminate_voice(snd_emux_voice_t *vp)
/* /*
*/ */
static void static void
update_voice(snd_emux_voice_t *vp, int update) update_voice(struct snd_emux_voice *vp, int update)
{ {
emu8000_t *hw; struct snd_emu8000 *hw;
hw = vp->hw; hw = vp->hw;
if (update & SNDRV_EMUX_UPDATE_VOLUME) if (update & SNDRV_EMUX_UPDATE_VOLUME)
...@@ -149,12 +152,12 @@ update_voice(snd_emux_voice_t *vp, int update) ...@@ -149,12 +152,12 @@ update_voice(snd_emux_voice_t *vp, int update)
* The channel index (vp->ch) must be initialized in this routine. * The channel index (vp->ch) must be initialized in this routine.
* In Emu8k, it is identical with the array index. * In Emu8k, it is identical with the array index.
*/ */
static snd_emux_voice_t * static struct snd_emux_voice *
get_voice(snd_emux_t *emu, snd_emux_port_t *port) get_voice(struct snd_emux *emu, struct snd_emux_port *port)
{ {
int i; int i;
snd_emux_voice_t *vp; struct snd_emux_voice *vp;
emu8000_t *hw; struct snd_emu8000 *hw;
/* what we are looking for, in order of preference */ /* what we are looking for, in order of preference */
enum { enum {
...@@ -227,13 +230,13 @@ get_voice(snd_emux_t *emu, snd_emux_port_t *port) ...@@ -227,13 +230,13 @@ get_voice(snd_emux_t *emu, snd_emux_port_t *port)
/* /*
*/ */
static int static int
start_voice(snd_emux_voice_t *vp) start_voice(struct snd_emux_voice *vp)
{ {
unsigned int temp; unsigned int temp;
int ch; int ch;
int addr; int addr;
snd_midi_channel_t *chan; struct snd_midi_channel *chan;
emu8000_t *hw; struct snd_emu8000 *hw;
hw = vp->hw; hw = vp->hw;
ch = vp->ch; ch = vp->ch;
...@@ -307,11 +310,11 @@ start_voice(snd_emux_voice_t *vp) ...@@ -307,11 +310,11 @@ start_voice(snd_emux_voice_t *vp)
* Start envelope * Start envelope
*/ */
static void static void
trigger_voice(snd_emux_voice_t *vp) trigger_voice(struct snd_emux_voice *vp)
{ {
int ch = vp->ch; int ch = vp->ch;
unsigned int temp; unsigned int temp;
emu8000_t *hw; struct snd_emu8000 *hw;
hw = vp->hw; hw = vp->hw;
...@@ -329,9 +332,9 @@ trigger_voice(snd_emux_voice_t *vp) ...@@ -329,9 +332,9 @@ trigger_voice(snd_emux_voice_t *vp)
* reset voice parameters * reset voice parameters
*/ */
static void static void
reset_voice(snd_emux_t *emu, int ch) reset_voice(struct snd_emux *emu, int ch)
{ {
emu8000_t *hw; struct snd_emu8000 *hw;
hw = emu->hw; hw = emu->hw;
EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F); EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F);
...@@ -342,7 +345,7 @@ reset_voice(snd_emux_t *emu, int ch) ...@@ -342,7 +345,7 @@ reset_voice(snd_emux_t *emu, int ch)
* Set the pitch of a possibly playing note. * Set the pitch of a possibly playing note.
*/ */
static void static void
set_pitch(emu8000_t *hw, snd_emux_voice_t *vp) set_pitch(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
{ {
EMU8000_IP_WRITE(hw, vp->ch, vp->apitch); EMU8000_IP_WRITE(hw, vp->ch, vp->apitch);
} }
...@@ -351,7 +354,7 @@ set_pitch(emu8000_t *hw, snd_emux_voice_t *vp) ...@@ -351,7 +354,7 @@ set_pitch(emu8000_t *hw, snd_emux_voice_t *vp)
* Set the volume of a possibly already playing note * Set the volume of a possibly already playing note
*/ */
static void static void
set_volume(emu8000_t *hw, snd_emux_voice_t *vp) set_volume(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
{ {
int ifatn; int ifatn;
...@@ -365,7 +368,7 @@ set_volume(emu8000_t *hw, snd_emux_voice_t *vp) ...@@ -365,7 +368,7 @@ set_volume(emu8000_t *hw, snd_emux_voice_t *vp)
* Set pan and loop start address. * Set pan and loop start address.
*/ */
static void static void
set_pan(emu8000_t *hw, snd_emux_voice_t *vp) set_pan(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
{ {
unsigned int temp; unsigned int temp;
...@@ -376,7 +379,7 @@ set_pan(emu8000_t *hw, snd_emux_voice_t *vp) ...@@ -376,7 +379,7 @@ set_pan(emu8000_t *hw, snd_emux_voice_t *vp)
#define MOD_SENSE 18 #define MOD_SENSE 18
static void static void
set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp) set_fmmod(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
{ {
unsigned short fmmod; unsigned short fmmod;
short pitch; short pitch;
...@@ -394,14 +397,14 @@ set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp) ...@@ -394,14 +397,14 @@ set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp)
/* set tremolo (lfo1) volume & frequency */ /* set tremolo (lfo1) volume & frequency */
static void static void
set_tremfreq(emu8000_t *hw, snd_emux_voice_t *vp) set_tremfreq(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
{ {
EMU8000_TREMFRQ_WRITE(hw, vp->ch, vp->reg.parm.tremfrq); EMU8000_TREMFRQ_WRITE(hw, vp->ch, vp->reg.parm.tremfrq);
} }
/* set lfo2 pitch & frequency */ /* set lfo2 pitch & frequency */
static void static void
set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp) set_fm2frq2(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
{ {
unsigned short fm2frq2; unsigned short fm2frq2;
short pitch; short pitch;
...@@ -419,7 +422,7 @@ set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp) ...@@ -419,7 +422,7 @@ set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp)
/* set filterQ */ /* set filterQ */
static void static void
set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp) set_filterQ(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
{ {
unsigned int addr; unsigned int addr;
addr = EMU8000_CCCA_READ(hw, vp->ch) & 0xffffff; addr = EMU8000_CCCA_READ(hw, vp->ch) & 0xffffff;
...@@ -431,7 +434,7 @@ set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp) ...@@ -431,7 +434,7 @@ set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp)
* set the envelope & LFO parameters to the default values * set the envelope & LFO parameters to the default values
*/ */
static void static void
snd_emu8000_tweak_voice(emu8000_t *emu, int i) snd_emu8000_tweak_voice(struct snd_emu8000 *emu, int i)
{ {
/* set all mod/vol envelope shape to minimum */ /* set all mod/vol envelope shape to minimum */
EMU8000_ENVVOL_WRITE(emu, i, 0x8000); EMU8000_ENVVOL_WRITE(emu, i, 0x8000);
...@@ -453,9 +456,9 @@ snd_emu8000_tweak_voice(emu8000_t *emu, int i) ...@@ -453,9 +456,9 @@ snd_emu8000_tweak_voice(emu8000_t *emu, int i)
* sysex callback * sysex callback
*/ */
static void static void
sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *chset) sysex(struct snd_emux *emu, char *buf, int len, int parsed, struct snd_midi_channel_set *chset)
{ {
emu8000_t *hw; struct snd_emu8000 *hw;
hw = emu->hw; hw = emu->hw;
...@@ -478,9 +481,9 @@ sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *c ...@@ -478,9 +481,9 @@ sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *c
* OSS ioctl callback * OSS ioctl callback
*/ */
static int static int
oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2) oss_ioctl(struct snd_emux *emu, int cmd, int p1, int p2)
{ {
emu8000_t *hw; struct snd_emu8000 *hw;
hw = emu->hw; hw = emu->hw;
...@@ -523,9 +526,9 @@ oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2) ...@@ -523,9 +526,9 @@ oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2)
*/ */
static int static int
load_fx(snd_emux_t *emu, int type, int mode, const void __user *buf, long len) load_fx(struct snd_emux *emu, int type, int mode, const void __user *buf, long len)
{ {
emu8000_t *hw; struct snd_emu8000 *hw;
hw = emu->hw; hw = emu->hw;
/* skip header */ /* skip header */
......
...@@ -30,14 +30,17 @@ ...@@ -30,14 +30,17 @@
#include <sound/emu8000_reg.h> #include <sound/emu8000_reg.h>
/* emu8000_patch.c */ /* emu8000_patch.c */
int snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr, const void __user *data, long count); int snd_emu8000_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,
int snd_emu8000_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr); struct snd_util_memhdr *hdr,
void snd_emu8000_sample_reset(snd_emux_t *rec); const void __user *data, long count);
int snd_emu8000_sample_free(struct snd_emux *rec, struct snd_sf_sample *sp,
struct snd_util_memhdr *hdr);
void snd_emu8000_sample_reset(struct snd_emux *rec);
/* emu8000_callback.c */ /* emu8000_callback.c */
void snd_emu8000_ops_setup(emu8000_t *emu); void snd_emu8000_ops_setup(struct snd_emu8000 *emu);
/* emu8000_pcm.c */ /* emu8000_pcm.c */
int snd_emu8000_pcm_new(snd_card_t *card, emu8000_t *emu, int index); int snd_emu8000_pcm_new(struct snd_card *card, struct snd_emu8000 *emu, int index);
#endif /* __EMU8000_LOCAL_H */ #endif /* __EMU8000_LOCAL_H */
...@@ -32,7 +32,7 @@ MODULE_PARM_DESC(emu8000_reset_addr, "reset write address at each time (makes sl ...@@ -32,7 +32,7 @@ MODULE_PARM_DESC(emu8000_reset_addr, "reset write address at each time (makes sl
* Open up channels. * Open up channels.
*/ */
static int static int
snd_emu8000_open_dma(emu8000_t *emu, int write) snd_emu8000_open_dma(struct snd_emu8000 *emu, int write)
{ {
int i; int i;
...@@ -59,7 +59,7 @@ snd_emu8000_open_dma(emu8000_t *emu, int write) ...@@ -59,7 +59,7 @@ snd_emu8000_open_dma(emu8000_t *emu, int write)
* Close all dram channels. * Close all dram channels.
*/ */
static void static void
snd_emu8000_close_dma(emu8000_t *emu) snd_emu8000_close_dma(struct snd_emu8000 *emu)
{ {
int i; int i;
...@@ -106,7 +106,7 @@ read_word(const void __user *buf, int offset, int mode) ...@@ -106,7 +106,7 @@ read_word(const void __user *buf, int offset, int mode)
/* /*
*/ */
static void static void
snd_emu8000_write_wait(emu8000_t *emu) snd_emu8000_write_wait(struct snd_emu8000 *emu)
{ {
while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) { while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
schedule_timeout_interruptible(1); schedule_timeout_interruptible(1);
...@@ -128,7 +128,7 @@ snd_emu8000_write_wait(emu8000_t *emu) ...@@ -128,7 +128,7 @@ snd_emu8000_write_wait(emu8000_t *emu)
* working. * working.
*/ */
static inline void static inline void
write_word(emu8000_t *emu, int *offset, unsigned short data) write_word(struct snd_emu8000 *emu, int *offset, unsigned short data)
{ {
if (emu8000_reset_addr) { if (emu8000_reset_addr) {
if (emu8000_reset_addr > 1) if (emu8000_reset_addr > 1)
...@@ -144,15 +144,16 @@ write_word(emu8000_t *emu, int *offset, unsigned short data) ...@@ -144,15 +144,16 @@ write_word(emu8000_t *emu, int *offset, unsigned short data)
* the generic soundfont routines as a callback. * the generic soundfont routines as a callback.
*/ */
int int
snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp, snd_emu8000_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,
snd_util_memhdr_t *hdr, const void __user *data, long count) struct snd_util_memhdr *hdr,
const void __user *data, long count)
{ {
int i; int i;
int rc; int rc;
int offset; int offset;
int truesize; int truesize;
int dram_offset, dram_start; int dram_offset, dram_start;
emu8000_t *emu; struct snd_emu8000 *emu;
emu = rec->hw; emu = rec->hw;
snd_assert(sp != NULL, return -EINVAL); snd_assert(sp != NULL, return -EINVAL);
...@@ -282,7 +283,8 @@ snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp, ...@@ -282,7 +283,8 @@ snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp,
* free a sample block * free a sample block
*/ */
int int
snd_emu8000_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr) snd_emu8000_sample_free(struct snd_emux *rec, struct snd_sf_sample *sp,
struct snd_util_memhdr *hdr)
{ {
if (sp->block) { if (sp->block) {
snd_util_mem_free(hdr, sp->block); snd_util_mem_free(hdr, sp->block);
...@@ -296,7 +298,7 @@ snd_emu8000_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t ...@@ -296,7 +298,7 @@ snd_emu8000_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t
* sample_reset callback - terminate voices * sample_reset callback - terminate voices
*/ */
void void
snd_emu8000_sample_reset(snd_emux_t *rec) snd_emu8000_sample_reset(struct snd_emux *rec)
{ {
snd_emux_terminate_all(rec); snd_emux_terminate_all(rec);
} }
...@@ -46,14 +46,12 @@ ...@@ -46,14 +46,12 @@
*/ */
typedef struct snd_emu8k_pcm emu8k_pcm_t;
struct snd_emu8k_pcm { struct snd_emu8k_pcm {
emu8000_t *emu; struct snd_emu8000 *emu;
snd_pcm_substream_t *substream; struct snd_pcm_substream *substream;
unsigned int allocated_bytes; unsigned int allocated_bytes;
snd_util_memblk_t *block; struct snd_util_memblk *block;
unsigned int offset; unsigned int offset;
unsigned int buf_size; unsigned int buf_size;
unsigned int period_size; unsigned int period_size;
...@@ -77,7 +75,7 @@ struct snd_emu8k_pcm { ...@@ -77,7 +75,7 @@ struct snd_emu8k_pcm {
* open up channels for the simultaneous data transfer and playback * open up channels for the simultaneous data transfer and playback
*/ */
static int static int
emu8k_open_dram_for_pcm(emu8000_t *emu, int channels) emu8k_open_dram_for_pcm(struct snd_emu8000 *emu, int channels)
{ {
int i; int i;
...@@ -113,7 +111,7 @@ emu8k_open_dram_for_pcm(emu8000_t *emu, int channels) ...@@ -113,7 +111,7 @@ emu8k_open_dram_for_pcm(emu8000_t *emu, int channels)
/* /*
*/ */
static void static void
snd_emu8000_write_wait(emu8000_t *emu, int can_schedule) snd_emu8000_write_wait(struct snd_emu8000 *emu, int can_schedule)
{ {
while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) { while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
if (can_schedule) { if (can_schedule) {
...@@ -128,7 +126,7 @@ snd_emu8000_write_wait(emu8000_t *emu, int can_schedule) ...@@ -128,7 +126,7 @@ snd_emu8000_write_wait(emu8000_t *emu, int can_schedule)
* close all channels * close all channels
*/ */
static void static void
emu8k_close_dram(emu8000_t *emu) emu8k_close_dram(struct snd_emu8000 *emu)
{ {
int i; int i;
...@@ -156,7 +154,7 @@ static int calc_rate_offset(int hz) ...@@ -156,7 +154,7 @@ static int calc_rate_offset(int hz)
/* /*
*/ */
static snd_pcm_hardware_t emu8k_pcm_hw = { static struct snd_pcm_hardware emu8k_pcm_hw = {
#ifdef USE_NONINTERLEAVE #ifdef USE_NONINTERLEAVE
.info = SNDRV_PCM_INFO_NONINTERLEAVED, .info = SNDRV_PCM_INFO_NONINTERLEAVED,
#else #else
...@@ -180,7 +178,7 @@ static snd_pcm_hardware_t emu8k_pcm_hw = { ...@@ -180,7 +178,7 @@ static snd_pcm_hardware_t emu8k_pcm_hw = {
/* /*
* get the current position at the given channel from CCCA register * get the current position at the given channel from CCCA register
*/ */
static inline int emu8k_get_curpos(emu8k_pcm_t *rec, int ch) static inline int emu8k_get_curpos(struct snd_emu8k_pcm *rec, int ch)
{ {
int val = EMU8000_CCCA_READ(rec->emu, ch) & 0xfffffff; int val = EMU8000_CCCA_READ(rec->emu, ch) & 0xfffffff;
val -= rec->loop_start[ch] - 1; val -= rec->loop_start[ch] - 1;
...@@ -194,7 +192,7 @@ static inline int emu8k_get_curpos(emu8k_pcm_t *rec, int ch) ...@@ -194,7 +192,7 @@ static inline int emu8k_get_curpos(emu8k_pcm_t *rec, int ch)
*/ */
static void emu8k_pcm_timer_func(unsigned long data) static void emu8k_pcm_timer_func(unsigned long data)
{ {
emu8k_pcm_t *rec = (emu8k_pcm_t *)data; struct snd_emu8k_pcm *rec = (struct snd_emu8k_pcm *)data;
int ptr, delta; int ptr, delta;
spin_lock(&rec->timer_lock); spin_lock(&rec->timer_lock);
...@@ -226,11 +224,11 @@ static void emu8k_pcm_timer_func(unsigned long data) ...@@ -226,11 +224,11 @@ static void emu8k_pcm_timer_func(unsigned long data)
* open pcm * open pcm
* creating an instance here * creating an instance here
*/ */
static int emu8k_pcm_open(snd_pcm_substream_t *subs) static int emu8k_pcm_open(struct snd_pcm_substream *subs)
{ {
emu8000_t *emu = snd_pcm_substream_chip(subs); struct snd_emu8000 *emu = snd_pcm_substream_chip(subs);
emu8k_pcm_t *rec; struct snd_emu8k_pcm *rec;
snd_pcm_runtime_t *runtime = subs->runtime; struct snd_pcm_runtime *runtime = subs->runtime;
rec = kzalloc(sizeof(*rec), GFP_KERNEL); rec = kzalloc(sizeof(*rec), GFP_KERNEL);
if (! rec) if (! rec)
...@@ -256,9 +254,9 @@ static int emu8k_pcm_open(snd_pcm_substream_t *subs) ...@@ -256,9 +254,9 @@ static int emu8k_pcm_open(snd_pcm_substream_t *subs)
return 0; return 0;
} }
static int emu8k_pcm_close(snd_pcm_substream_t *subs) static int emu8k_pcm_close(struct snd_pcm_substream *subs)
{ {
emu8k_pcm_t *rec = subs->runtime->private_data; struct snd_emu8k_pcm *rec = subs->runtime->private_data;
kfree(rec); kfree(rec);
subs->runtime->private_data = NULL; subs->runtime->private_data = NULL;
return 0; return 0;
...@@ -281,9 +279,9 @@ static int calc_pitch_target(int pitch) ...@@ -281,9 +279,9 @@ static int calc_pitch_target(int pitch)
/* /*
* set up the voice * set up the voice
*/ */
static void setup_voice(emu8k_pcm_t *rec, int ch) static void setup_voice(struct snd_emu8k_pcm *rec, int ch)
{ {
emu8000_t *hw = rec->emu; struct snd_emu8000 *hw = rec->emu;
unsigned int temp; unsigned int temp;
/* channel to be silent and idle */ /* channel to be silent and idle */
...@@ -334,10 +332,10 @@ static void setup_voice(emu8k_pcm_t *rec, int ch) ...@@ -334,10 +332,10 @@ static void setup_voice(emu8k_pcm_t *rec, int ch)
/* /*
* trigger the voice * trigger the voice
*/ */
static void start_voice(emu8k_pcm_t *rec, int ch) static void start_voice(struct snd_emu8k_pcm *rec, int ch)
{ {
unsigned long flags; unsigned long flags;
emu8000_t *hw = rec->emu; struct snd_emu8000 *hw = rec->emu;
unsigned int temp, aux; unsigned int temp, aux;
int pt = calc_pitch_target(rec->pitch); int pt = calc_pitch_target(rec->pitch);
...@@ -370,10 +368,10 @@ static void start_voice(emu8k_pcm_t *rec, int ch) ...@@ -370,10 +368,10 @@ static void start_voice(emu8k_pcm_t *rec, int ch)
/* /*
* stop the voice immediately * stop the voice immediately
*/ */
static void stop_voice(emu8k_pcm_t *rec, int ch) static void stop_voice(struct snd_emu8k_pcm *rec, int ch)
{ {
unsigned long flags; unsigned long flags;
emu8000_t *hw = rec->emu; struct snd_emu8000 *hw = rec->emu;
EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F); EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F);
...@@ -386,9 +384,9 @@ static void stop_voice(emu8k_pcm_t *rec, int ch) ...@@ -386,9 +384,9 @@ static void stop_voice(emu8k_pcm_t *rec, int ch)
spin_unlock_irqrestore(&rec->timer_lock, flags); spin_unlock_irqrestore(&rec->timer_lock, flags);
} }
static int emu8k_pcm_trigger(snd_pcm_substream_t *subs, int cmd) static int emu8k_pcm_trigger(struct snd_pcm_substream *subs, int cmd)
{ {
emu8k_pcm_t *rec = subs->runtime->private_data; struct snd_emu8k_pcm *rec = subs->runtime->private_data;
int ch; int ch;
switch (cmd) { switch (cmd) {
...@@ -428,7 +426,7 @@ do { \ ...@@ -428,7 +426,7 @@ do { \
#ifdef USE_NONINTERLEAVE #ifdef USE_NONINTERLEAVE
/* copy one channel block */ /* copy one channel block */
static int emu8k_transfer_block(emu8000_t *emu, int offset, unsigned short *buf, int count) static int emu8k_transfer_block(struct snd_emu8000 *emu, int offset, unsigned short *buf, int count)
{ {
EMU8000_SMALW_WRITE(emu, offset); EMU8000_SMALW_WRITE(emu, offset);
while (count > 0) { while (count > 0) {
...@@ -442,14 +440,14 @@ static int emu8k_transfer_block(emu8000_t *emu, int offset, unsigned short *buf, ...@@ -442,14 +440,14 @@ static int emu8k_transfer_block(emu8000_t *emu, int offset, unsigned short *buf,
return 0; return 0;
} }
static int emu8k_pcm_copy(snd_pcm_substream_t *subs, static int emu8k_pcm_copy(struct snd_pcm_substream *subs,
int voice, int voice,
snd_pcm_uframes_t pos, snd_pcm_uframes_t pos,
void *src, void *src,
snd_pcm_uframes_t count) snd_pcm_uframes_t count)
{ {
emu8k_pcm_t *rec = subs->runtime->private_data; struct snd_emu8k_pcm *rec = subs->runtime->private_data;
emu8000_t *emu = rec->emu; struct snd_emu8000 *emu = rec->emu;
snd_emu8000_write_wait(emu, 1); snd_emu8000_write_wait(emu, 1);
if (voice == -1) { if (voice == -1) {
...@@ -469,7 +467,7 @@ static int emu8k_pcm_copy(snd_pcm_substream_t *subs, ...@@ -469,7 +467,7 @@ static int emu8k_pcm_copy(snd_pcm_substream_t *subs,
} }
/* make a channel block silence */ /* make a channel block silence */
static int emu8k_silence_block(emu8000_t *emu, int offset, int count) static int emu8k_silence_block(struct snd_emu8000 *emu, int offset, int count)
{ {
EMU8000_SMALW_WRITE(emu, offset); EMU8000_SMALW_WRITE(emu, offset);
while (count > 0) { while (count > 0) {
...@@ -480,13 +478,13 @@ static int emu8k_silence_block(emu8000_t *emu, int offset, int count) ...@@ -480,13 +478,13 @@ static int emu8k_silence_block(emu8000_t *emu, int offset, int count)
return 0; return 0;
} }
static int emu8k_pcm_silence(snd_pcm_substream_t *subs, static int emu8k_pcm_silence(struct snd_pcm_substream *subs,
int voice, int voice,
snd_pcm_uframes_t pos, snd_pcm_uframes_t pos,
snd_pcm_uframes_t count) snd_pcm_uframes_t count)
{ {
emu8k_pcm_t *rec = subs->runtime->private_data; struct snd_emu8k_pcm *rec = subs->runtime->private_data;
emu8000_t *emu = rec->emu; struct snd_emu8000 *emu = rec->emu;
snd_emu8000_write_wait(emu, 1); snd_emu8000_write_wait(emu, 1);
if (voice == -1 && rec->voices == 1) if (voice == -1 && rec->voices == 1)
...@@ -508,14 +506,14 @@ static int emu8k_pcm_silence(snd_pcm_substream_t *subs, ...@@ -508,14 +506,14 @@ static int emu8k_pcm_silence(snd_pcm_substream_t *subs,
* copy the interleaved data can be done easily by using * copy the interleaved data can be done easily by using
* DMA "left" and "right" channels on emu8k engine. * DMA "left" and "right" channels on emu8k engine.
*/ */
static int emu8k_pcm_copy(snd_pcm_substream_t *subs, static int emu8k_pcm_copy(struct snd_pcm_substream *subs,
int voice, int voice,
snd_pcm_uframes_t pos, snd_pcm_uframes_t pos,
void __user *src, void __user *src,
snd_pcm_uframes_t count) snd_pcm_uframes_t count)
{ {
emu8k_pcm_t *rec = subs->runtime->private_data; struct snd_emu8k_pcm *rec = subs->runtime->private_data;
emu8000_t *emu = rec->emu; struct snd_emu8000 *emu = rec->emu;
unsigned short __user *buf = src; unsigned short __user *buf = src;
snd_emu8000_write_wait(emu, 1); snd_emu8000_write_wait(emu, 1);
...@@ -539,13 +537,13 @@ static int emu8k_pcm_copy(snd_pcm_substream_t *subs, ...@@ -539,13 +537,13 @@ static int emu8k_pcm_copy(snd_pcm_substream_t *subs,
return 0; return 0;
} }
static int emu8k_pcm_silence(snd_pcm_substream_t *subs, static int emu8k_pcm_silence(struct snd_pcm_substream *subs,
int voice, int voice,
snd_pcm_uframes_t pos, snd_pcm_uframes_t pos,
snd_pcm_uframes_t count) snd_pcm_uframes_t count)
{ {
emu8k_pcm_t *rec = subs->runtime->private_data; struct snd_emu8k_pcm *rec = subs->runtime->private_data;
emu8000_t *emu = rec->emu; struct snd_emu8000 *emu = rec->emu;
snd_emu8000_write_wait(emu, 1); snd_emu8000_write_wait(emu, 1);
EMU8000_SMALW_WRITE(emu, rec->loop_start[0] + pos); EMU8000_SMALW_WRITE(emu, rec->loop_start[0] + pos);
...@@ -567,10 +565,10 @@ static int emu8k_pcm_silence(snd_pcm_substream_t *subs, ...@@ -567,10 +565,10 @@ static int emu8k_pcm_silence(snd_pcm_substream_t *subs,
/* /*
* allocate a memory block * allocate a memory block
*/ */
static int emu8k_pcm_hw_params(snd_pcm_substream_t *subs, static int emu8k_pcm_hw_params(struct snd_pcm_substream *subs,
snd_pcm_hw_params_t *hw_params) struct snd_pcm_hw_params *hw_params)
{ {
emu8k_pcm_t *rec = subs->runtime->private_data; struct snd_emu8k_pcm *rec = subs->runtime->private_data;
if (rec->block) { if (rec->block) {
/* reallocation - release the old block */ /* reallocation - release the old block */
...@@ -592,9 +590,9 @@ static int emu8k_pcm_hw_params(snd_pcm_substream_t *subs, ...@@ -592,9 +590,9 @@ static int emu8k_pcm_hw_params(snd_pcm_substream_t *subs,
/* /*
* free the memory block * free the memory block
*/ */
static int emu8k_pcm_hw_free(snd_pcm_substream_t *subs) static int emu8k_pcm_hw_free(struct snd_pcm_substream *subs)
{ {
emu8k_pcm_t *rec = subs->runtime->private_data; struct snd_emu8k_pcm *rec = subs->runtime->private_data;
if (rec->block) { if (rec->block) {
int ch; int ch;
...@@ -610,9 +608,9 @@ static int emu8k_pcm_hw_free(snd_pcm_substream_t *subs) ...@@ -610,9 +608,9 @@ static int emu8k_pcm_hw_free(snd_pcm_substream_t *subs)
/* /*
*/ */
static int emu8k_pcm_prepare(snd_pcm_substream_t *subs) static int emu8k_pcm_prepare(struct snd_pcm_substream *subs)
{ {
emu8k_pcm_t *rec = subs->runtime->private_data; struct snd_emu8k_pcm *rec = subs->runtime->private_data;
rec->pitch = 0xe000 + calc_rate_offset(subs->runtime->rate); rec->pitch = 0xe000 + calc_rate_offset(subs->runtime->rate);
rec->last_ptr = 0; rec->last_ptr = 0;
...@@ -656,16 +654,16 @@ static int emu8k_pcm_prepare(snd_pcm_substream_t *subs) ...@@ -656,16 +654,16 @@ static int emu8k_pcm_prepare(snd_pcm_substream_t *subs)
return 0; return 0;
} }
static snd_pcm_uframes_t emu8k_pcm_pointer(snd_pcm_substream_t *subs) static snd_pcm_uframes_t emu8k_pcm_pointer(struct snd_pcm_substream *subs)
{ {
emu8k_pcm_t *rec = subs->runtime->private_data; struct snd_emu8k_pcm *rec = subs->runtime->private_data;
if (rec->running) if (rec->running)
return emu8k_get_curpos(rec, 0); return emu8k_get_curpos(rec, 0);
return 0; return 0;
} }
static snd_pcm_ops_t emu8k_pcm_ops = { static struct snd_pcm_ops emu8k_pcm_ops = {
.open = emu8k_pcm_open, .open = emu8k_pcm_open,
.close = emu8k_pcm_close, .close = emu8k_pcm_close,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
...@@ -679,15 +677,15 @@ static snd_pcm_ops_t emu8k_pcm_ops = { ...@@ -679,15 +677,15 @@ static snd_pcm_ops_t emu8k_pcm_ops = {
}; };
static void snd_emu8000_pcm_free(snd_pcm_t *pcm) static void snd_emu8000_pcm_free(struct snd_pcm *pcm)
{ {
emu8000_t *emu = pcm->private_data; struct snd_emu8000 *emu = pcm->private_data;
emu->pcm = NULL; emu->pcm = NULL;
} }
int snd_emu8000_pcm_new(snd_card_t *card, emu8000_t *emu, int index) int snd_emu8000_pcm_new(struct snd_card *card, struct snd_emu8000 *emu, int index)
{ {
snd_pcm_t *pcm; struct snd_pcm *pcm;
int err; int err;
if ((err = snd_pcm_new(card, "Emu8000 PCM", index, 1, 0, &pcm)) < 0) if ((err = snd_pcm_new(card, "Emu8000 PCM", index, 1, 0, &pcm)) < 0)
......
...@@ -33,12 +33,12 @@ MODULE_LICENSE("GPL"); ...@@ -33,12 +33,12 @@ MODULE_LICENSE("GPL");
/* /*
* create a new hardware dependent device for Emu8000 * create a new hardware dependent device for Emu8000
*/ */
static int snd_emu8000_new_device(snd_seq_device_t *dev) static int snd_emu8000_new_device(struct snd_seq_device *dev)
{ {
emu8000_t *hw; struct snd_emu8000 *hw;
snd_emux_t *emu; struct snd_emux *emu;
hw = *(emu8000_t**)SNDRV_SEQ_DEVICE_ARGPTR(dev); hw = *(struct snd_emu8000**)SNDRV_SEQ_DEVICE_ARGPTR(dev);
if (hw == NULL) if (hw == NULL)
return -EINVAL; return -EINVAL;
...@@ -92,9 +92,9 @@ static int snd_emu8000_new_device(snd_seq_device_t *dev) ...@@ -92,9 +92,9 @@ static int snd_emu8000_new_device(snd_seq_device_t *dev)
/* /*
* free all resources * free all resources
*/ */
static int snd_emu8000_delete_device(snd_seq_device_t *dev) static int snd_emu8000_delete_device(struct snd_seq_device *dev)
{ {
emu8000_t *hw; struct snd_emu8000 *hw;
if (dev->driver_data == NULL) if (dev->driver_data == NULL)
return 0; /* no synth was allocated actually */ return 0; /* no synth was allocated actually */
...@@ -118,11 +118,12 @@ static int snd_emu8000_delete_device(snd_seq_device_t *dev) ...@@ -118,11 +118,12 @@ static int snd_emu8000_delete_device(snd_seq_device_t *dev)
static int __init alsa_emu8000_init(void) static int __init alsa_emu8000_init(void)
{ {
static snd_seq_dev_ops_t ops = { static struct snd_seq_dev_ops ops = {
snd_emu8000_new_device, snd_emu8000_new_device,
snd_emu8000_delete_device, snd_emu8000_delete_device,
}; };
return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU8000, &ops, sizeof(emu8000_t*)); return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU8000, &ops,
sizeof(struct snd_emu8000*));
} }
static void __exit alsa_emu8000_exit(void) static void __exit alsa_emu8000_exit(void)
......
...@@ -72,7 +72,7 @@ MODULE_DEVICE_TABLE(pnp_card, snd_es968_pnpids); ...@@ -72,7 +72,7 @@ MODULE_DEVICE_TABLE(pnp_card, snd_es968_pnpids);
static irqreturn_t snd_card_es968_interrupt(int irq, void *dev_id, static irqreturn_t snd_card_es968_interrupt(int irq, void *dev_id,
struct pt_regs *regs) struct pt_regs *regs)
{ {
sb_t *chip = dev_id; struct snd_sb *chip = dev_id;
if (chip->open & SB_OPEN_PCM) { if (chip->open & SB_OPEN_PCM) {
return snd_sb8dsp_interrupt(chip); return snd_sb8dsp_interrupt(chip);
...@@ -128,8 +128,8 @@ static int __init snd_card_es968_probe(int dev, ...@@ -128,8 +128,8 @@ static int __init snd_card_es968_probe(int dev,
const struct pnp_card_device_id *pid) const struct pnp_card_device_id *pid)
{ {
int error; int error;
sb_t *chip; struct snd_sb *chip;
snd_card_t *card; struct snd_card *card;
struct snd_card_es968 *acard; struct snd_card_es968 *acard;
if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE, if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE,
...@@ -200,7 +200,7 @@ static int __devinit snd_es968_pnp_detect(struct pnp_card_link *card, ...@@ -200,7 +200,7 @@ static int __devinit snd_es968_pnp_detect(struct pnp_card_link *card,
static void __devexit snd_es968_pnp_remove(struct pnp_card_link * pcard) static void __devexit snd_es968_pnp_remove(struct pnp_card_link * pcard)
{ {
snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard); struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
snd_card_disconnect(card); snd_card_disconnect(card);
snd_card_free_in_thread(card); snd_card_free_in_thread(card);
......
...@@ -138,7 +138,7 @@ struct snd_card_sb16 { ...@@ -138,7 +138,7 @@ struct snd_card_sb16 {
#endif #endif
}; };
static snd_card_t *snd_sb16_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; static struct snd_card *snd_sb16_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
#ifdef CONFIG_PNP #ifdef CONFIG_PNP
...@@ -339,7 +339,7 @@ static int __devinit snd_card_sb16_pnp(int dev, struct snd_card_sb16 *acard, ...@@ -339,7 +339,7 @@ static int __devinit snd_card_sb16_pnp(int dev, struct snd_card_sb16 *acard,
#endif /* CONFIG_PNP */ #endif /* CONFIG_PNP */
static void snd_sb16_free(snd_card_t *card) static void snd_sb16_free(struct snd_card *card)
{ {
struct snd_card_sb16 *acard = (struct snd_card_sb16 *)card->private_data; struct snd_card_sb16 *acard = (struct snd_card_sb16 *)card->private_data;
...@@ -362,13 +362,13 @@ static int __init snd_sb16_probe(int dev, ...@@ -362,13 +362,13 @@ static int __init snd_sb16_probe(int dev,
static int possible_dmas8[] = {1, 3, 0, -1}; static int possible_dmas8[] = {1, 3, 0, -1};
static int possible_dmas16[] = {5, 6, 7, -1}; static int possible_dmas16[] = {5, 6, 7, -1};
int xirq, xdma8, xdma16; int xirq, xdma8, xdma16;
sb_t *chip; struct snd_sb *chip;
snd_card_t *card; struct snd_card *card;
struct snd_card_sb16 *acard; struct snd_card_sb16 *acard;
opl3_t *opl3; struct snd_opl3 *opl3;
snd_hwdep_t *synth = NULL; struct snd_hwdep *synth = NULL;
#ifdef CONFIG_SND_SB16_CSP #ifdef CONFIG_SND_SB16_CSP
snd_hwdep_t *xcsp = NULL; struct snd_hwdep *xcsp = NULL;
#endif #endif
unsigned long flags; unsigned long flags;
int err; int err;
...@@ -583,7 +583,7 @@ static int __devinit snd_sb16_pnp_detect(struct pnp_card_link *card, ...@@ -583,7 +583,7 @@ static int __devinit snd_sb16_pnp_detect(struct pnp_card_link *card,
static void __devexit snd_sb16_pnp_remove(struct pnp_card_link * pcard) static void __devexit snd_sb16_pnp_remove(struct pnp_card_link * pcard)
{ {
snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard); struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
snd_card_disconnect(card); snd_card_disconnect(card);
snd_card_free_in_thread(card); snd_card_free_in_thread(card);
......
This diff is collapsed.
This diff is collapsed.
...@@ -59,11 +59,11 @@ struct snd_sb8 { ...@@ -59,11 +59,11 @@ struct snd_sb8 {
struct resource *fm_res; /* used to block FM i/o region for legacy cards */ struct resource *fm_res; /* used to block FM i/o region for legacy cards */
}; };
static snd_card_t *snd_sb8_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; static struct snd_card *snd_sb8_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
static irqreturn_t snd_sb8_interrupt(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t snd_sb8_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
sb_t *chip = dev_id; struct snd_sb *chip = dev_id;
if (chip->open & SB_OPEN_PCM) { if (chip->open & SB_OPEN_PCM) {
return snd_sb8dsp_interrupt(chip); return snd_sb8dsp_interrupt(chip);
...@@ -72,7 +72,7 @@ static irqreturn_t snd_sb8_interrupt(int irq, void *dev_id, struct pt_regs *regs ...@@ -72,7 +72,7 @@ static irqreturn_t snd_sb8_interrupt(int irq, void *dev_id, struct pt_regs *regs
} }
} }
static void snd_sb8_free(snd_card_t *card) static void snd_sb8_free(struct snd_card *card)
{ {
struct snd_sb8 *acard = (struct snd_sb8 *)card->private_data; struct snd_sb8 *acard = (struct snd_sb8 *)card->private_data;
...@@ -83,10 +83,10 @@ static void snd_sb8_free(snd_card_t *card) ...@@ -83,10 +83,10 @@ static void snd_sb8_free(snd_card_t *card)
static int __init snd_sb8_probe(int dev) static int __init snd_sb8_probe(int dev)
{ {
sb_t *chip; struct snd_sb *chip;
snd_card_t *card; struct snd_card *card;
struct snd_sb8 *acard; struct snd_sb8 *acard;
opl3_t *opl3; struct snd_opl3 *opl3;
int err; int err;
card = snd_card_new(index[dev], id[dev], THIS_MODULE, card = snd_card_new(index[dev], id[dev], THIS_MODULE,
......
...@@ -46,19 +46,19 @@ MODULE_LICENSE("GPL"); ...@@ -46,19 +46,19 @@ MODULE_LICENSE("GPL");
#define SB8_DEN(v) ((SB8_CLOCK + (v) / 2) / (v)) #define SB8_DEN(v) ((SB8_CLOCK + (v) / 2) / (v))
#define SB8_RATE(v) (SB8_CLOCK / SB8_DEN(v)) #define SB8_RATE(v) (SB8_CLOCK / SB8_DEN(v))
static ratnum_t clock = { static struct snd_ratnum clock = {
.num = SB8_CLOCK, .num = SB8_CLOCK,
.den_min = 1, .den_min = 1,
.den_max = 256, .den_max = 256,
.den_step = 1, .den_step = 1,
}; };
static snd_pcm_hw_constraint_ratnums_t hw_constraints_clock = { static struct snd_pcm_hw_constraint_ratnums hw_constraints_clock = {
.nrats = 1, .nrats = 1,
.rats = &clock, .rats = &clock,
}; };
static ratnum_t stereo_clocks[] = { static struct snd_ratnum stereo_clocks[] = {
{ {
.num = SB8_CLOCK, .num = SB8_CLOCK,
.den_min = SB8_DEN(22050), .den_min = SB8_DEN(22050),
...@@ -73,10 +73,10 @@ static ratnum_t stereo_clocks[] = { ...@@ -73,10 +73,10 @@ static ratnum_t stereo_clocks[] = {
} }
}; };
static int snd_sb8_hw_constraint_rate_channels(snd_pcm_hw_params_t *params, static int snd_sb8_hw_constraint_rate_channels(struct snd_pcm_hw_params *params,
snd_pcm_hw_rule_t *rule) struct snd_pcm_hw_rule *rule)
{ {
snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); struct snd_interval *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
if (c->min > 1) { if (c->min > 1) {
unsigned int num = 0, den = 0; unsigned int num = 0, den = 0;
int err = snd_interval_ratnum(hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE), int err = snd_interval_ratnum(hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE),
...@@ -90,22 +90,22 @@ static int snd_sb8_hw_constraint_rate_channels(snd_pcm_hw_params_t *params, ...@@ -90,22 +90,22 @@ static int snd_sb8_hw_constraint_rate_channels(snd_pcm_hw_params_t *params,
return 0; return 0;
} }
static int snd_sb8_hw_constraint_channels_rate(snd_pcm_hw_params_t *params, static int snd_sb8_hw_constraint_channels_rate(struct snd_pcm_hw_params *params,
snd_pcm_hw_rule_t *rule) struct snd_pcm_hw_rule *rule)
{ {
snd_interval_t *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); struct snd_interval *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
if (r->min > SB8_RATE(22050) || r->max <= SB8_RATE(11025)) { if (r->min > SB8_RATE(22050) || r->max <= SB8_RATE(11025)) {
snd_interval_t t = { .min = 1, .max = 1 }; struct snd_interval t = { .min = 1, .max = 1 };
return snd_interval_refine(hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS), &t); return snd_interval_refine(hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS), &t);
} }
return 0; return 0;
} }
static int snd_sb8_playback_prepare(snd_pcm_substream_t * substream) static int snd_sb8_playback_prepare(struct snd_pcm_substream *substream)
{ {
unsigned long flags; unsigned long flags;
sb_t *chip = snd_pcm_substream_chip(substream); struct snd_sb *chip = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
unsigned int mixreg, rate, size, count; unsigned int mixreg, rate, size, count;
rate = runtime->rate; rate = runtime->rate;
...@@ -178,11 +178,11 @@ static int snd_sb8_playback_prepare(snd_pcm_substream_t * substream) ...@@ -178,11 +178,11 @@ static int snd_sb8_playback_prepare(snd_pcm_substream_t * substream)
return 0; return 0;
} }
static int snd_sb8_playback_trigger(snd_pcm_substream_t * substream, static int snd_sb8_playback_trigger(struct snd_pcm_substream *substream,
int cmd) int cmd)
{ {
unsigned long flags; unsigned long flags;
sb_t *chip = snd_pcm_substream_chip(substream); struct snd_sb *chip = snd_pcm_substream_chip(substream);
unsigned int count; unsigned int count;
spin_lock_irqsave(&chip->reg_lock, flags); spin_lock_irqsave(&chip->reg_lock, flags);
...@@ -197,7 +197,7 @@ static int snd_sb8_playback_trigger(snd_pcm_substream_t * substream, ...@@ -197,7 +197,7 @@ static int snd_sb8_playback_trigger(snd_pcm_substream_t * substream,
break; break;
case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_STOP:
if (chip->playback_format == SB_DSP_HI_OUTPUT_AUTO) { if (chip->playback_format == SB_DSP_HI_OUTPUT_AUTO) {
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
snd_sbdsp_reset(chip); snd_sbdsp_reset(chip);
if (runtime->channels > 1) { if (runtime->channels > 1) {
spin_lock(&chip->mixer_lock); spin_lock(&chip->mixer_lock);
...@@ -215,23 +215,23 @@ static int snd_sb8_playback_trigger(snd_pcm_substream_t * substream, ...@@ -215,23 +215,23 @@ static int snd_sb8_playback_trigger(snd_pcm_substream_t * substream,
return 0; return 0;
} }
static int snd_sb8_hw_params(snd_pcm_substream_t * substream, static int snd_sb8_hw_params(struct snd_pcm_substream *substream,
snd_pcm_hw_params_t * hw_params) struct snd_pcm_hw_params *hw_params)
{ {
return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
} }
static int snd_sb8_hw_free(snd_pcm_substream_t * substream) static int snd_sb8_hw_free(struct snd_pcm_substream *substream)
{ {
snd_pcm_lib_free_pages(substream); snd_pcm_lib_free_pages(substream);
return 0; return 0;
} }
static int snd_sb8_capture_prepare(snd_pcm_substream_t * substream) static int snd_sb8_capture_prepare(struct snd_pcm_substream *substream)
{ {
unsigned long flags; unsigned long flags;
sb_t *chip = snd_pcm_substream_chip(substream); struct snd_sb *chip = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
unsigned int mixreg, rate, size, count; unsigned int mixreg, rate, size, count;
rate = runtime->rate; rate = runtime->rate;
...@@ -290,11 +290,11 @@ static int snd_sb8_capture_prepare(snd_pcm_substream_t * substream) ...@@ -290,11 +290,11 @@ static int snd_sb8_capture_prepare(snd_pcm_substream_t * substream)
return 0; return 0;
} }
static int snd_sb8_capture_trigger(snd_pcm_substream_t * substream, static int snd_sb8_capture_trigger(struct snd_pcm_substream *substream,
int cmd) int cmd)
{ {
unsigned long flags; unsigned long flags;
sb_t *chip = snd_pcm_substream_chip(substream); struct snd_sb *chip = snd_pcm_substream_chip(substream);
unsigned int count; unsigned int count;
spin_lock_irqsave(&chip->reg_lock, flags); spin_lock_irqsave(&chip->reg_lock, flags);
...@@ -309,7 +309,7 @@ static int snd_sb8_capture_trigger(snd_pcm_substream_t * substream, ...@@ -309,7 +309,7 @@ static int snd_sb8_capture_trigger(snd_pcm_substream_t * substream,
break; break;
case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_STOP:
if (chip->capture_format == SB_DSP_HI_INPUT_AUTO) { if (chip->capture_format == SB_DSP_HI_INPUT_AUTO) {
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
snd_sbdsp_reset(chip); snd_sbdsp_reset(chip);
if (runtime->channels > 1) { if (runtime->channels > 1) {
/* restore input filter status */ /* restore input filter status */
...@@ -329,10 +329,10 @@ static int snd_sb8_capture_trigger(snd_pcm_substream_t * substream, ...@@ -329,10 +329,10 @@ static int snd_sb8_capture_trigger(snd_pcm_substream_t * substream,
return 0; return 0;
} }
irqreturn_t snd_sb8dsp_interrupt(sb_t *chip) irqreturn_t snd_sb8dsp_interrupt(struct snd_sb *chip)
{ {
snd_pcm_substream_t *substream; struct snd_pcm_substream *substream;
snd_pcm_runtime_t *runtime; struct snd_pcm_runtime *runtime;
snd_sb_ack_8bit(chip); snd_sb_ack_8bit(chip);
switch (chip->mode) { switch (chip->mode) {
...@@ -354,9 +354,9 @@ irqreturn_t snd_sb8dsp_interrupt(sb_t *chip) ...@@ -354,9 +354,9 @@ irqreturn_t snd_sb8dsp_interrupt(sb_t *chip)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static snd_pcm_uframes_t snd_sb8_playback_pointer(snd_pcm_substream_t * substream) static snd_pcm_uframes_t snd_sb8_playback_pointer(struct snd_pcm_substream *substream)
{ {
sb_t *chip = snd_pcm_substream_chip(substream); struct snd_sb *chip = snd_pcm_substream_chip(substream);
size_t ptr; size_t ptr;
if (chip->mode != SB_MODE_PLAYBACK_8) if (chip->mode != SB_MODE_PLAYBACK_8)
...@@ -365,9 +365,9 @@ static snd_pcm_uframes_t snd_sb8_playback_pointer(snd_pcm_substream_t * substrea ...@@ -365,9 +365,9 @@ static snd_pcm_uframes_t snd_sb8_playback_pointer(snd_pcm_substream_t * substrea
return bytes_to_frames(substream->runtime, ptr); return bytes_to_frames(substream->runtime, ptr);
} }
static snd_pcm_uframes_t snd_sb8_capture_pointer(snd_pcm_substream_t * substream) static snd_pcm_uframes_t snd_sb8_capture_pointer(struct snd_pcm_substream *substream)
{ {
sb_t *chip = snd_pcm_substream_chip(substream); struct snd_sb *chip = snd_pcm_substream_chip(substream);
size_t ptr; size_t ptr;
if (chip->mode != SB_MODE_CAPTURE_8) if (chip->mode != SB_MODE_CAPTURE_8)
...@@ -380,7 +380,7 @@ static snd_pcm_uframes_t snd_sb8_capture_pointer(snd_pcm_substream_t * substream ...@@ -380,7 +380,7 @@ static snd_pcm_uframes_t snd_sb8_capture_pointer(snd_pcm_substream_t * substream
*/ */
static snd_pcm_hardware_t snd_sb8_playback = static struct snd_pcm_hardware snd_sb8_playback =
{ {
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID), SNDRV_PCM_INFO_MMAP_VALID),
...@@ -399,7 +399,7 @@ static snd_pcm_hardware_t snd_sb8_playback = ...@@ -399,7 +399,7 @@ static snd_pcm_hardware_t snd_sb8_playback =
.fifo_size = 0, .fifo_size = 0,
}; };
static snd_pcm_hardware_t snd_sb8_capture = static struct snd_pcm_hardware snd_sb8_capture =
{ {
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID), SNDRV_PCM_INFO_MMAP_VALID),
...@@ -422,10 +422,10 @@ static snd_pcm_hardware_t snd_sb8_capture = ...@@ -422,10 +422,10 @@ static snd_pcm_hardware_t snd_sb8_capture =
* *
*/ */
static int snd_sb8_open(snd_pcm_substream_t *substream) static int snd_sb8_open(struct snd_pcm_substream *substream)
{ {
sb_t *chip = snd_pcm_substream_chip(substream); struct snd_sb *chip = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&chip->open_lock, flags); spin_lock_irqsave(&chip->open_lock, flags);
...@@ -468,10 +468,10 @@ static int snd_sb8_open(snd_pcm_substream_t *substream) ...@@ -468,10 +468,10 @@ static int snd_sb8_open(snd_pcm_substream_t *substream)
return 0; return 0;
} }
static int snd_sb8_close(snd_pcm_substream_t *substream) static int snd_sb8_close(struct snd_pcm_substream *substream)
{ {
unsigned long flags; unsigned long flags;
sb_t *chip = snd_pcm_substream_chip(substream); struct snd_sb *chip = snd_pcm_substream_chip(substream);
chip->playback_substream = NULL; chip->playback_substream = NULL;
chip->capture_substream = NULL; chip->capture_substream = NULL;
...@@ -485,7 +485,7 @@ static int snd_sb8_close(snd_pcm_substream_t *substream) ...@@ -485,7 +485,7 @@ static int snd_sb8_close(snd_pcm_substream_t *substream)
* Initialization part * Initialization part
*/ */
static snd_pcm_ops_t snd_sb8_playback_ops = { static struct snd_pcm_ops snd_sb8_playback_ops = {
.open = snd_sb8_open, .open = snd_sb8_open,
.close = snd_sb8_close, .close = snd_sb8_close,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
...@@ -496,7 +496,7 @@ static snd_pcm_ops_t snd_sb8_playback_ops = { ...@@ -496,7 +496,7 @@ static snd_pcm_ops_t snd_sb8_playback_ops = {
.pointer = snd_sb8_playback_pointer, .pointer = snd_sb8_playback_pointer,
}; };
static snd_pcm_ops_t snd_sb8_capture_ops = { static struct snd_pcm_ops snd_sb8_capture_ops = {
.open = snd_sb8_open, .open = snd_sb8_open,
.close = snd_sb8_close, .close = snd_sb8_close,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
...@@ -507,10 +507,10 @@ static snd_pcm_ops_t snd_sb8_capture_ops = { ...@@ -507,10 +507,10 @@ static snd_pcm_ops_t snd_sb8_capture_ops = {
.pointer = snd_sb8_capture_pointer, .pointer = snd_sb8_capture_pointer,
}; };
int snd_sb8dsp_pcm(sb_t *chip, int device, snd_pcm_t ** rpcm) int snd_sb8dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm)
{ {
snd_card_t *card = chip->card; struct snd_card *card = chip->card;
snd_pcm_t *pcm; struct snd_pcm *pcm;
int err; int err;
if (rpcm) if (rpcm)
......
...@@ -36,9 +36,9 @@ ...@@ -36,9 +36,9 @@
*/ */
irqreturn_t snd_sb8dsp_midi_interrupt(sb_t * chip) irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb * chip)
{ {
snd_rawmidi_t *rmidi; struct snd_rawmidi *rmidi;
int max = 64; int max = 64;
char byte; char byte;
...@@ -63,10 +63,10 @@ irqreturn_t snd_sb8dsp_midi_interrupt(sb_t * chip) ...@@ -63,10 +63,10 @@ irqreturn_t snd_sb8dsp_midi_interrupt(sb_t * chip)
*/ */
static int snd_sb8dsp_midi_input_open(snd_rawmidi_substream_t * substream) static int snd_sb8dsp_midi_input_open(struct snd_rawmidi_substream *substream)
{ {
unsigned long flags; unsigned long flags;
sb_t *chip; struct snd_sb *chip;
unsigned int valid_open_flags; unsigned int valid_open_flags;
chip = substream->rmidi->private_data; chip = substream->rmidi->private_data;
...@@ -90,10 +90,10 @@ static int snd_sb8dsp_midi_input_open(snd_rawmidi_substream_t * substream) ...@@ -90,10 +90,10 @@ static int snd_sb8dsp_midi_input_open(snd_rawmidi_substream_t * substream)
return 0; return 0;
} }
static int snd_sb8dsp_midi_output_open(snd_rawmidi_substream_t * substream) static int snd_sb8dsp_midi_output_open(struct snd_rawmidi_substream *substream)
{ {
unsigned long flags; unsigned long flags;
sb_t *chip; struct snd_sb *chip;
unsigned int valid_open_flags; unsigned int valid_open_flags;
chip = substream->rmidi->private_data; chip = substream->rmidi->private_data;
...@@ -117,10 +117,10 @@ static int snd_sb8dsp_midi_output_open(snd_rawmidi_substream_t * substream) ...@@ -117,10 +117,10 @@ static int snd_sb8dsp_midi_output_open(snd_rawmidi_substream_t * substream)
return 0; return 0;
} }
static int snd_sb8dsp_midi_input_close(snd_rawmidi_substream_t * substream) static int snd_sb8dsp_midi_input_close(struct snd_rawmidi_substream *substream)
{ {
unsigned long flags; unsigned long flags;
sb_t *chip; struct snd_sb *chip;
chip = substream->rmidi->private_data; chip = substream->rmidi->private_data;
spin_lock_irqsave(&chip->open_lock, flags); spin_lock_irqsave(&chip->open_lock, flags);
...@@ -135,10 +135,10 @@ static int snd_sb8dsp_midi_input_close(snd_rawmidi_substream_t * substream) ...@@ -135,10 +135,10 @@ static int snd_sb8dsp_midi_input_close(snd_rawmidi_substream_t * substream)
return 0; return 0;
} }
static int snd_sb8dsp_midi_output_close(snd_rawmidi_substream_t * substream) static int snd_sb8dsp_midi_output_close(struct snd_rawmidi_substream *substream)
{ {
unsigned long flags; unsigned long flags;
sb_t *chip; struct snd_sb *chip;
chip = substream->rmidi->private_data; chip = substream->rmidi->private_data;
spin_lock_irqsave(&chip->open_lock, flags); spin_lock_irqsave(&chip->open_lock, flags);
...@@ -153,10 +153,10 @@ static int snd_sb8dsp_midi_output_close(snd_rawmidi_substream_t * substream) ...@@ -153,10 +153,10 @@ static int snd_sb8dsp_midi_output_close(snd_rawmidi_substream_t * substream)
return 0; return 0;
} }
static void snd_sb8dsp_midi_input_trigger(snd_rawmidi_substream_t * substream, int up) static void snd_sb8dsp_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
{ {
unsigned long flags; unsigned long flags;
sb_t *chip; struct snd_sb *chip;
chip = substream->rmidi->private_data; chip = substream->rmidi->private_data;
spin_lock_irqsave(&chip->open_lock, flags); spin_lock_irqsave(&chip->open_lock, flags);
...@@ -176,10 +176,10 @@ static void snd_sb8dsp_midi_input_trigger(snd_rawmidi_substream_t * substream, i ...@@ -176,10 +176,10 @@ static void snd_sb8dsp_midi_input_trigger(snd_rawmidi_substream_t * substream, i
spin_unlock_irqrestore(&chip->open_lock, flags); spin_unlock_irqrestore(&chip->open_lock, flags);
} }
static void snd_sb8dsp_midi_output_write(snd_rawmidi_substream_t * substream) static void snd_sb8dsp_midi_output_write(struct snd_rawmidi_substream *substream)
{ {
unsigned long flags; unsigned long flags;
sb_t *chip; struct snd_sb *chip;
char byte; char byte;
int max = 32; int max = 32;
...@@ -214,8 +214,8 @@ static void snd_sb8dsp_midi_output_write(snd_rawmidi_substream_t * substream) ...@@ -214,8 +214,8 @@ static void snd_sb8dsp_midi_output_write(snd_rawmidi_substream_t * substream)
static void snd_sb8dsp_midi_output_timer(unsigned long data) static void snd_sb8dsp_midi_output_timer(unsigned long data)
{ {
snd_rawmidi_substream_t * substream = (snd_rawmidi_substream_t *) data; struct snd_rawmidi_substream *substream = (struct snd_rawmidi_substream *) data;
sb_t * chip = substream->rmidi->private_data; struct snd_sb * chip = substream->rmidi->private_data;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&chip->open_lock, flags); spin_lock_irqsave(&chip->open_lock, flags);
...@@ -225,10 +225,10 @@ static void snd_sb8dsp_midi_output_timer(unsigned long data) ...@@ -225,10 +225,10 @@ static void snd_sb8dsp_midi_output_timer(unsigned long data)
snd_sb8dsp_midi_output_write(substream); snd_sb8dsp_midi_output_write(substream);
} }
static void snd_sb8dsp_midi_output_trigger(snd_rawmidi_substream_t * substream, int up) static void snd_sb8dsp_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
{ {
unsigned long flags; unsigned long flags;
sb_t *chip; struct snd_sb *chip;
chip = substream->rmidi->private_data; chip = substream->rmidi->private_data;
spin_lock_irqsave(&chip->open_lock, flags); spin_lock_irqsave(&chip->open_lock, flags);
...@@ -256,23 +256,23 @@ static void snd_sb8dsp_midi_output_trigger(snd_rawmidi_substream_t * substream, ...@@ -256,23 +256,23 @@ static void snd_sb8dsp_midi_output_trigger(snd_rawmidi_substream_t * substream,
*/ */
static snd_rawmidi_ops_t snd_sb8dsp_midi_output = static struct snd_rawmidi_ops snd_sb8dsp_midi_output =
{ {
.open = snd_sb8dsp_midi_output_open, .open = snd_sb8dsp_midi_output_open,
.close = snd_sb8dsp_midi_output_close, .close = snd_sb8dsp_midi_output_close,
.trigger = snd_sb8dsp_midi_output_trigger, .trigger = snd_sb8dsp_midi_output_trigger,
}; };
static snd_rawmidi_ops_t snd_sb8dsp_midi_input = static struct snd_rawmidi_ops snd_sb8dsp_midi_input =
{ {
.open = snd_sb8dsp_midi_input_open, .open = snd_sb8dsp_midi_input_open,
.close = snd_sb8dsp_midi_input_close, .close = snd_sb8dsp_midi_input_close,
.trigger = snd_sb8dsp_midi_input_trigger, .trigger = snd_sb8dsp_midi_input_trigger,
}; };
int snd_sb8dsp_midi(sb_t *chip, int device, snd_rawmidi_t ** rrawmidi) int snd_sb8dsp_midi(struct snd_sb *chip, int device, struct snd_rawmidi ** rrawmidi)
{ {
snd_rawmidi_t *rmidi; struct snd_rawmidi *rmidi;
int err; int err;
if (rrawmidi) if (rrawmidi)
......
...@@ -41,7 +41,7 @@ MODULE_LICENSE("GPL"); ...@@ -41,7 +41,7 @@ MODULE_LICENSE("GPL");
#undef IO_DEBUG #undef IO_DEBUG
int snd_sbdsp_command(sb_t *chip, unsigned char val) int snd_sbdsp_command(struct snd_sb *chip, unsigned char val)
{ {
int i; int i;
#ifdef IO_DEBUG #ifdef IO_DEBUG
...@@ -56,7 +56,7 @@ int snd_sbdsp_command(sb_t *chip, unsigned char val) ...@@ -56,7 +56,7 @@ int snd_sbdsp_command(sb_t *chip, unsigned char val)
return 0; return 0;
} }
int snd_sbdsp_get_byte(sb_t *chip) int snd_sbdsp_get_byte(struct snd_sb *chip)
{ {
int val; int val;
int i; int i;
...@@ -73,7 +73,7 @@ int snd_sbdsp_get_byte(sb_t *chip) ...@@ -73,7 +73,7 @@ int snd_sbdsp_get_byte(sb_t *chip)
return -ENODEV; return -ENODEV;
} }
int snd_sbdsp_reset(sb_t *chip) int snd_sbdsp_reset(struct snd_sb *chip)
{ {
int i; int i;
...@@ -92,7 +92,7 @@ int snd_sbdsp_reset(sb_t *chip) ...@@ -92,7 +92,7 @@ int snd_sbdsp_reset(sb_t *chip)
return -ENODEV; return -ENODEV;
} }
static int snd_sbdsp_version(sb_t * chip) static int snd_sbdsp_version(struct snd_sb * chip)
{ {
unsigned int result = -ENODEV; unsigned int result = -ENODEV;
...@@ -102,7 +102,7 @@ static int snd_sbdsp_version(sb_t * chip) ...@@ -102,7 +102,7 @@ static int snd_sbdsp_version(sb_t * chip)
return result; return result;
} }
static int snd_sbdsp_probe(sb_t * chip) static int snd_sbdsp_probe(struct snd_sb * chip)
{ {
int version; int version;
int major, minor; int major, minor;
...@@ -176,7 +176,7 @@ static int snd_sbdsp_probe(sb_t * chip) ...@@ -176,7 +176,7 @@ static int snd_sbdsp_probe(sb_t * chip)
return 0; return 0;
} }
static int snd_sbdsp_free(sb_t *chip) static int snd_sbdsp_free(struct snd_sb *chip)
{ {
if (chip->res_port) if (chip->res_port)
release_and_free_resource(chip->res_port); release_and_free_resource(chip->res_port);
...@@ -196,24 +196,24 @@ static int snd_sbdsp_free(sb_t *chip) ...@@ -196,24 +196,24 @@ static int snd_sbdsp_free(sb_t *chip)
return 0; return 0;
} }
static int snd_sbdsp_dev_free(snd_device_t *device) static int snd_sbdsp_dev_free(struct snd_device *device)
{ {
sb_t *chip = device->device_data; struct snd_sb *chip = device->device_data;
return snd_sbdsp_free(chip); return snd_sbdsp_free(chip);
} }
int snd_sbdsp_create(snd_card_t *card, int snd_sbdsp_create(struct snd_card *card,
unsigned long port, unsigned long port,
int irq, int irq,
irqreturn_t (*irq_handler)(int, void *, struct pt_regs *), irqreturn_t (*irq_handler)(int, void *, struct pt_regs *),
int dma8, int dma8,
int dma16, int dma16,
unsigned short hardware, unsigned short hardware,
sb_t **r_chip) struct snd_sb **r_chip)
{ {
sb_t *chip; struct snd_sb *chip;
int err; int err;
static snd_device_ops_t ops = { static struct snd_device_ops ops = {
.dev_free = snd_sbdsp_dev_free, .dev_free = snd_sbdsp_dev_free,
}; };
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#undef IO_DEBUG #undef IO_DEBUG
void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data) void snd_sbmixer_write(struct snd_sb *chip, unsigned char reg, unsigned char data)
{ {
outb(reg, SBP(chip, MIXER_ADDR)); outb(reg, SBP(chip, MIXER_ADDR));
udelay(10); udelay(10);
...@@ -40,7 +40,7 @@ void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data) ...@@ -40,7 +40,7 @@ void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data)
#endif #endif
} }
unsigned char snd_sbmixer_read(sb_t *chip, unsigned char reg) unsigned char snd_sbmixer_read(struct snd_sb *chip, unsigned char reg)
{ {
unsigned char result; unsigned char result;
...@@ -58,7 +58,7 @@ unsigned char snd_sbmixer_read(sb_t *chip, unsigned char reg) ...@@ -58,7 +58,7 @@ unsigned char snd_sbmixer_read(sb_t *chip, unsigned char reg)
* Single channel mixer element * Single channel mixer element
*/ */
static int snd_sbmixer_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) static int snd_sbmixer_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ {
int mask = (kcontrol->private_value >> 24) & 0xff; int mask = (kcontrol->private_value >> 24) & 0xff;
...@@ -69,9 +69,9 @@ static int snd_sbmixer_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t ...@@ -69,9 +69,9 @@ static int snd_sbmixer_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
return 0; return 0;
} }
static int snd_sbmixer_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) static int snd_sbmixer_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
sb_t *sb = snd_kcontrol_chip(kcontrol); struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
unsigned long flags; unsigned long flags;
int reg = kcontrol->private_value & 0xff; int reg = kcontrol->private_value & 0xff;
int shift = (kcontrol->private_value >> 16) & 0xff; int shift = (kcontrol->private_value >> 16) & 0xff;
...@@ -85,9 +85,9 @@ static int snd_sbmixer_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ ...@@ -85,9 +85,9 @@ static int snd_sbmixer_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
return 0; return 0;
} }
static int snd_sbmixer_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) static int snd_sbmixer_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
sb_t *sb = snd_kcontrol_chip(kcontrol); struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
unsigned long flags; unsigned long flags;
int reg = kcontrol->private_value & 0xff; int reg = kcontrol->private_value & 0xff;
int shift = (kcontrol->private_value >> 16) & 0x07; int shift = (kcontrol->private_value >> 16) & 0x07;
...@@ -110,7 +110,7 @@ static int snd_sbmixer_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ ...@@ -110,7 +110,7 @@ static int snd_sbmixer_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
* Double channel mixer element * Double channel mixer element
*/ */
static int snd_sbmixer_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) static int snd_sbmixer_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ {
int mask = (kcontrol->private_value >> 24) & 0xff; int mask = (kcontrol->private_value >> 24) & 0xff;
...@@ -121,9 +121,9 @@ static int snd_sbmixer_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t ...@@ -121,9 +121,9 @@ static int snd_sbmixer_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
return 0; return 0;
} }
static int snd_sbmixer_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) static int snd_sbmixer_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
sb_t *sb = snd_kcontrol_chip(kcontrol); struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
unsigned long flags; unsigned long flags;
int left_reg = kcontrol->private_value & 0xff; int left_reg = kcontrol->private_value & 0xff;
int right_reg = (kcontrol->private_value >> 8) & 0xff; int right_reg = (kcontrol->private_value >> 8) & 0xff;
...@@ -141,9 +141,9 @@ static int snd_sbmixer_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ ...@@ -141,9 +141,9 @@ static int snd_sbmixer_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
return 0; return 0;
} }
static int snd_sbmixer_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) static int snd_sbmixer_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
sb_t *sb = snd_kcontrol_chip(kcontrol); struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
unsigned long flags; unsigned long flags;
int left_reg = kcontrol->private_value & 0xff; int left_reg = kcontrol->private_value & 0xff;
int right_reg = (kcontrol->private_value >> 8) & 0xff; int right_reg = (kcontrol->private_value >> 8) & 0xff;
...@@ -181,7 +181,7 @@ static int snd_sbmixer_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ ...@@ -181,7 +181,7 @@ static int snd_sbmixer_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
* DT-019x / ALS-007 capture/input switch * DT-019x / ALS-007 capture/input switch
*/ */
static int snd_dt019x_input_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) static int snd_dt019x_input_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ {
static char *texts[5] = { static char *texts[5] = {
"CD", "Mic", "Line", "Synth", "Master" "CD", "Mic", "Line", "Synth", "Master"
...@@ -196,9 +196,9 @@ static int snd_dt019x_input_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_ ...@@ -196,9 +196,9 @@ static int snd_dt019x_input_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
return 0; return 0;
} }
static int snd_dt019x_input_sw_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) static int snd_dt019x_input_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
sb_t *sb = snd_kcontrol_chip(kcontrol); struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
unsigned long flags; unsigned long flags;
unsigned char oval; unsigned char oval;
...@@ -232,9 +232,9 @@ static int snd_dt019x_input_sw_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value ...@@ -232,9 +232,9 @@ static int snd_dt019x_input_sw_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
return 0; return 0;
} }
static int snd_dt019x_input_sw_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) static int snd_dt019x_input_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
sb_t *sb = snd_kcontrol_chip(kcontrol); struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
unsigned long flags; unsigned long flags;
int change; int change;
unsigned char nval, oval; unsigned char nval, oval;
...@@ -273,7 +273,7 @@ static int snd_dt019x_input_sw_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value ...@@ -273,7 +273,7 @@ static int snd_dt019x_input_sw_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
* SBPRO input multiplexer * SBPRO input multiplexer
*/ */
static int snd_sb8mixer_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) static int snd_sb8mixer_info_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ {
static char *texts[3] = { static char *texts[3] = {
"Mic", "CD", "Line" "Mic", "CD", "Line"
...@@ -289,9 +289,9 @@ static int snd_sb8mixer_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * ...@@ -289,9 +289,9 @@ static int snd_sb8mixer_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
} }
static int snd_sb8mixer_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) static int snd_sb8mixer_get_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
sb_t *sb = snd_kcontrol_chip(kcontrol); struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
unsigned long flags; unsigned long flags;
unsigned char oval; unsigned char oval;
...@@ -312,9 +312,9 @@ static int snd_sb8mixer_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t ...@@ -312,9 +312,9 @@ static int snd_sb8mixer_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
return 0; return 0;
} }
static int snd_sb8mixer_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) static int snd_sb8mixer_put_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
sb_t *sb = snd_kcontrol_chip(kcontrol); struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
unsigned long flags; unsigned long flags;
int change; int change;
unsigned char nval, oval; unsigned char nval, oval;
...@@ -346,7 +346,7 @@ static int snd_sb8mixer_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t ...@@ -346,7 +346,7 @@ static int snd_sb8mixer_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
* SB16 input switch * SB16 input switch
*/ */
static int snd_sb16mixer_info_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) static int snd_sb16mixer_info_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ {
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 4; uinfo->count = 4;
...@@ -355,9 +355,9 @@ static int snd_sb16mixer_info_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_i ...@@ -355,9 +355,9 @@ static int snd_sb16mixer_info_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_i
return 0; return 0;
} }
static int snd_sb16mixer_get_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) static int snd_sb16mixer_get_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
sb_t *sb = snd_kcontrol_chip(kcontrol); struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
unsigned long flags; unsigned long flags;
int reg1 = kcontrol->private_value & 0xff; int reg1 = kcontrol->private_value & 0xff;
int reg2 = (kcontrol->private_value >> 8) & 0xff; int reg2 = (kcontrol->private_value >> 8) & 0xff;
...@@ -376,9 +376,9 @@ static int snd_sb16mixer_get_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_va ...@@ -376,9 +376,9 @@ static int snd_sb16mixer_get_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
return 0; return 0;
} }
static int snd_sb16mixer_put_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) static int snd_sb16mixer_put_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
sb_t *sb = snd_kcontrol_chip(kcontrol); struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
unsigned long flags; unsigned long flags;
int reg1 = kcontrol->private_value & 0xff; int reg1 = kcontrol->private_value & 0xff;
int reg2 = (kcontrol->private_value >> 8) & 0xff; int reg2 = (kcontrol->private_value >> 8) & 0xff;
...@@ -410,9 +410,9 @@ static int snd_sb16mixer_put_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_va ...@@ -410,9 +410,9 @@ static int snd_sb16mixer_put_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
*/ */
/* /*
*/ */
int snd_sbmixer_add_ctl(sb_t *chip, const char *name, int index, int type, unsigned long value) int snd_sbmixer_add_ctl(struct snd_sb *chip, const char *name, int index, int type, unsigned long value)
{ {
static snd_kcontrol_new_t newctls[] = { static struct snd_kcontrol_new newctls[] = {
[SB_MIX_SINGLE] = { [SB_MIX_SINGLE] = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.info = snd_sbmixer_info_single, .info = snd_sbmixer_info_single,
...@@ -444,7 +444,7 @@ int snd_sbmixer_add_ctl(sb_t *chip, const char *name, int index, int type, unsig ...@@ -444,7 +444,7 @@ int snd_sbmixer_add_ctl(sb_t *chip, const char *name, int index, int type, unsig
.put = snd_dt019x_input_sw_put, .put = snd_dt019x_input_sw_put,
}, },
}; };
snd_kcontrol_t *ctl; struct snd_kcontrol *ctl;
int err; int err;
ctl = snd_ctl_new1(&newctls[type], chip); ctl = snd_ctl_new1(&newctls[type], chip);
...@@ -758,7 +758,7 @@ static unsigned char snd_als4000_init_values[][2] = { ...@@ -758,7 +758,7 @@ static unsigned char snd_als4000_init_values[][2] = {
/* /*
*/ */
static int snd_sbmixer_init(sb_t *chip, static int snd_sbmixer_init(struct snd_sb *chip,
struct sbmix_elem **controls, struct sbmix_elem **controls,
int controls_count, int controls_count,
unsigned char map[][2], unsigned char map[][2],
...@@ -766,7 +766,7 @@ static int snd_sbmixer_init(sb_t *chip, ...@@ -766,7 +766,7 @@ static int snd_sbmixer_init(sb_t *chip,
char *name) char *name)
{ {
unsigned long flags; unsigned long flags;
snd_card_t *card = chip->card; struct snd_card *card = chip->card;
int idx, err; int idx, err;
/* mixer reset */ /* mixer reset */
...@@ -790,9 +790,9 @@ static int snd_sbmixer_init(sb_t *chip, ...@@ -790,9 +790,9 @@ static int snd_sbmixer_init(sb_t *chip,
return 0; return 0;
} }
int snd_sbmixer_new(sb_t *chip) int snd_sbmixer_new(struct snd_sb *chip)
{ {
snd_card_t * card; struct snd_card *card;
int err; int err;
snd_assert(chip != NULL && chip->card != NULL, return -EINVAL); snd_assert(chip != NULL && chip->card != NULL, return -EINVAL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment