[ALSA] Remove xxx_t typedefs: PCI Trident

Modules: Trident driver

Remove xxx_t typedefs from the PCI Trident driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai
2005-11-17 14:53:15 +01:00
committed by Jaroslav Kysela
parent abfd67bd6f
commit bee1a5be8b
5 changed files with 588 additions and 518 deletions

View File

@@ -76,8 +76,8 @@ static int __devinit snd_trident_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
static int dev;
snd_card_t *card;
trident_t *trident;
struct snd_card *card;
struct snd_trident *trident;
const char *str;
int err, pcm_dev = 0;

File diff suppressed because it is too large Load Diff

View File

@@ -68,13 +68,14 @@
#define page_to_addr(trident,page) __tlb_to_addr(trident, (page) << 1)
/* fill TLB entries -- we need to fill two entries */
static inline void set_tlb_bus(trident_t *trident, int page, unsigned long ptr, dma_addr_t addr)
static inline void set_tlb_bus(struct snd_trident *trident, int page,
unsigned long ptr, dma_addr_t addr)
{
page <<= 1;
__set_tlb_bus(trident, page, ptr, addr);
__set_tlb_bus(trident, page+1, ptr + SNDRV_TRIDENT_PAGE_SIZE, addr + SNDRV_TRIDENT_PAGE_SIZE);
}
static inline void set_silent_tlb(trident_t *trident, int page)
static inline void set_silent_tlb(struct snd_trident *trident, int page)
{
page <<= 1;
__set_tlb_bus(trident, page, (unsigned long)trident->tlb.silent_page.area, trident->tlb.silent_page.addr);
@@ -97,7 +98,8 @@ static inline void set_silent_tlb(trident_t *trident, int page)
#define page_to_addr(trident,page) __tlb_to_addr(trident, (page) * UNIT_PAGES)
/* fill TLB entries -- UNIT_PAGES entries must be filled */
static inline void set_tlb_bus(trident_t *trident, int page, unsigned long ptr, dma_addr_t addr)
static inline void set_tlb_bus(struct snd_trident *trident, int page,
unsigned long ptr, dma_addr_t addr)
{
int i;
page *= UNIT_PAGES;
@@ -107,7 +109,7 @@ static inline void set_tlb_bus(trident_t *trident, int page, unsigned long ptr,
addr += SNDRV_TRIDENT_PAGE_SIZE;
}
}
static inline void set_silent_tlb(trident_t *trident, int page)
static inline void set_silent_tlb(struct snd_trident *trident, int page)
{
int i;
page *= UNIT_PAGES;
@@ -118,7 +120,7 @@ static inline void set_silent_tlb(trident_t *trident, int page)
#endif /* PAGE_SIZE */
/* calculate buffer pointer from offset address */
static inline void *offset_ptr(trident_t *trident, int offset)
static inline void *offset_ptr(struct snd_trident *trident, int offset)
{
char *ptr;
ptr = page_to_ptr(trident, get_aligned_page(offset));
@@ -127,16 +129,16 @@ static inline void *offset_ptr(trident_t *trident, int offset)
}
/* first and last (aligned) pages of memory block */
#define firstpg(blk) (((snd_trident_memblk_arg_t*)snd_util_memblk_argptr(blk))->first_page)
#define lastpg(blk) (((snd_trident_memblk_arg_t*)snd_util_memblk_argptr(blk))->last_page)
#define firstpg(blk) (((struct snd_trident_memblk_arg *)snd_util_memblk_argptr(blk))->first_page)
#define lastpg(blk) (((struct snd_trident_memblk_arg *)snd_util_memblk_argptr(blk))->last_page)
/*
* search empty pages which may contain given size
*/
static snd_util_memblk_t *
search_empty(snd_util_memhdr_t *hdr, int size)
static struct snd_util_memblk *
search_empty(struct snd_util_memhdr *hdr, int size)
{
snd_util_memblk_t *blk, *prev;
struct snd_util_memblk *blk, *prev;
int page, psize;
struct list_head *p;
@@ -144,7 +146,7 @@ search_empty(snd_util_memhdr_t *hdr, int size)
prev = NULL;
page = 0;
list_for_each(p, &hdr->block) {
blk = list_entry(p, snd_util_memblk_t, list);
blk = list_entry(p, struct snd_util_memblk, list);
if (page + psize <= firstpg(blk))
goto __found_pages;
page = lastpg(blk) + 1;
@@ -183,12 +185,13 @@ static int is_valid_page(unsigned long ptr)
/*
* page allocation for DMA (Scatter-Gather version)
*/
static snd_util_memblk_t *
snd_trident_alloc_sg_pages(trident_t *trident, snd_pcm_substream_t *substream)
static struct snd_util_memblk *
snd_trident_alloc_sg_pages(struct snd_trident *trident,
struct snd_pcm_substream *substream)
{
snd_util_memhdr_t *hdr;
snd_util_memblk_t *blk;
snd_pcm_runtime_t *runtime = substream->runtime;
struct snd_util_memhdr *hdr;
struct snd_util_memblk *blk;
struct snd_pcm_runtime *runtime = substream->runtime;
int idx, page;
struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream);
@@ -230,13 +233,14 @@ snd_trident_alloc_sg_pages(trident_t *trident, snd_pcm_substream_t *substream)
/*
* page allocation for DMA (contiguous version)
*/
static snd_util_memblk_t *
snd_trident_alloc_cont_pages(trident_t *trident, snd_pcm_substream_t *substream)
static struct snd_util_memblk *
snd_trident_alloc_cont_pages(struct snd_trident *trident,
struct snd_pcm_substream *substream)
{
snd_util_memhdr_t *hdr;
snd_util_memblk_t *blk;
struct snd_util_memhdr *hdr;
struct snd_util_memblk *blk;
int page;
snd_pcm_runtime_t *runtime = substream->runtime;
struct snd_pcm_runtime *runtime = substream->runtime;
dma_addr_t addr;
unsigned long ptr;
@@ -270,8 +274,9 @@ snd_trident_alloc_cont_pages(trident_t *trident, snd_pcm_substream_t *substream)
/*
* page allocation for DMA
*/
snd_util_memblk_t *
snd_trident_alloc_pages(trident_t *trident, snd_pcm_substream_t *substream)
struct snd_util_memblk *
snd_trident_alloc_pages(struct snd_trident *trident,
struct snd_pcm_substream *substream)
{
snd_assert(trident != NULL, return NULL);
snd_assert(substream != NULL, return NULL);
@@ -285,9 +290,10 @@ snd_trident_alloc_pages(trident_t *trident, snd_pcm_substream_t *substream)
/*
* release DMA buffer from page table
*/
int snd_trident_free_pages(trident_t *trident, snd_util_memblk_t *blk)
int snd_trident_free_pages(struct snd_trident *trident,
struct snd_util_memblk *blk)
{
snd_util_memhdr_t *hdr;
struct snd_util_memhdr *hdr;
int page;
snd_assert(trident != NULL, return -EINVAL);
@@ -314,17 +320,17 @@ int snd_trident_free_pages(trident_t *trident, snd_util_memblk_t *blk)
/*
*/
static int synth_alloc_pages(trident_t *hw, snd_util_memblk_t *blk);
static int synth_free_pages(trident_t *hw, snd_util_memblk_t *blk);
static int synth_alloc_pages(struct snd_trident *hw, struct snd_util_memblk *blk);
static int synth_free_pages(struct snd_trident *hw, struct snd_util_memblk *blk);
/*
* allocate a synth sample area
*/
snd_util_memblk_t *
snd_trident_synth_alloc(trident_t *hw, unsigned int size)
struct snd_util_memblk *
snd_trident_synth_alloc(struct snd_trident *hw, unsigned int size)
{
snd_util_memblk_t *blk;
snd_util_memhdr_t *hdr = hw->tlb.memhdr;
struct snd_util_memblk *blk;
struct snd_util_memhdr *hdr = hw->tlb.memhdr;
down(&hdr->block_mutex);
blk = __snd_util_mem_alloc(hdr, size);
@@ -346,9 +352,9 @@ snd_trident_synth_alloc(trident_t *hw, unsigned int size)
* free a synth sample area
*/
int
snd_trident_synth_free(trident_t *hw, snd_util_memblk_t *blk)
snd_trident_synth_free(struct snd_trident *hw, struct snd_util_memblk *blk)
{
snd_util_memhdr_t *hdr = hw->tlb.memhdr;
struct snd_util_memhdr *hdr = hw->tlb.memhdr;
down(&hdr->block_mutex);
synth_free_pages(hw, blk);
@@ -361,7 +367,7 @@ snd_trident_synth_free(trident_t *hw, snd_util_memblk_t *blk)
/*
* reset TLB entry and free kernel page
*/
static void clear_tlb(trident_t *trident, int page)
static void clear_tlb(struct snd_trident *trident, int page)
{
void *ptr = page_to_ptr(trident, page);
dma_addr_t addr = page_to_addr(trident, page);
@@ -378,20 +384,22 @@ static void clear_tlb(trident_t *trident, int page)
}
/* check new allocation range */
static void get_single_page_range(snd_util_memhdr_t *hdr, snd_util_memblk_t *blk, int *first_page_ret, int *last_page_ret)
static void get_single_page_range(struct snd_util_memhdr *hdr,
struct snd_util_memblk *blk,
int *first_page_ret, int *last_page_ret)
{
struct list_head *p;
snd_util_memblk_t *q;
struct snd_util_memblk *q;
int first_page, last_page;
first_page = firstpg(blk);
if ((p = blk->list.prev) != &hdr->block) {
q = list_entry(p, snd_util_memblk_t, list);
q = list_entry(p, struct snd_util_memblk, list);
if (lastpg(q) == first_page)
first_page++; /* first page was already allocated */
}
last_page = lastpg(blk);
if ((p = blk->list.next) != &hdr->block) {
q = list_entry(p, snd_util_memblk_t, list);
q = list_entry(p, struct snd_util_memblk, list);
if (firstpg(q) == last_page)
last_page--; /* last page was already allocated */
}
@@ -402,7 +410,7 @@ static void get_single_page_range(snd_util_memhdr_t *hdr, snd_util_memblk_t *blk
/*
* allocate kernel pages and assign them to TLB
*/
static int synth_alloc_pages(trident_t *hw, snd_util_memblk_t *blk)
static int synth_alloc_pages(struct snd_trident *hw, struct snd_util_memblk *blk)
{
int page, first_page, last_page;
struct snd_dma_buffer dmab;
@@ -438,7 +446,7 @@ __fail:
/*
* free pages
*/
static int synth_free_pages(trident_t *trident, snd_util_memblk_t *blk)
static int synth_free_pages(struct snd_trident *trident, struct snd_util_memblk *blk)
{
int page, first_page, last_page;
@@ -452,7 +460,9 @@ static int synth_free_pages(trident_t *trident, snd_util_memblk_t *blk)
/*
* copy_from_user(blk + offset, data, size)
*/
int snd_trident_synth_copy_from_user(trident_t *trident, snd_util_memblk_t *blk, int offset, const char __user *data, int size)
int snd_trident_synth_copy_from_user(struct snd_trident *trident,
struct snd_util_memblk *blk,
int offset, const char __user *data, int size)
{
int page, nextofs, end_offset, temp, temp1;

View File

@@ -192,15 +192,15 @@ static unsigned short log_from_linear( unsigned short value )
* Sample handling operations
*/
static void sample_start(trident_t * trident, snd_trident_voice_t * voice, snd_seq_position_t position);
static void sample_stop(trident_t * trident, snd_trident_voice_t * voice, snd_seq_stop_mode_t mode);
static void sample_freq(trident_t * trident, snd_trident_voice_t * voice, snd_seq_frequency_t freq);
static void sample_volume(trident_t * trident, snd_trident_voice_t * voice, snd_seq_ev_volume_t * volume);
static void sample_loop(trident_t * trident, snd_trident_voice_t * voice, snd_seq_ev_loop_t * loop);
static void sample_pos(trident_t * trident, snd_trident_voice_t * voice, snd_seq_position_t position);
static void sample_private1(trident_t * trident, snd_trident_voice_t * voice, unsigned char *data);
static void sample_start(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_position_t position);
static void sample_stop(struct snd_trident * trident, struct snd_trident_voice * voice, int mode);
static void sample_freq(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_frequency_t freq);
static void sample_volume(struct snd_trident * trident, struct snd_trident_voice * voice, struct snd_seq_ev_volume * volume);
static void sample_loop(struct snd_trident * trident, struct snd_trident_voice * voice, struct snd_seq_ev_loop * loop);
static void sample_pos(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_position_t position);
static void sample_private1(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned char *data);
static snd_trident_sample_ops_t sample_ops =
static struct snd_trident_sample_ops sample_ops =
{
sample_start,
sample_stop,
@@ -211,7 +211,7 @@ static snd_trident_sample_ops_t sample_ops =
sample_private1
};
static void snd_trident_simple_init(snd_trident_voice_t * voice)
static void snd_trident_simple_init(struct snd_trident_voice * voice)
{
//voice->handler_wave = interrupt_wave;
//voice->handler_volume = interrupt_volume;
@@ -220,10 +220,10 @@ static void snd_trident_simple_init(snd_trident_voice_t * voice)
voice->sample_ops = &sample_ops;
}
static void sample_start(trident_t * trident, snd_trident_voice_t * voice, snd_seq_position_t position)
static void sample_start(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_position_t position)
{
simple_instrument_t *simple;
snd_seq_kinstr_t *instr;
struct simple_instrument *simple;
struct snd_seq_kinstr *instr;
unsigned long flags;
unsigned int loop_start, loop_end, sample_start, sample_end, start_offset;
unsigned int value;
@@ -305,7 +305,7 @@ static void sample_start(trident_t * trident, snd_trident_voice_t * voice, snd_s
snd_seq_instr_free_use(trident->synth.ilist, instr);
}
static void sample_stop(trident_t * trident, snd_trident_voice_t * voice, snd_seq_stop_mode_t mode)
static void sample_stop(struct snd_trident * trident, struct snd_trident_voice * voice, int mode)
{
unsigned long flags;
@@ -329,7 +329,7 @@ static void sample_stop(trident_t * trident, snd_trident_voice_t * voice, snd_se
}
}
static void sample_freq(trident_t * trident, snd_trident_voice_t * voice, snd_seq_frequency_t freq)
static void sample_freq(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_frequency_t freq)
{
unsigned long flags;
freq >>= 4;
@@ -355,7 +355,7 @@ static void sample_freq(trident_t * trident, snd_trident_voice_t * voice, snd_se
spin_unlock_irqrestore(&trident->reg_lock, flags);
}
static void sample_volume(trident_t * trident, snd_trident_voice_t * voice, snd_seq_ev_volume_t * volume)
static void sample_volume(struct snd_trident * trident, struct snd_trident_voice * voice, struct snd_seq_ev_volume * volume)
{
unsigned long flags;
unsigned short value;
@@ -407,11 +407,11 @@ static void sample_volume(trident_t * trident, snd_trident_voice_t * voice, snd_
spin_unlock_irqrestore(&trident->reg_lock, flags);
}
static void sample_loop(trident_t * trident, snd_trident_voice_t * voice, snd_seq_ev_loop_t * loop)
static void sample_loop(struct snd_trident * trident, struct snd_trident_voice * voice, struct snd_seq_ev_loop * loop)
{
unsigned long flags;
simple_instrument_t *simple;
snd_seq_kinstr_t *instr;
struct simple_instrument *simple;
struct snd_seq_kinstr *instr;
unsigned int loop_start, loop_end;
instr = snd_seq_instr_find(trident->synth.ilist, &voice->instr, 0, 1);
@@ -446,11 +446,11 @@ static void sample_loop(trident_t * trident, snd_trident_voice_t * voice, snd_se
snd_seq_instr_free_use(trident->synth.ilist, instr);
}
static void sample_pos(trident_t * trident, snd_trident_voice_t * voice, snd_seq_position_t position)
static void sample_pos(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_position_t position)
{
unsigned long flags;
simple_instrument_t *simple;
snd_seq_kinstr_t *instr;
struct simple_instrument *simple;
struct snd_seq_kinstr *instr;
unsigned int value;
instr = snd_seq_instr_find(trident->synth.ilist, &voice->instr, 0, 1);
@@ -496,7 +496,7 @@ static void sample_pos(trident_t * trident, snd_trident_voice_t * voice, snd_seq
snd_seq_instr_free_use(trident->synth.ilist, instr);
}
static void sample_private1(trident_t * trident, snd_trident_voice_t * voice, unsigned char *data)
static void sample_private1(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned char *data)
{
}
@@ -504,10 +504,11 @@ static void sample_private1(trident_t * trident, snd_trident_voice_t * voice, un
* Memory management / sample loading
*/
static int snd_trident_simple_put_sample(void *private_data, simple_instrument_t * instr,
static int snd_trident_simple_put_sample(void *private_data,
struct simple_instrument * instr,
char __user *data, long len, int atomic)
{
trident_t *trident = private_data;
struct snd_trident *trident = private_data;
int size = instr->size;
int shift = 0;
@@ -529,7 +530,7 @@ static int snd_trident_simple_put_sample(void *private_data, simple_instrument_t
return -EFAULT;
if (trident->tlb.entries) {
snd_util_memblk_t *memblk;
struct snd_util_memblk *memblk;
memblk = snd_trident_synth_alloc(trident, size);
if (memblk == NULL)
return -ENOMEM;
@@ -557,10 +558,11 @@ static int snd_trident_simple_put_sample(void *private_data, simple_instrument_t
return 0;
}
static int snd_trident_simple_get_sample(void *private_data, simple_instrument_t * instr,
static int snd_trident_simple_get_sample(void *private_data,
struct simple_instrument * instr,
char __user *data, long len, int atomic)
{
//trident_t *trident = private_data;
//struct snd_trident *trident = private_data;
int size = instr->size;
int shift = 0;
@@ -578,10 +580,11 @@ static int snd_trident_simple_get_sample(void *private_data, simple_instrument_t
return -EBUSY;
}
static int snd_trident_simple_remove_sample(void *private_data, simple_instrument_t * instr,
static int snd_trident_simple_remove_sample(void *private_data,
struct simple_instrument * instr,
int atomic)
{
trident_t *trident = private_data;
struct snd_trident *trident = private_data;
int size = instr->size;
if (instr->format & SIMPLE_WAVE_16BIT)
@@ -590,7 +593,7 @@ static int snd_trident_simple_remove_sample(void *private_data, simple_instrumen
size <<= 1;
if (trident->tlb.entries) {
snd_util_memblk_t *memblk = (snd_util_memblk_t*)instr->address.ptr;
struct snd_util_memblk *memblk = (struct snd_util_memblk *)instr->address.ptr;
if (memblk)
snd_trident_synth_free(trident, memblk);
else
@@ -612,9 +615,9 @@ static int snd_trident_simple_remove_sample(void *private_data, simple_instrumen
return 0;
}
static void select_instrument(trident_t * trident, snd_trident_voice_t * v)
static void select_instrument(struct snd_trident * trident, struct snd_trident_voice * v)
{
snd_seq_kinstr_t *instr;
struct snd_seq_kinstr *instr;
instr = snd_seq_instr_find(trident->synth.ilist, &v->instr, 0, 1);
if (instr != NULL) {
if (instr->ops) {
@@ -629,7 +632,7 @@ static void select_instrument(trident_t * trident, snd_trident_voice_t * v)
*/
static void event_sample(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
static void event_sample(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
{
if (v->sample_ops && v->sample_ops->sample_stop)
v->sample_ops->sample_stop(p->trident, v, SAMPLE_STOP_IMMEDIATELY);
@@ -643,7 +646,7 @@ static void event_sample(snd_seq_event_t * ev, snd_trident_port_t * p, snd_tride
select_instrument(p->trident, v);
}
static void event_cluster(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
static void event_cluster(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
{
if (v->sample_ops && v->sample_ops->sample_stop)
v->sample_ops->sample_stop(p->trident, v, SAMPLE_STOP_IMMEDIATELY);
@@ -651,49 +654,49 @@ static void event_cluster(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trid
select_instrument(p->trident, v);
}
static void event_start(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
static void event_start(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
{
if (v->sample_ops && v->sample_ops->sample_start)
v->sample_ops->sample_start(p->trident, v, ev->data.sample.param.position);
}
static void event_stop(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
static void event_stop(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
{
if (v->sample_ops && v->sample_ops->sample_stop)
v->sample_ops->sample_stop(p->trident, v, ev->data.sample.param.stop_mode);
}
static void event_freq(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
static void event_freq(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
{
if (v->sample_ops && v->sample_ops->sample_freq)
v->sample_ops->sample_freq(p->trident, v, ev->data.sample.param.frequency);
}
static void event_volume(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
static void event_volume(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
{
if (v->sample_ops && v->sample_ops->sample_volume)
v->sample_ops->sample_volume(p->trident, v, &ev->data.sample.param.volume);
}
static void event_loop(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
static void event_loop(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
{
if (v->sample_ops && v->sample_ops->sample_loop)
v->sample_ops->sample_loop(p->trident, v, &ev->data.sample.param.loop);
}
static void event_position(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
static void event_position(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
{
if (v->sample_ops && v->sample_ops->sample_pos)
v->sample_ops->sample_pos(p->trident, v, ev->data.sample.param.position);
}
static void event_private1(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
static void event_private1(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
{
if (v->sample_ops && v->sample_ops->sample_private1)
v->sample_ops->sample_private1(p->trident, v, (unsigned char *) &ev->data.sample.param.raw8);
}
typedef void (trident_sample_event_handler_t) (snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v);
typedef void (trident_sample_event_handler_t) (struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v);
static trident_sample_event_handler_t *trident_sample_event_handlers[9] =
{
@@ -708,11 +711,11 @@ static trident_sample_event_handler_t *trident_sample_event_handlers[9] =
event_private1
};
static void snd_trident_sample_event(snd_seq_event_t * ev, snd_trident_port_t * p)
static void snd_trident_sample_event(struct snd_seq_event * ev, struct snd_trident_port * p)
{
int idx, voice;
trident_t *trident = p->trident;
snd_trident_voice_t *v;
struct snd_trident *trident = p->trident;
struct snd_trident_voice *v;
unsigned long flags;
idx = ev->type - SNDRV_SEQ_EVENT_SAMPLE;
@@ -735,10 +738,10 @@ static void snd_trident_sample_event(snd_seq_event_t * ev, snd_trident_port_t *
*/
static void snd_trident_synth_free_voices(trident_t * trident, int client, int port)
static void snd_trident_synth_free_voices(struct snd_trident * trident, int client, int port)
{
int idx;
snd_trident_voice_t *voice;
struct snd_trident_voice *voice;
for (idx = 0; idx < 32; idx++) {
voice = &trident->synth.voices[idx];
@@ -747,11 +750,11 @@ static void snd_trident_synth_free_voices(trident_t * trident, int client, int p
}
}
static int snd_trident_synth_use(void *private_data, snd_seq_port_subscribe_t * info)
static int snd_trident_synth_use(void *private_data, struct snd_seq_port_subscribe * info)
{
snd_trident_port_t *port = (snd_trident_port_t *) private_data;
trident_t *trident = port->trident;
snd_trident_voice_t *voice;
struct snd_trident_port *port = private_data;
struct snd_trident *trident = port->trident;
struct snd_trident_voice *voice;
unsigned int idx;
unsigned long flags;
@@ -786,10 +789,10 @@ static int snd_trident_synth_use(void *private_data, snd_seq_port_subscribe_t *
return 0;
}
static int snd_trident_synth_unuse(void *private_data, snd_seq_port_subscribe_t * info)
static int snd_trident_synth_unuse(void *private_data, struct snd_seq_port_subscribe * info)
{
snd_trident_port_t *port = (snd_trident_port_t *) private_data;
trident_t *trident = port->trident;
struct snd_trident_port *port = private_data;
struct snd_trident *trident = port->trident;
unsigned long flags;
spin_lock_irqsave(&trident->reg_lock, flags);
@@ -802,18 +805,18 @@ static int snd_trident_synth_unuse(void *private_data, snd_seq_port_subscribe_t
*/
static void snd_trident_synth_free_private_instruments(snd_trident_port_t * p, int client)
static void snd_trident_synth_free_private_instruments(struct snd_trident_port * p, int client)
{
snd_seq_instr_header_t ifree;
struct snd_seq_instr_header ifree;
memset(&ifree, 0, sizeof(ifree));
ifree.cmd = SNDRV_SEQ_INSTR_FREE_CMD_PRIVATE;
snd_seq_instr_list_free_cond(p->trident->synth.ilist, &ifree, client, 0);
}
static int snd_trident_synth_event_input(snd_seq_event_t * ev, int direct, void *private_data, int atomic, int hop)
static int snd_trident_synth_event_input(struct snd_seq_event * ev, int direct, void *private_data, int atomic, int hop)
{
snd_trident_port_t *p = (snd_trident_port_t *) private_data;
struct snd_trident_port *p = (struct snd_trident_port *) private_data;
if (p == NULL)
return -EINVAL;
@@ -841,12 +844,12 @@ static int snd_trident_synth_event_input(snd_seq_event_t * ev, int direct, void
}
static void snd_trident_synth_instr_notify(void *private_data,
snd_seq_kinstr_t * instr,
struct snd_seq_kinstr * instr,
int what)
{
int idx;
trident_t *trident = private_data;
snd_trident_voice_t *pvoice;
struct snd_trident *trident = private_data;
struct snd_trident_voice *pvoice;
unsigned long flags;
spin_lock_irqsave(&trident->event_lock, flags);
@@ -870,16 +873,16 @@ static void snd_trident_synth_instr_notify(void *private_data,
static void snd_trident_synth_free_port(void *private_data)
{
snd_trident_port_t *p = (snd_trident_port_t *) private_data;
struct snd_trident_port *p = (struct snd_trident_port *) private_data;
if (p)
snd_midi_channel_free_set(p->chset);
}
static int snd_trident_synth_create_port(trident_t * trident, int idx)
static int snd_trident_synth_create_port(struct snd_trident * trident, int idx)
{
snd_trident_port_t *p;
snd_seq_port_callback_t callbacks;
struct snd_trident_port *p;
struct snd_seq_port_callback callbacks;
char name[32];
char *str;
int result;
@@ -927,17 +930,17 @@ static int snd_trident_synth_create_port(trident_t * trident, int idx)
*/
static int snd_trident_synth_new_device(snd_seq_device_t *dev)
static int snd_trident_synth_new_device(struct snd_seq_device *dev)
{
trident_t *trident;
struct snd_trident *trident;
int client, i;
snd_seq_client_callback_t callbacks;
snd_seq_client_info_t cinfo;
snd_seq_port_subscribe_t sub;
snd_simple_ops_t *simpleops;
struct snd_seq_client_callback callbacks;
struct snd_seq_client_info cinfo;
struct snd_seq_port_subscribe sub;
struct snd_simple_ops *simpleops;
char *str;
trident = *(trident_t **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
trident = *(struct snd_trident **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
if (trident == NULL)
return -EINVAL;
@@ -993,11 +996,11 @@ static int snd_trident_synth_new_device(snd_seq_device_t *dev)
return 0;
}
static int snd_trident_synth_delete_device(snd_seq_device_t *dev)
static int snd_trident_synth_delete_device(struct snd_seq_device *dev)
{
trident_t *trident;
struct snd_trident *trident;
trident = *(trident_t **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
trident = *(struct snd_trident **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
if (trident == NULL)
return -EINVAL;
@@ -1012,14 +1015,14 @@ static int snd_trident_synth_delete_device(snd_seq_device_t *dev)
static int __init alsa_trident_synth_init(void)
{
static snd_seq_dev_ops_t ops =
static struct snd_seq_dev_ops ops =
{
snd_trident_synth_new_device,
snd_trident_synth_delete_device
};
return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_TRIDENT, &ops,
sizeof(trident_t*));
sizeof(struct snd_trident *));
}
static void __exit alsa_trident_synth_exit(void)