Lines Matching refs:emu
20 snd_emux_hwdep_load_patch(struct snd_emux *emu, void __user *arg) in snd_emux_hwdep_load_patch() argument
29 return snd_soundfont_load_guspatch(emu->sflist, arg, in snd_emux_hwdep_load_patch()
35 err = snd_soundfont_load(emu->sflist, arg, patch.len + sizeof(patch), TMP_CLIENT_ID); in snd_emux_hwdep_load_patch()
39 if (emu->ops.load_fx) in snd_emux_hwdep_load_patch()
40 return emu->ops.load_fx(emu, patch.type, patch.optarg, arg, patch.len + sizeof(patch)); in snd_emux_hwdep_load_patch()
51 snd_emux_hwdep_misc_mode(struct snd_emux *emu, void __user *arg) in snd_emux_hwdep_misc_mode() argument
63 for (i = 0; i < emu->num_ports; i++) in snd_emux_hwdep_misc_mode()
64 emu->portptrs[i]->ctrls[info.mode] = info.value; in snd_emux_hwdep_misc_mode()
66 if (info.port < emu->num_ports) { in snd_emux_hwdep_misc_mode()
67 info.port = array_index_nospec(info.port, emu->num_ports); in snd_emux_hwdep_misc_mode()
68 emu->portptrs[info.port]->ctrls[info.mode] = info.value; in snd_emux_hwdep_misc_mode()
82 struct snd_emux *emu = hw->private_data; in snd_emux_hwdep_ioctl() local
88 return snd_emux_hwdep_load_patch(emu, (void __user *)arg); in snd_emux_hwdep_ioctl()
90 snd_soundfont_remove_samples(emu->sflist); in snd_emux_hwdep_ioctl()
93 snd_soundfont_remove_unlocked(emu->sflist); in snd_emux_hwdep_ioctl()
96 if (emu->memhdr) { in snd_emux_hwdep_ioctl()
97 int size = snd_util_mem_avail(emu->memhdr); in snd_emux_hwdep_ioctl()
102 return snd_emux_hwdep_misc_mode(emu, (void __user *)arg); in snd_emux_hwdep_ioctl()
114 snd_emux_init_hwdep(struct snd_emux *emu) in snd_emux_init_hwdep() argument
119 err = snd_hwdep_new(emu->card, SNDRV_EMUX_HWDEP_NAME, emu->hwdep_idx, &hw); in snd_emux_init_hwdep()
122 emu->hwdep = hw; in snd_emux_init_hwdep()
130 hw->private_data = emu; in snd_emux_init_hwdep()
131 err = snd_card_register(emu->card); in snd_emux_init_hwdep()
143 snd_emux_delete_hwdep(struct snd_emux *emu) in snd_emux_delete_hwdep() argument
145 if (emu->hwdep) { in snd_emux_delete_hwdep()
146 snd_device_free(emu->card, emu->hwdep); in snd_emux_delete_hwdep()
147 emu->hwdep = NULL; in snd_emux_delete_hwdep()