Lines Matching refs:emu
34 snd_emux_hwdep_load_patch(struct snd_emux *emu, void __user *arg) in snd_emux_hwdep_load_patch() argument
44 err = snd_soundfont_load(emu->sflist, arg, patch.len + sizeof(patch), TMP_CLIENT_ID); in snd_emux_hwdep_load_patch()
48 if (emu->ops.load_fx) in snd_emux_hwdep_load_patch()
49 return emu->ops.load_fx(emu, patch.type, patch.optarg, arg, patch.len + sizeof(patch)); in snd_emux_hwdep_load_patch()
60 snd_emux_hwdep_misc_mode(struct snd_emux *emu, void __user *arg) in snd_emux_hwdep_misc_mode() argument
71 for (i = 0; i < emu->num_ports; i++) in snd_emux_hwdep_misc_mode()
72 emu->portptrs[i]->ctrls[info.mode] = info.value; in snd_emux_hwdep_misc_mode()
74 if (info.port < emu->num_ports) in snd_emux_hwdep_misc_mode()
75 emu->portptrs[info.port]->ctrls[info.mode] = info.value; in snd_emux_hwdep_misc_mode()
88 struct snd_emux *emu = hw->private_data; in snd_emux_hwdep_ioctl() local
94 return snd_emux_hwdep_load_patch(emu, (void __user *)arg); in snd_emux_hwdep_ioctl()
96 snd_soundfont_remove_samples(emu->sflist); in snd_emux_hwdep_ioctl()
99 snd_soundfont_remove_unlocked(emu->sflist); in snd_emux_hwdep_ioctl()
102 if (emu->memhdr) { in snd_emux_hwdep_ioctl()
103 int size = snd_util_mem_avail(emu->memhdr); in snd_emux_hwdep_ioctl()
108 return snd_emux_hwdep_misc_mode(emu, (void __user *)arg); in snd_emux_hwdep_ioctl()
120 snd_emux_init_hwdep(struct snd_emux *emu) in snd_emux_init_hwdep() argument
125 if ((err = snd_hwdep_new(emu->card, SNDRV_EMUX_HWDEP_NAME, emu->hwdep_idx, &hw)) < 0) in snd_emux_init_hwdep()
127 emu->hwdep = hw; in snd_emux_init_hwdep()
135 hw->private_data = emu; in snd_emux_init_hwdep()
136 if ((err = snd_card_register(emu->card)) < 0) in snd_emux_init_hwdep()
147 snd_emux_delete_hwdep(struct snd_emux *emu) in snd_emux_delete_hwdep() argument
149 if (emu->hwdep) { in snd_emux_delete_hwdep()
150 snd_device_free(emu->card, emu->hwdep); in snd_emux_delete_hwdep()
151 emu->hwdep = NULL; in snd_emux_delete_hwdep()