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 {
* some of the channels may be used for other things so max_channels is
* 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 seq_ports; /* number of sequencer ports */
......@@ -77,44 +77,45 @@ typedef struct snd_emu8000 {
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 reverb_mode;
int bass_level;
int treble_level;
snd_util_memhdr_t *memhdr;
struct snd_util_memhdr *memhdr;
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 */
#define SNDRV_SEQ_DEV_ID_EMU8000 "emu8000-synth"
/* exported functions */
int snd_emu8000_new(snd_card_t *card, int device, long port, int seq_ports, snd_seq_device_t **ret);
void snd_emu8000_poke(emu8000_t *emu, unsigned int port, unsigned int reg,
int snd_emu8000_new(struct snd_card *card, int device, long port, int seq_ports,
struct snd_seq_device **ret);
void snd_emu8000_poke(struct snd_emu8000 *emu, unsigned int port, unsigned int reg,
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);
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 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);
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_reverb_mode(emu8000_t *emu);
void snd_emu8000_update_equalizer(emu8000_t *emu);
int snd_emu8000_load_chorus_fx(emu8000_t *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);
void snd_emu8000_update_chorus_mode(struct snd_emu8000 *emu);
void snd_emu8000_update_reverb_mode(struct snd_emu8000 *emu);
void snd_emu8000_update_equalizer(struct snd_emu8000 *emu);
int snd_emu8000_load_chorus_fx(struct snd_emu8000 *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 */
......@@ -60,7 +60,7 @@ enum sb_hw_type {
#define SB_MPU_INPUT 1
struct _snd_sb {
struct snd_sb {
unsigned long port; /* base port of DSP chip */
struct resource *res_port;
unsigned long mpu_port; /* MPU port for SB DSP 4.0+ */
......@@ -92,25 +92,23 @@ struct _snd_sb {
void *csp; /* used only when CONFIG_SND_SB16_CSP is set */
snd_card_t *card;
snd_pcm_t *pcm;
snd_pcm_substream_t *playback_substream;
snd_pcm_substream_t *capture_substream;
struct snd_card *card;
struct snd_pcm *pcm;
struct snd_pcm_substream *playback_substream;
struct snd_pcm_substream *capture_substream;
snd_rawmidi_t *rmidi;
snd_rawmidi_substream_t *midi_substream_input;
snd_rawmidi_substream_t *midi_substream_output;
struct snd_rawmidi *rmidi;
struct snd_rawmidi_substream *midi_substream_input;
struct snd_rawmidi_substream *midi_substream_output;
irqreturn_t (*rmidi_callback)(int irq, void *dev_id, struct pt_regs *regs);
spinlock_t reg_lock;
spinlock_t open_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 */
#define SBP(chip, x) ((chip)->port + s_b_SB_##x)
......@@ -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));
}
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));
}
/* sb_common.c */
int snd_sbdsp_command(sb_t *chip, unsigned char val);
int snd_sbdsp_get_byte(sb_t *chip);
int snd_sbdsp_reset(sb_t *chip);
int snd_sbdsp_create(snd_card_t *card,
int snd_sbdsp_command(struct snd_sb *chip, unsigned char val);
int snd_sbdsp_get_byte(struct snd_sb *chip);
int snd_sbdsp_reset(struct snd_sb *chip);
int snd_sbdsp_create(struct snd_card *card,
unsigned long port,
int irq,
irqreturn_t (*irq_handler)(int, void *, struct pt_regs *),
int dma8, int dma16,
unsigned short hardware,
sb_t **r_chip);
struct snd_sb **r_chip);
/* sb_mixer.c */
void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data);
unsigned char snd_sbmixer_read(sb_t *chip, unsigned char reg);
int snd_sbmixer_new(sb_t *chip);
void snd_sbmixer_write(struct snd_sb *chip, unsigned char reg, unsigned char data);
unsigned char snd_sbmixer_read(struct snd_sb *chip, unsigned char reg);
int snd_sbmixer_new(struct snd_sb *chip);
/* 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 */
irqreturn_t snd_sb8dsp_interrupt(sb_t *chip);
int snd_sb8_playback_open(snd_pcm_substream_t *substream);
int snd_sb8_capture_open(snd_pcm_substream_t *substream);
int snd_sb8_playback_close(snd_pcm_substream_t *substream);
int snd_sb8_capture_close(snd_pcm_substream_t *substream);
irqreturn_t snd_sb8dsp_interrupt(struct snd_sb *chip);
int snd_sb8_playback_open(struct snd_pcm_substream *substream);
int snd_sb8_capture_open(struct snd_pcm_substream *substream);
int snd_sb8_playback_close(struct snd_pcm_substream *substream);
int snd_sb8_capture_close(struct snd_pcm_substream *substream);
/* midi8.c */
irqreturn_t snd_sb8dsp_midi_interrupt(sb_t *chip);
int snd_sb8dsp_midi(sb_t *chip, int device, snd_rawmidi_t ** rrawmidi);
irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb *chip);
int snd_sb8dsp_midi(struct snd_sb *chip, int device, struct snd_rawmidi ** rrawmidi);
/* sb16_init.c */
int snd_sb16dsp_pcm(sb_t *chip, int device, snd_pcm_t ** rpcm);
const snd_pcm_ops_t *snd_sb16dsp_get_pcm_ops(int direction);
int snd_sb16dsp_configure(sb_t *chip);
int snd_sb16dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm);
const struct snd_pcm_ops *snd_sb16dsp_get_pcm_ops(int direction);
int snd_sb16dsp_configure(struct snd_sb *chip);
/* sb16.c */
irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs);
......@@ -328,7 +326,7 @@ enum {
#define SB_MIXVAL_INPUT_SW(reg1, reg2, left_shift, right_shift) \
((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 */
struct sbmix_elem {
......@@ -352,7 +350,7 @@ struct sbmix_elem {
.type = SB_MIX_INPUT_SW, \
.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);
}
......
......@@ -63,25 +63,25 @@
#define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE 0x3000
/* microcode header */
typedef struct snd_sb_csp_mc_header {
struct snd_sb_csp_mc_header {
char codec_name[16]; /* id name of codec */
unsigned short func_req; /* requested function */
} snd_sb_csp_mc_header_t;
};
/* microcode to be loaded */
typedef struct snd_sb_csp_microcode {
snd_sb_csp_mc_header_t info;
struct snd_sb_csp_microcode {
struct snd_sb_csp_mc_header info;
unsigned char data[SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE];
} snd_sb_csp_microcode_t;
};
/* 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 channels; /* channels, look above */
} snd_sb_csp_start_t;
};
/* CSP information */
typedef struct snd_sb_csp_info {
struct snd_sb_csp_info {
char codec_name[16]; /* id name of codec */
unsigned short func_nr; /* function number */
unsigned int acc_format; /* accepted PCM formats */
......@@ -93,17 +93,17 @@ typedef struct snd_sb_csp_info {
unsigned short run_width; /* current sample width */
unsigned short version; /* version id: 0x10 - 0x1f */
unsigned short state; /* state bits */
} snd_sb_csp_info_t;
};
/* HWDEP controls */
/* 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 */
#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 */
#define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12)
/* 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 */
#define SNDRV_SB_CSP_IOCTL_STOP _IO('H', 0x14)
/* pause CSP and DMA transfer */
......@@ -115,25 +115,25 @@ typedef struct snd_sb_csp_info {
#include "sb.h"
#include "hwdep.h"
typedef struct snd_sb_csp snd_sb_csp_t;
struct snd_sb_csp;
/*
* CSP operators
*/
typedef struct {
int (*csp_use) (snd_sb_csp_t * p);
int (*csp_unuse) (snd_sb_csp_t * p);
int (*csp_autoload) (snd_sb_csp_t * p, int pcm_sfmt, int play_rec_mode);
int (*csp_start) (snd_sb_csp_t * p, int sample_width, int channels);
int (*csp_stop) (snd_sb_csp_t * p);
int (*csp_qsound_transfer) (snd_sb_csp_t * p);
} snd_sb_csp_ops_t;
struct snd_sb_csp_ops {
int (*csp_use) (struct snd_sb_csp * p);
int (*csp_unuse) (struct snd_sb_csp * p);
int (*csp_autoload) (struct snd_sb_csp * p, int pcm_sfmt, int play_rec_mode);
int (*csp_start) (struct snd_sb_csp * p, int sample_width, int channels);
int (*csp_stop) (struct snd_sb_csp * p);
int (*csp_qsound_transfer) (struct snd_sb_csp * p);
};
/*
* CSP private data
*/
struct snd_sb_csp {
sb_t *chip; /* SB16 DSP */
struct snd_sb *chip; /* SB16 DSP */
int used; /* usage flag - exclusive */
char codec_name[16]; /* name of codec */
unsigned short func_nr; /* function number */
......@@ -147,7 +147,7 @@ struct snd_sb_csp {
int version; /* CSP version (0x10 - 0x1f) */
int running; /* running state */
snd_sb_csp_ops_t ops; /* operators */
struct snd_sb_csp_ops ops; /* operators */
spinlock_t q_lock; /* locking */
int q_enabled; /* enabled flag */
......@@ -155,13 +155,13 @@ struct snd_sb_csp {
int qpos_right; /* right position */
int qpos_changed; /* position changed flag */
snd_kcontrol_t *qsound_switch;
snd_kcontrol_t *qsound_space;
struct snd_kcontrol *qsound_switch;
struct snd_kcontrol *qsound_space;
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 /* __SOUND_SB16_CSP */
This diff is collapsed.
......@@ -25,27 +25,30 @@
/*
* prototypes
*/
static snd_emux_voice_t *get_voice(snd_emux_t *emu, snd_emux_port_t *port);
static int start_voice(snd_emux_voice_t *vp);
static void trigger_voice(snd_emux_voice_t *vp);
static void release_voice(snd_emux_voice_t *vp);
static void update_voice(snd_emux_voice_t *vp, int update);
static void reset_voice(snd_emux_t *emu, int ch);
static void terminate_voice(snd_emux_voice_t *vp);
static void sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *chset);
static struct snd_emux_voice *get_voice(struct snd_emux *emu,
struct snd_emux_port *port);
static int start_voice(struct snd_emux_voice *vp);
static void trigger_voice(struct snd_emux_voice *vp);
static void release_voice(struct snd_emux_voice *vp);
static void update_voice(struct snd_emux_voice *vp, int update);
static void reset_voice(struct snd_emux *emu, int ch);
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
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
static int load_fx(snd_emux_t *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_pan(emu8000_t *hw, snd_emux_voice_t *vp);
static void set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp);
static void set_tremfreq(emu8000_t *hw, snd_emux_voice_t *vp);
static void set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp);
static void set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp);
static void snd_emu8000_tweak_voice(emu8000_t *emu, int ch);
static int load_fx(struct snd_emux *emu, int type, int mode,
const void __user *buf, long len);
static void set_pitch(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
static void set_volume(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
static void set_pan(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
static void set_fmmod(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
static void set_tremfreq(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
static void set_fm2frq2(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
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
......@@ -58,7 +61,7 @@ static void snd_emu8000_tweak_voice(emu8000_t *emu, int ch);
/*
* set up operators
*/
static snd_emux_operators_t emu8000_ops = {
static struct snd_emux_operators emu8000_ops = {
.owner = THIS_MODULE,
.get_voice = get_voice,
.prepare = start_voice,
......@@ -78,7 +81,7 @@ static snd_emux_operators_t emu8000_ops = {
};
void
snd_emu8000_ops_setup(emu8000_t *hw)
snd_emu8000_ops_setup(struct snd_emu8000 *hw)
{
hw->emu->ops = emu8000_ops;
}
......@@ -89,10 +92,10 @@ snd_emu8000_ops_setup(emu8000_t *hw)
* Terminate a voice
*/
static void
release_voice(snd_emux_voice_t *vp)
release_voice(struct snd_emux_voice *vp)
{
int dcysusv;
emu8000_t *hw;
struct snd_emu8000 *hw;
hw = vp->hw;
dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease;
......@@ -105,9 +108,9 @@ release_voice(snd_emux_voice_t *vp)
/*
*/
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;
EMU8000_DCYSUSV_WRITE(hw, vp->ch, 0x807F);
......@@ -117,9 +120,9 @@ terminate_voice(snd_emux_voice_t *vp)
/*
*/
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;
if (update & SNDRV_EMUX_UPDATE_VOLUME)
......@@ -149,12 +152,12 @@ update_voice(snd_emux_voice_t *vp, int update)
* The channel index (vp->ch) must be initialized in this routine.
* In Emu8k, it is identical with the array index.
*/
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, struct snd_emux_port *port)
{
int i;
snd_emux_voice_t *vp;
emu8000_t *hw;
struct snd_emux_voice *vp;
struct snd_emu8000 *hw;
/* what we are looking for, in order of preference */
enum {
......@@ -227,13 +230,13 @@ get_voice(snd_emux_t *emu, snd_emux_port_t *port)
/*
*/
static int
start_voice(snd_emux_voice_t *vp)
start_voice(struct snd_emux_voice *vp)
{
unsigned int temp;
int ch;
int addr;
snd_midi_channel_t *chan;
emu8000_t *hw;
struct snd_midi_channel *chan;
struct snd_emu8000 *hw;
hw = vp->hw;
ch = vp->ch;
......@@ -307,11 +310,11 @@ start_voice(snd_emux_voice_t *vp)
* Start envelope
*/
static void
trigger_voice(snd_emux_voice_t *vp)
trigger_voice(struct snd_emux_voice *vp)
{
int ch = vp->ch;
unsigned int temp;
emu8000_t *hw;
struct snd_emu8000 *hw;
hw = vp->hw;
......@@ -329,9 +332,9 @@ trigger_voice(snd_emux_voice_t *vp)
* reset voice parameters
*/
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;
EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F);
......@@ -342,7 +345,7 @@ reset_voice(snd_emux_t *emu, int ch)
* Set the pitch of a possibly playing note.
*/
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);
}
......@@ -351,7 +354,7 @@ set_pitch(emu8000_t *hw, snd_emux_voice_t *vp)
* Set the volume of a possibly already playing note
*/
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;
......@@ -365,7 +368,7 @@ set_volume(emu8000_t *hw, snd_emux_voice_t *vp)
* Set pan and loop start address.
*/
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;
......@@ -376,7 +379,7 @@ set_pan(emu8000_t *hw, snd_emux_voice_t *vp)
#define MOD_SENSE 18
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;
short pitch;
......@@ -394,14 +397,14 @@ set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp)
/* set tremolo (lfo1) volume & frequency */
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);
}
/* set lfo2 pitch & frequency */
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;
short pitch;
......@@ -419,7 +422,7 @@ set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp)
/* set filterQ */
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;
addr = EMU8000_CCCA_READ(hw, vp->ch) & 0xffffff;
......@@ -431,7 +434,7 @@ set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp)
* set the envelope & LFO parameters to the default values
*/
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 */
EMU8000_ENVVOL_WRITE(emu, i, 0x8000);
......@@ -453,9 +456,9 @@ snd_emu8000_tweak_voice(emu8000_t *emu, int i)
* sysex callback
*/
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;
......@@ -478,9 +481,9 @@ sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *c
* OSS ioctl callback
*/
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;
......@@ -523,9 +526,9 @@ oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2)
*/
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;
/* skip header */
......
......@@ -30,14 +30,17 @@
#include <sound/emu8000_reg.h>
/* 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_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr);
void snd_emu8000_sample_reset(snd_emux_t *rec);
int snd_emu8000_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,
struct snd_util_memhdr *hdr,
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 */
void snd_emu8000_ops_setup(emu8000_t *emu);
void snd_emu8000_ops_setup(struct snd_emu8000 *emu);
/* 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 */
......@@ -32,7 +32,7 @@ MODULE_PARM_DESC(emu8000_reset_addr, "reset write address at each time (makes sl
* Open up channels.
*/
static int
snd_emu8000_open_dma(emu8000_t *emu, int write)
snd_emu8000_open_dma(struct snd_emu8000 *emu, int write)
{
int i;
......@@ -59,7 +59,7 @@ snd_emu8000_open_dma(emu8000_t *emu, int write)
* Close all dram channels.
*/
static void
snd_emu8000_close_dma(emu8000_t *emu)
snd_emu8000_close_dma(struct snd_emu8000 *emu)
{
int i;
......@@ -106,7 +106,7 @@ read_word(const void __user *buf, int offset, int mode)
/*
*/
static void
snd_emu8000_write_wait(emu8000_t *emu)
snd_emu8000_write_wait(struct snd_emu8000 *emu)
{
while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
schedule_timeout_interruptible(1);
......@@ -128,7 +128,7 @@ snd_emu8000_write_wait(emu8000_t *emu)
* working.
*/
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 > 1)
......@@ -144,15 +144,16 @@ write_word(emu8000_t *emu, int *offset, unsigned short data)
* the generic soundfont routines as a callback.
*/
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)
snd_emu8000_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,
struct snd_util_memhdr *hdr,
const void __user *data, long count)
{
int i;
int rc;
int offset;
int truesize;
int dram_offset, dram_start;
emu8000_t *emu;
struct snd_emu8000 *emu;
emu = rec->hw;
snd_assert(sp != NULL, return -EINVAL);
......@@ -282,7 +283,8 @@ snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp,
* free a sample block
*/
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) {
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
* sample_reset callback - terminate voices
*/
void
snd_emu8000_sample_reset(snd_emux_t *rec)
snd_emu8000_sample_reset(struct snd_emux *rec)
{
snd_emux_terminate_all(rec);
}
......@@ -46,14 +46,12 @@
*/
typedef struct snd_emu8k_pcm emu8k_pcm_t;
struct snd_emu8k_pcm {
emu8000_t *emu;
snd_pcm_substream_t *substream;
struct snd_emu8000 *emu;
struct snd_pcm_substream *substream;
unsigned int allocated_bytes;
snd_util_memblk_t *block;
struct snd_util_memblk *block;
unsigned int offset;
unsigned int buf_size;
unsigned int period_size;
......@@ -77,7 +75,7 @@ struct snd_emu8k_pcm {
* open up channels for the simultaneous data transfer and playback
*/
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;
......@@ -113,7 +111,7 @@ emu8k_open_dram_for_pcm(emu8000_t *emu, int channels)
/*
*/
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) {
if (can_schedule) {
......@@ -128,7 +126,7 @@ snd_emu8000_write_wait(emu8000_t *emu, int can_schedule)
* close all channels
*/
static void
emu8k_close_dram(emu8000_t *emu)
emu8k_close_dram(struct snd_emu8000 *emu)
{
int i;
......@@ -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
.info = SNDRV_PCM_INFO_NONINTERLEAVED,
#else
......@@ -180,7 +178,7 @@ static snd_pcm_hardware_t emu8k_pcm_hw = {
/*
* 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;
val -= rec->loop_start[ch] - 1;
......@@ -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)
{
emu8k_pcm_t *rec = (emu8k_pcm_t *)data;
struct snd_emu8k_pcm *rec = (struct snd_emu8k_pcm *)data;
int ptr, delta;
spin_lock(&rec->timer_lock);
......@@ -226,11 +224,11 @@ static void emu8k_pcm_timer_func(unsigned long data)
* open pcm
* 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);
emu8k_pcm_t *rec;
snd_pcm_runtime_t *runtime = subs->runtime;
struct snd_emu8000 *emu = snd_pcm_substream_chip(subs);
struct snd_emu8k_pcm *rec;
struct snd_pcm_runtime *runtime = subs->runtime;
rec = kzalloc(sizeof(*rec), GFP_KERNEL);
if (! rec)
......@@ -256,9 +254,9 @@ static int emu8k_pcm_open(snd_pcm_substream_t *subs)
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);
subs->runtime->private_data = NULL;
return 0;
......@@ -281,9 +279,9 @@ static int calc_pitch_target(int pitch)
/*
* 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;
/* channel to be silent and idle */
......@@ -334,10 +332,10 @@ static void setup_voice(emu8k_pcm_t *rec, int ch)
/*
* 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;
emu8000_t *hw = rec->emu;
struct snd_emu8000 *hw = rec->emu;
unsigned int temp, aux;
int pt = calc_pitch_target(rec->pitch);
......@@ -370,10 +368,10 @@ static void start_voice(emu8k_pcm_t *rec, int ch)
/*
* 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;
emu8000_t *hw = rec->emu;
struct snd_emu8000 *hw = rec->emu;
EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F);
......@@ -386,9 +384,9 @@ static void stop_voice(emu8k_pcm_t *rec, int ch)
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;
switch (cmd) {
......@@ -428,7 +426,7 @@ do { \
#ifdef USE_NONINTERLEAVE
/* 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);
while (count > 0) {
......@@ -442,14 +440,14 @@ static int emu8k_transfer_block(emu8000_t *emu, int offset, unsigned short *buf,
return 0;
}
static int emu8k_pcm_copy(snd_pcm_substream_t *subs,
static int emu8k_pcm_copy(struct snd_pcm_substream *subs,
int voice,
snd_pcm_uframes_t pos,
void *src,
snd_pcm_uframes_t count)
{
emu8k_pcm_t *rec = subs->runtime->private_data;
emu8000_t *emu = rec->emu;
struct snd_emu8k_pcm *rec = subs->runtime->private_data;
struct snd_emu8000 *emu = rec->emu;
snd_emu8000_write_wait(emu, 1);
if (voice == -1) {
......@@ -469,7 +467,7 @@ static int emu8k_pcm_copy(snd_pcm_substream_t *subs,
}
/* 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);
while (count > 0) {
......@@ -480,13 +478,13 @@ static int emu8k_silence_block(emu8000_t *emu, int offset, int count)
return 0;
}
static int emu8k_pcm_silence(snd_pcm_substream_t *subs,
static int emu8k_pcm_silence(struct snd_pcm_substream *subs,
int voice,
snd_pcm_uframes_t pos,
snd_pcm_uframes_t count)
{
emu8k_pcm_t *rec = subs->runtime->private_data;
emu8000_t *emu = rec->emu;
struct snd_emu8k_pcm *rec = subs->runtime->private_data;
struct snd_emu8000 *emu = rec->emu;
snd_emu8000_write_wait(emu, 1);
if (voice == -1 && rec->voices == 1)
......@@ -508,14 +506,14 @@ static int emu8k_pcm_silence(snd_pcm_substream_t *subs,
* copy the interleaved data can be done easily by using
* 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,
snd_pcm_uframes_t pos,
void __user *src,
snd_pcm_uframes_t count)
{
emu8k_pcm_t *rec = subs->runtime->private_data;
emu8000_t *emu = rec->emu;
struct snd_emu8k_pcm *rec = subs->runtime->private_data;
struct snd_emu8000 *emu = rec->emu;
unsigned short __user *buf = src;
snd_emu8000_write_wait(emu, 1);
......@@ -539,13 +537,13 @@ static int emu8k_pcm_copy(snd_pcm_substream_t *subs,
return 0;
}
static int emu8k_pcm_silence(snd_pcm_substream_t *subs,
static int emu8k_pcm_silence(struct snd_pcm_substream *subs,
int voice,
snd_pcm_uframes_t pos,
snd_pcm_uframes_t count)
{
emu8k_pcm_t *rec = subs->runtime->private_data;
emu8000_t *emu = rec->emu;
struct snd_emu8k_pcm *rec = subs->runtime->private_data;
struct snd_emu8000 *emu = rec->emu;
snd_emu8000_write_wait(emu, 1);
EMU8000_SMALW_WRITE(emu, rec->loop_start[0] + pos);
......@@ -567,10 +565,10 @@ static int emu8k_pcm_silence(snd_pcm_substream_t *subs,
/*
* allocate a memory block
*/
static int emu8k_pcm_hw_params(snd_pcm_substream_t *subs,
snd_pcm_hw_params_t *hw_params)
static int emu8k_pcm_hw_params(struct snd_pcm_substream *subs,
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) {
/* reallocation - release the old block */
......@@ -592,9 +590,9 @@ static int emu8k_pcm_hw_params(snd_pcm_substream_t *subs,
/*
* 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) {
int ch;
......@@ -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->last_ptr = 0;
......@@ -656,16 +654,16 @@ static int emu8k_pcm_prepare(snd_pcm_substream_t *subs)
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)
return emu8k_get_curpos(rec, 0);
return 0;
}
static snd_pcm_ops_t emu8k_pcm_ops = {
static struct snd_pcm_ops emu8k_pcm_ops = {
.open = emu8k_pcm_open,
.close = emu8k_pcm_close,
.ioctl = snd_pcm_lib_ioctl,
......@@ -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;
}
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;
if ((err = snd_pcm_new(card, "Emu8000 PCM", index, 1, 0, &pcm)) < 0)
......
......@@ -33,12 +33,12 @@ MODULE_LICENSE("GPL");
/*
* 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;
snd_emux_t *emu;
struct snd_emu8000 *hw;
struct snd_emux *emu;
hw = *(emu8000_t**)SNDRV_SEQ_DEVICE_ARGPTR(dev);
hw = *(struct snd_emu8000**)SNDRV_SEQ_DEVICE_ARGPTR(dev);
if (hw == NULL)
return -EINVAL;
......@@ -92,9 +92,9 @@ static int snd_emu8000_new_device(snd_seq_device_t *dev)
/*
* 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)
return 0; /* no synth was allocated actually */
......@@ -118,11 +118,12 @@ static int snd_emu8000_delete_device(snd_seq_device_t *dev)
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_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)
......
......@@ -72,7 +72,7 @@ MODULE_DEVICE_TABLE(pnp_card, snd_es968_pnpids);
static irqreturn_t snd_card_es968_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) {
return snd_sb8dsp_interrupt(chip);
......@@ -128,8 +128,8 @@ static int __init snd_card_es968_probe(int dev,
const struct pnp_card_device_id *pid)
{
int error;
sb_t *chip;
snd_card_t *card;
struct snd_sb *chip;
struct snd_card *card;
struct snd_card_es968 *acard;
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,
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_free_in_thread(card);
......
......@@ -138,7 +138,7 @@ struct snd_card_sb16 {
#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
......@@ -339,7 +339,7 @@ static int __devinit snd_card_sb16_pnp(int dev, struct snd_card_sb16 *acard,
#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;
......@@ -362,13 +362,13 @@ static int __init snd_sb16_probe(int dev,
static int possible_dmas8[] = {1, 3, 0, -1};
static int possible_dmas16[] = {5, 6, 7, -1};
int xirq, xdma8, xdma16;
sb_t *chip;
snd_card_t *card;
struct snd_sb *chip;
struct snd_card *card;
struct snd_card_sb16 *acard;
opl3_t *opl3;
snd_hwdep_t *synth = NULL;
struct snd_opl3 *opl3;
struct snd_hwdep *synth = NULL;
#ifdef CONFIG_SND_SB16_CSP
snd_hwdep_t *xcsp = NULL;
struct snd_hwdep *xcsp = NULL;
#endif
unsigned long flags;
int err;
......@@ -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)
{
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_free_in_thread(card);
......
This diff is collapsed.
This diff is collapsed.
......@@ -59,11 +59,11 @@ struct snd_sb8 {
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)
{
sb_t *chip = dev_id;
struct snd_sb *chip = dev_id;
if (chip->open & SB_OPEN_PCM) {
return snd_sb8dsp_interrupt(chip);
......@@ -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;
......@@ -83,10 +83,10 @@ static void snd_sb8_free(snd_card_t *card)
static int __init snd_sb8_probe(int dev)
{
sb_t *chip;
snd_card_t *card;
struct snd_sb *chip;
struct snd_card *card;
struct snd_sb8 *acard;
opl3_t *opl3;
struct snd_opl3 *opl3;
int err;
card = snd_card_new(index[dev], id[dev], THIS_MODULE,
......
......@@ -46,19 +46,19 @@ MODULE_LICENSE("GPL");
#define SB8_DEN(v) ((SB8_CLOCK + (v) / 2) / (v))
#define SB8_RATE(v) (SB8_CLOCK / SB8_DEN(v))
static ratnum_t clock = {
static struct snd_ratnum clock = {
.num = SB8_CLOCK,
.den_min = 1,
.den_max = 256,
.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,
.rats = &clock,
};
static ratnum_t stereo_clocks[] = {
static struct snd_ratnum stereo_clocks[] = {
{
.num = SB8_CLOCK,
.den_min = SB8_DEN(22050),
......@@ -73,10 +73,10 @@ static ratnum_t stereo_clocks[] = {
}
};
static int snd_sb8_hw_constraint_rate_channels(snd_pcm_hw_params_t *params,
snd_pcm_hw_rule_t *rule)
static int snd_sb8_hw_constraint_rate_channels(struct snd_pcm_hw_params *params,
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) {
unsigned int num = 0, den = 0;
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,
return 0;
}
static int snd_sb8_hw_constraint_channels_rate(snd_pcm_hw_params_t *params,
snd_pcm_hw_rule_t *rule)
static int snd_sb8_hw_constraint_channels_rate(struct snd_pcm_hw_params *params,
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)) {
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 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;
sb_t *chip = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime;
struct snd_sb *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
unsigned int mixreg, rate, size, count;
rate = runtime->rate;
......@@ -178,11 +178,11 @@ static int snd_sb8_playback_prepare(snd_pcm_substream_t * substream)
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)
{
unsigned long flags;
sb_t *chip = snd_pcm_substream_chip(substream);
struct snd_sb *chip = snd_pcm_substream_chip(substream);
unsigned int count;
spin_lock_irqsave(&chip->reg_lock, flags);
......@@ -197,7 +197,7 @@ static int snd_sb8_playback_trigger(snd_pcm_substream_t * substream,
break;
case SNDRV_PCM_TRIGGER_STOP:
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);
if (runtime->channels > 1) {
spin_lock(&chip->mixer_lock);
......@@ -215,23 +215,23 @@ static int snd_sb8_playback_trigger(snd_pcm_substream_t * substream,
return 0;
}
static int snd_sb8_hw_params(snd_pcm_substream_t * substream,
snd_pcm_hw_params_t * hw_params)
static int snd_sb8_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *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);
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;
sb_t *chip = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime;
struct snd_sb *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
unsigned int mixreg, rate, size, count;
rate = runtime->rate;
......@@ -290,11 +290,11 @@ static int snd_sb8_capture_prepare(snd_pcm_substream_t * substream)
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)
{
unsigned long flags;
sb_t *chip = snd_pcm_substream_chip(substream);
struct snd_sb *chip = snd_pcm_substream_chip(substream);
unsigned int count;
spin_lock_irqsave(&chip->reg_lock, flags);
......@@ -309,7 +309,7 @@ static int snd_sb8_capture_trigger(snd_pcm_substream_t * substream,
break;
case SNDRV_PCM_TRIGGER_STOP:
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);
if (runtime->channels > 1) {
/* restore input filter status */
......@@ -329,10 +329,10 @@ static int snd_sb8_capture_trigger(snd_pcm_substream_t * substream,
return 0;
}
irqreturn_t snd_sb8dsp_interrupt(sb_t *chip)
irqreturn_t snd_sb8dsp_interrupt(struct snd_sb *chip)
{
snd_pcm_substream_t *substream;
snd_pcm_runtime_t *runtime;
struct snd_pcm_substream *substream;
struct snd_pcm_runtime *runtime;
snd_sb_ack_8bit(chip);
switch (chip->mode) {
......@@ -354,9 +354,9 @@ irqreturn_t snd_sb8dsp_interrupt(sb_t *chip)
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;
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
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;
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
*/
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 |
SNDRV_PCM_INFO_MMAP_VALID),
......@@ -399,7 +399,7 @@ static snd_pcm_hardware_t snd_sb8_playback =
.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 |
SNDRV_PCM_INFO_MMAP_VALID),
......@@ -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);
snd_pcm_runtime_t *runtime = substream->runtime;
struct snd_sb *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
unsigned long flags;
spin_lock_irqsave(&chip->open_lock, flags);
......@@ -468,10 +468,10 @@ static int snd_sb8_open(snd_pcm_substream_t *substream)
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;
sb_t *chip = snd_pcm_substream_chip(substream);
struct snd_sb *chip = snd_pcm_substream_chip(substream);
chip->playback_substream = NULL;
chip->capture_substream = NULL;
......@@ -485,7 +485,7 @@ static int snd_sb8_close(snd_pcm_substream_t *substream)
* Initialization part
*/
static snd_pcm_ops_t snd_sb8_playback_ops = {
static struct snd_pcm_ops snd_sb8_playback_ops = {
.open = snd_sb8_open,
.close = snd_sb8_close,
.ioctl = snd_pcm_lib_ioctl,
......@@ -496,7 +496,7 @@ static snd_pcm_ops_t snd_sb8_playback_ops = {
.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,
.close = snd_sb8_close,
.ioctl = snd_pcm_lib_ioctl,
......@@ -507,10 +507,10 @@ static snd_pcm_ops_t snd_sb8_capture_ops = {
.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;
snd_pcm_t *pcm;
struct snd_card *card = chip->card;
struct snd_pcm *pcm;
int err;
if (rpcm)
......
......@@ -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;
char byte;
......@@ -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;
sb_t *chip;
struct snd_sb *chip;
unsigned int valid_open_flags;
chip = substream->rmidi->private_data;
......@@ -90,10 +90,10 @@ static int snd_sb8dsp_midi_input_open(snd_rawmidi_substream_t * substream)
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;
sb_t *chip;
struct snd_sb *chip;
unsigned int valid_open_flags;
chip = substream->rmidi->private_data;
......@@ -117,10 +117,10 @@ static int snd_sb8dsp_midi_output_open(snd_rawmidi_substream_t * substream)
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;
sb_t *chip;
struct snd_sb *chip;
chip = substream->rmidi->private_data;
spin_lock_irqsave(&chip->open_lock, flags);
......@@ -135,10 +135,10 @@ static int snd_sb8dsp_midi_input_close(snd_rawmidi_substream_t * substream)
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;
sb_t *chip;
struct snd_sb *chip;
chip = substream->rmidi->private_data;
spin_lock_irqsave(&chip->open_lock, flags);
......@@ -153,10 +153,10 @@ static int snd_sb8dsp_midi_output_close(snd_rawmidi_substream_t * substream)
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;
sb_t *chip;
struct snd_sb *chip;
chip = substream->rmidi->private_data;
spin_lock_irqsave(&chip->open_lock, flags);
......@@ -176,10 +176,10 @@ static void snd_sb8dsp_midi_input_trigger(snd_rawmidi_substream_t * substream, i
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;
sb_t *chip;
struct snd_sb *chip;
char byte;
int max = 32;
......@@ -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)
{
snd_rawmidi_substream_t * substream = (snd_rawmidi_substream_t *) data;
sb_t * chip = substream->rmidi->private_data;
struct snd_rawmidi_substream *substream = (struct snd_rawmidi_substream *) data;
struct snd_sb * chip = substream->rmidi->private_data;
unsigned long flags;
spin_lock_irqsave(&chip->open_lock, flags);
......@@ -225,10 +225,10 @@ static void snd_sb8dsp_midi_output_timer(unsigned long data)
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;
sb_t *chip;
struct snd_sb *chip;
chip = substream->rmidi->private_data;
spin_lock_irqsave(&chip->open_lock, flags);
......@@ -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,
.close = snd_sb8dsp_midi_output_close,
.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,
.close = snd_sb8dsp_midi_input_close,
.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;
if (rrawmidi)
......
......@@ -41,7 +41,7 @@ MODULE_LICENSE("GPL");
#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;
#ifdef IO_DEBUG
......@@ -56,7 +56,7 @@ int snd_sbdsp_command(sb_t *chip, unsigned char val)
return 0;
}
int snd_sbdsp_get_byte(sb_t *chip)
int snd_sbdsp_get_byte(struct snd_sb *chip)
{
int val;
int i;
......@@ -73,7 +73,7 @@ int snd_sbdsp_get_byte(sb_t *chip)
return -ENODEV;
}
int snd_sbdsp_reset(sb_t *chip)
int snd_sbdsp_reset(struct snd_sb *chip)
{
int i;
......@@ -92,7 +92,7 @@ int snd_sbdsp_reset(sb_t *chip)
return -ENODEV;
}
static int snd_sbdsp_version(sb_t * chip)
static int snd_sbdsp_version(struct snd_sb * chip)
{
unsigned int result = -ENODEV;
......@@ -102,7 +102,7 @@ static int snd_sbdsp_version(sb_t * chip)
return result;
}
static int snd_sbdsp_probe(sb_t * chip)
static int snd_sbdsp_probe(struct snd_sb * chip)
{
int version;
int major, minor;
......@@ -176,7 +176,7 @@ static int snd_sbdsp_probe(sb_t * chip)
return 0;
}
static int snd_sbdsp_free(sb_t *chip)
static int snd_sbdsp_free(struct snd_sb *chip)
{
if (chip->res_port)
release_and_free_resource(chip->res_port);
......@@ -196,24 +196,24 @@ static int snd_sbdsp_free(sb_t *chip)
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);
}
int snd_sbdsp_create(snd_card_t *card,
int snd_sbdsp_create(struct snd_card *card,
unsigned long port,
int irq,
irqreturn_t (*irq_handler)(int, void *, struct pt_regs *),
int dma8,
int dma16,
unsigned short hardware,
sb_t **r_chip)
struct snd_sb **r_chip)
{
sb_t *chip;
struct snd_sb *chip;
int err;
static snd_device_ops_t ops = {
static struct snd_device_ops ops = {
.dev_free = snd_sbdsp_dev_free,
};
......
......@@ -29,7 +29,7 @@
#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));
udelay(10);
......@@ -40,7 +40,7 @@ void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data)
#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;
......@@ -58,7 +58,7 @@ unsigned char snd_sbmixer_read(sb_t *chip, unsigned char reg)
* 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;
......@@ -69,9 +69,9 @@ static int snd_sbmixer_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
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;
int reg = kcontrol->private_value & 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_
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;
int reg = kcontrol->private_value & 0xff;
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_
* 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;
......@@ -121,9 +121,9 @@ static int snd_sbmixer_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
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;
int left_reg = kcontrol->private_value & 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_
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;
int left_reg = kcontrol->private_value & 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_
* 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] = {
"CD", "Mic", "Line", "Synth", "Master"
......@@ -196,9 +196,9 @@ static int snd_dt019x_input_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
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 char oval;
......@@ -232,9 +232,9 @@ static int snd_dt019x_input_sw_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
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;
int change;
unsigned char nval, oval;
......@@ -273,7 +273,7 @@ static int snd_dt019x_input_sw_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
* 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] = {
"Mic", "CD", "Line"
......@@ -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 char oval;
......@@ -312,9 +312,9 @@ static int snd_sb8mixer_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
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;
int change;
unsigned char nval, oval;
......@@ -346,7 +346,7 @@ static int snd_sb8mixer_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
* 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->count = 4;
......@@ -355,9 +355,9 @@ static int snd_sb16mixer_info_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_i
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;
int reg1 = kcontrol->private_value & 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
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;
int reg1 = kcontrol->private_value & 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
*/
/*
*/
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] = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.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
.put = snd_dt019x_input_sw_put,
},
};
snd_kcontrol_t *ctl;
struct snd_kcontrol *ctl;
int err;
ctl = snd_ctl_new1(&newctls[type], chip);
......@@ -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,
int controls_count,
unsigned char map[][2],
......@@ -766,7 +766,7 @@ static int snd_sbmixer_init(sb_t *chip,
char *name)
{
unsigned long flags;
snd_card_t *card = chip->card;
struct snd_card *card = chip->card;
int idx, err;
/* mixer reset */
......@@ -790,9 +790,9 @@ static int snd_sbmixer_init(sb_t *chip,
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;
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