Lines Matching refs:emu
26 struct snd_emux *emu; in snd_emux_new() local
29 emu = kzalloc(sizeof(*emu), GFP_KERNEL); in snd_emux_new()
30 if (emu == NULL) in snd_emux_new()
33 spin_lock_init(&emu->voice_lock); in snd_emux_new()
34 mutex_init(&emu->register_mutex); in snd_emux_new()
36 emu->client = -1; in snd_emux_new()
38 emu->oss_synth = NULL; in snd_emux_new()
40 emu->max_voices = 0; in snd_emux_new()
41 emu->use_time = 0; in snd_emux_new()
43 timer_setup(&emu->tlist, snd_emux_timer_callback, 0); in snd_emux_new()
44 emu->timer_active = 0; in snd_emux_new()
46 *remu = emu; in snd_emux_new()
58 struct snd_emux *emu = private_data; in sf_sample_new() local
59 return emu->ops.sample_new(emu, sp, hdr, buf, count); in sf_sample_new()
66 struct snd_emux *emu = private_data; in sf_sample_free() local
67 return emu->ops.sample_free(emu, sp, hdr); in sf_sample_free()
73 struct snd_emux *emu = private_data; in sf_sample_reset() local
74 emu->ops.sample_reset(emu); in sf_sample_reset()
77 int snd_emux_register(struct snd_emux *emu, struct snd_card *card, int index, char *name) in snd_emux_register() argument
82 if (snd_BUG_ON(!emu->hw || emu->max_voices <= 0)) in snd_emux_register()
87 emu->card = card; in snd_emux_register()
88 emu->name = kstrdup(name, GFP_KERNEL); in snd_emux_register()
89 emu->voices = kcalloc(emu->max_voices, sizeof(struct snd_emux_voice), in snd_emux_register()
91 if (emu->name == NULL || emu->voices == NULL) in snd_emux_register()
96 sf_cb.private_data = emu; in snd_emux_register()
97 if (emu->ops.sample_new) in snd_emux_register()
99 if (emu->ops.sample_free) in snd_emux_register()
101 if (emu->ops.sample_reset) in snd_emux_register()
103 emu->sflist = snd_sf_new(&sf_cb, emu->memhdr); in snd_emux_register()
104 if (emu->sflist == NULL) in snd_emux_register()
107 err = snd_emux_init_hwdep(emu); in snd_emux_register()
111 snd_emux_init_voices(emu); in snd_emux_register()
113 snd_emux_init_seq(emu, card, index); in snd_emux_register()
115 snd_emux_init_seq_oss(emu); in snd_emux_register()
117 snd_emux_init_virmidi(emu, card); in snd_emux_register()
119 snd_emux_proc_init(emu, card, index); in snd_emux_register()
127 int snd_emux_free(struct snd_emux *emu) in snd_emux_free() argument
131 if (! emu) in snd_emux_free()
134 spin_lock_irqsave(&emu->voice_lock, flags); in snd_emux_free()
135 if (emu->timer_active) in snd_emux_free()
136 del_timer(&emu->tlist); in snd_emux_free()
137 spin_unlock_irqrestore(&emu->voice_lock, flags); in snd_emux_free()
139 snd_emux_proc_free(emu); in snd_emux_free()
140 snd_emux_delete_virmidi(emu); in snd_emux_free()
142 snd_emux_detach_seq_oss(emu); in snd_emux_free()
144 snd_emux_detach_seq(emu); in snd_emux_free()
145 snd_emux_delete_hwdep(emu); in snd_emux_free()
146 snd_sf_free(emu->sflist); in snd_emux_free()
147 kfree(emu->voices); in snd_emux_free()
148 kfree(emu->name); in snd_emux_free()
149 kfree(emu); in snd_emux_free()