Lines Matching +full:vp +full:- +full:p
1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright (c) 1999-2000 Takashi Iwai <[email protected]>
21 * macro evaluates its args more than once, so changed to upper-case.
34 static void terminate_voice(struct snd_emux *emu, struct snd_emux_voice *vp, int free);
35 static void update_voice(struct snd_emux *emu, struct snd_emux_voice *vp, int update);
36 static void setup_voice(struct snd_emux_voice *vp);
37 static int calc_pan(struct snd_emux_voice *vp);
38 static int calc_volume(struct snd_emux_voice *vp);
39 static int calc_pitch(struct snd_emux_voice *vp);
46 snd_emux_note_on(void *p, int note, int vel, struct snd_midi_channel *chan) in snd_emux_note_on() argument
50 struct snd_emux_voice *vp; in snd_emux_note_on() local
55 port = p; in snd_emux_note_on()
59 emu = port->emu; in snd_emux_note_on()
60 if (snd_BUG_ON(!emu || !emu->ops.get_voice || !emu->ops.trigger)) in snd_emux_note_on()
71 if (zp && zp->v.exclusiveClass) in snd_emux_note_on()
72 exclusive_note_off(emu, port, zp->v.exclusiveClass); in snd_emux_note_on()
80 spin_lock_irqsave(&emu->voice_lock, flags); in snd_emux_note_on()
89 vp = emu->ops.get_voice(emu, port); in snd_emux_note_on()
90 if (vp == NULL || vp->ch < 0) in snd_emux_note_on()
92 if (STATE_IS_PLAYING(vp->state)) in snd_emux_note_on()
93 emu->ops.terminate(vp); in snd_emux_note_on()
95 vp->time = emu->use_time++; in snd_emux_note_on()
96 vp->chan = chan; in snd_emux_note_on()
97 vp->port = port; in snd_emux_note_on()
98 vp->key = key; in snd_emux_note_on()
99 vp->note = note; in snd_emux_note_on()
100 vp->velocity = vel; in snd_emux_note_on()
101 vp->zone = table[i]; in snd_emux_note_on()
102 if (vp->zone->sample) in snd_emux_note_on()
103 vp->block = vp->zone->sample->block; in snd_emux_note_on()
105 vp->block = NULL; in snd_emux_note_on()
107 setup_voice(vp); in snd_emux_note_on()
109 vp->state = SNDRV_EMUX_ST_STANDBY; in snd_emux_note_on()
110 if (emu->ops.prepare) { in snd_emux_note_on()
111 vp->state = SNDRV_EMUX_ST_OFF; in snd_emux_note_on()
112 if (emu->ops.prepare(vp) >= 0) in snd_emux_note_on()
113 vp->state = SNDRV_EMUX_ST_STANDBY; in snd_emux_note_on()
118 for (i = 0; i < emu->max_voices; i++) { in snd_emux_note_on()
119 vp = &emu->voices[i]; in snd_emux_note_on()
120 if (vp->state == SNDRV_EMUX_ST_STANDBY && in snd_emux_note_on()
121 vp->chan == chan) { in snd_emux_note_on()
122 emu->ops.trigger(vp); in snd_emux_note_on()
123 vp->state = SNDRV_EMUX_ST_ON; in snd_emux_note_on()
124 vp->ontime = jiffies; /* remember the trigger timing */ in snd_emux_note_on()
127 spin_unlock_irqrestore(&emu->voice_lock, flags); in snd_emux_note_on()
130 if (port->port_mode == SNDRV_EMUX_PORT_MODE_OSS_SYNTH) { in snd_emux_note_on()
132 struct snd_emux_effect_table *fx = chan->private; in snd_emux_note_on()
134 fx->flag[EMUX_FX_SAMPLE_START] = 0; in snd_emux_note_on()
135 fx->flag[EMUX_FX_COARSE_SAMPLE_START] = 0; in snd_emux_note_on()
145 snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan) in snd_emux_note_off() argument
149 struct snd_emux_voice *vp; in snd_emux_note_off() local
153 port = p; in snd_emux_note_off()
157 emu = port->emu; in snd_emux_note_off()
158 if (snd_BUG_ON(!emu || !emu->ops.release)) in snd_emux_note_off()
161 spin_lock_irqsave(&emu->voice_lock, flags); in snd_emux_note_off()
162 for (ch = 0; ch < emu->max_voices; ch++) { in snd_emux_note_off()
163 vp = &emu->voices[ch]; in snd_emux_note_off()
164 if (STATE_IS_PLAYING(vp->state) && in snd_emux_note_off()
165 vp->chan == chan && vp->key == note) { in snd_emux_note_off()
166 vp->state = SNDRV_EMUX_ST_RELEASED; in snd_emux_note_off()
167 if (vp->ontime == jiffies) { in snd_emux_note_off()
168 /* if note-off is sent too shortly after in snd_emux_note_off()
169 * note-on, emuX engine cannot produce the sound in snd_emux_note_off()
173 vp->state = SNDRV_EMUX_ST_PENDING; in snd_emux_note_off()
174 if (! emu->timer_active) { in snd_emux_note_off()
175 mod_timer(&emu->tlist, jiffies + 1); in snd_emux_note_off()
176 emu->timer_active = 1; in snd_emux_note_off()
180 emu->ops.release(vp); in snd_emux_note_off()
183 spin_unlock_irqrestore(&emu->voice_lock, flags); in snd_emux_note_off()
189 * release the pending note-offs
194 struct snd_emux_voice *vp; in snd_emux_timer_callback() local
198 spin_lock_irqsave(&emu->voice_lock, flags); in snd_emux_timer_callback()
199 for (ch = 0; ch < emu->max_voices; ch++) { in snd_emux_timer_callback()
200 vp = &emu->voices[ch]; in snd_emux_timer_callback()
201 if (vp->state == SNDRV_EMUX_ST_PENDING) { in snd_emux_timer_callback()
202 if (vp->ontime == jiffies) in snd_emux_timer_callback()
205 emu->ops.release(vp); in snd_emux_timer_callback()
206 vp->state = SNDRV_EMUX_ST_RELEASED; in snd_emux_timer_callback()
211 mod_timer(&emu->tlist, jiffies + 1); in snd_emux_timer_callback()
212 emu->timer_active = 1; in snd_emux_timer_callback()
214 emu->timer_active = 0; in snd_emux_timer_callback()
215 spin_unlock_irqrestore(&emu->voice_lock, flags); in snd_emux_timer_callback()
222 snd_emux_key_press(void *p, int note, int vel, struct snd_midi_channel *chan) in snd_emux_key_press() argument
226 struct snd_emux_voice *vp; in snd_emux_key_press() local
230 port = p; in snd_emux_key_press()
234 emu = port->emu; in snd_emux_key_press()
235 if (snd_BUG_ON(!emu || !emu->ops.update)) in snd_emux_key_press()
238 spin_lock_irqsave(&emu->voice_lock, flags); in snd_emux_key_press()
239 for (ch = 0; ch < emu->max_voices; ch++) { in snd_emux_key_press()
240 vp = &emu->voices[ch]; in snd_emux_key_press()
241 if (vp->state == SNDRV_EMUX_ST_ON && in snd_emux_key_press()
242 vp->chan == chan && vp->key == note) { in snd_emux_key_press()
243 vp->velocity = vel; in snd_emux_key_press()
244 update_voice(emu, vp, SNDRV_EMUX_UPDATE_VOLUME); in snd_emux_key_press()
247 spin_unlock_irqrestore(&emu->voice_lock, flags); in snd_emux_key_press()
258 struct snd_emux_voice *vp; in snd_emux_update_channel() local
265 emu = port->emu; in snd_emux_update_channel()
266 if (snd_BUG_ON(!emu || !emu->ops.update)) in snd_emux_update_channel()
269 spin_lock_irqsave(&emu->voice_lock, flags); in snd_emux_update_channel()
270 for (i = 0; i < emu->max_voices; i++) { in snd_emux_update_channel()
271 vp = &emu->voices[i]; in snd_emux_update_channel()
272 if (vp->chan == chan) in snd_emux_update_channel()
273 update_voice(emu, vp, update); in snd_emux_update_channel()
275 spin_unlock_irqrestore(&emu->voice_lock, flags); in snd_emux_update_channel()
285 struct snd_emux_voice *vp; in snd_emux_update_port() local
292 emu = port->emu; in snd_emux_update_port()
293 if (snd_BUG_ON(!emu || !emu->ops.update)) in snd_emux_update_port()
296 spin_lock_irqsave(&emu->voice_lock, flags); in snd_emux_update_port()
297 for (i = 0; i < emu->max_voices; i++) { in snd_emux_update_port()
298 vp = &emu->voices[i]; in snd_emux_update_port()
299 if (vp->port == port) in snd_emux_update_port()
300 update_voice(emu, vp, update); in snd_emux_update_port()
302 spin_unlock_irqrestore(&emu->voice_lock, flags); in snd_emux_update_port()
311 snd_emux_control(void *p, int type, struct snd_midi_channel *chan) in snd_emux_control() argument
315 port = p; in snd_emux_control()
332 if (chan->control[type] >= 64) in snd_emux_control()
333 snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, -160, in snd_emux_control()
354 if (port->chset.midi_mode == SNDRV_MIDI_MODE_XG) { in snd_emux_control()
361 * terminate note - if free flag is true, free the terminated voice
367 struct snd_emux_voice *vp; in terminate_note1() local
370 spin_lock_irqsave(&emu->voice_lock, flags); in terminate_note1()
371 for (i = 0; i < emu->max_voices; i++) { in terminate_note1()
372 vp = &emu->voices[i]; in terminate_note1()
373 if (STATE_IS_PLAYING(vp->state) && vp->chan == chan && in terminate_note1()
374 vp->key == note) in terminate_note1()
375 terminate_voice(emu, vp, free); in terminate_note1()
377 spin_unlock_irqrestore(&emu->voice_lock, flags); in terminate_note1()
382 * terminate note - exported for midi emulation
385 snd_emux_terminate_note(void *p, int note, struct snd_midi_channel *chan) in snd_emux_terminate_note() argument
390 port = p; in snd_emux_terminate_note()
394 emu = port->emu; in snd_emux_terminate_note()
395 if (snd_BUG_ON(!emu || !emu->ops.terminate)) in snd_emux_terminate_note()
409 struct snd_emux_voice *vp; in snd_emux_terminate_all() local
412 spin_lock_irqsave(&emu->voice_lock, flags); in snd_emux_terminate_all()
413 for (i = 0; i < emu->max_voices; i++) { in snd_emux_terminate_all()
414 vp = &emu->voices[i]; in snd_emux_terminate_all()
415 if (STATE_IS_PLAYING(vp->state)) in snd_emux_terminate_all()
416 terminate_voice(emu, vp, 0); in snd_emux_terminate_all()
417 if (vp->state == SNDRV_EMUX_ST_OFF) { in snd_emux_terminate_all()
418 if (emu->ops.free_voice) in snd_emux_terminate_all()
419 emu->ops.free_voice(vp); in snd_emux_terminate_all()
420 if (emu->ops.reset) in snd_emux_terminate_all()
421 emu->ops.reset(emu, i); in snd_emux_terminate_all()
423 vp->time = 0; in snd_emux_terminate_all()
426 emu->use_time = 0; in snd_emux_terminate_all()
427 spin_unlock_irqrestore(&emu->voice_lock, flags); in snd_emux_terminate_all()
440 struct snd_emux_voice *vp; in snd_emux_sounds_off_all() local
445 emu = port->emu; in snd_emux_sounds_off_all()
446 if (snd_BUG_ON(!emu || !emu->ops.terminate)) in snd_emux_sounds_off_all()
449 spin_lock_irqsave(&emu->voice_lock, flags); in snd_emux_sounds_off_all()
450 for (i = 0; i < emu->max_voices; i++) { in snd_emux_sounds_off_all()
451 vp = &emu->voices[i]; in snd_emux_sounds_off_all()
452 if (STATE_IS_PLAYING(vp->state) && in snd_emux_sounds_off_all()
453 vp->port == port) in snd_emux_sounds_off_all()
454 terminate_voice(emu, vp, 0); in snd_emux_sounds_off_all()
455 if (vp->state == SNDRV_EMUX_ST_OFF) { in snd_emux_sounds_off_all()
456 if (emu->ops.free_voice) in snd_emux_sounds_off_all()
457 emu->ops.free_voice(vp); in snd_emux_sounds_off_all()
458 if (emu->ops.reset) in snd_emux_sounds_off_all()
459 emu->ops.reset(emu, i); in snd_emux_sounds_off_all()
462 spin_unlock_irqrestore(&emu->voice_lock, flags); in snd_emux_sounds_off_all()
473 struct snd_emux_voice *vp; in exclusive_note_off() local
477 spin_lock_irqsave(&emu->voice_lock, flags); in exclusive_note_off()
478 for (i = 0; i < emu->max_voices; i++) { in exclusive_note_off()
479 vp = &emu->voices[i]; in exclusive_note_off()
480 if (STATE_IS_PLAYING(vp->state) && vp->port == port && in exclusive_note_off()
481 vp->reg.exclusiveClass == exclass) { in exclusive_note_off()
482 terminate_voice(emu, vp, 0); in exclusive_note_off()
485 spin_unlock_irqrestore(&emu->voice_lock, flags); in exclusive_note_off()
493 terminate_voice(struct snd_emux *emu, struct snd_emux_voice *vp, int free) in terminate_voice() argument
495 emu->ops.terminate(vp); in terminate_voice()
496 vp->time = emu->use_time++; in terminate_voice()
497 vp->chan = NULL; in terminate_voice()
498 vp->port = NULL; in terminate_voice()
499 vp->zone = NULL; in terminate_voice()
500 vp->block = NULL; in terminate_voice()
501 vp->state = SNDRV_EMUX_ST_OFF; in terminate_voice()
502 if (free && emu->ops.free_voice) in terminate_voice()
503 emu->ops.free_voice(vp); in terminate_voice()
511 update_voice(struct snd_emux *emu, struct snd_emux_voice *vp, int update) in update_voice() argument
513 if (!STATE_IS_PLAYING(vp->state)) in update_voice()
516 if (vp->chan == NULL || vp->port == NULL) in update_voice()
519 calc_volume(vp); in update_voice()
521 calc_pitch(vp); in update_voice()
523 if (! calc_pan(vp) && (update == SNDRV_EMUX_UPDATE_PAN)) in update_voice()
526 emu->ops.update(vp, update); in update_voice()
546 setup_voice(struct snd_emux_voice *vp) in setup_voice() argument
552 vp->reg = vp->zone->v; in setup_voice()
555 snd_emux_setup_effect(vp); in setup_voice()
559 vp->apan = -1; in setup_voice()
560 vp->avol = -1; in setup_voice()
561 vp->apitch = -1; in setup_voice()
563 calc_volume(vp); in setup_voice()
564 calc_pitch(vp); in setup_voice()
565 calc_pan(vp); in setup_voice()
567 parm = &vp->reg.parm; in setup_voice()
570 if (LO_BYTE(parm->modatkhld) >= 0x80 && parm->moddelay >= 0x8000) { in setup_voice()
571 parm->moddelay = 0xbfff; in setup_voice()
572 pitch = (HI_BYTE(parm->pefe) << 4) + vp->apitch; in setup_voice()
576 vp->ftarget = parm->cutoff + LO_BYTE(parm->pefe); in setup_voice()
577 LIMITVALUE(vp->ftarget, 0, 255); in setup_voice()
578 vp->ftarget <<= 8; in setup_voice()
580 vp->ftarget = parm->cutoff; in setup_voice()
581 vp->ftarget <<= 8; in setup_voice()
582 pitch = vp->apitch; in setup_voice()
587 vp->ptarget = 1 << (pitch >> 12); in setup_voice()
588 if (pitch & 0x800) vp->ptarget += (vp->ptarget*0x102e)/0x2710; in setup_voice()
589 if (pitch & 0x400) vp->ptarget += (vp->ptarget*0x764)/0x2710; in setup_voice()
590 if (pitch & 0x200) vp->ptarget += (vp->ptarget*0x389)/0x2710; in setup_voice()
591 vp->ptarget += (vp->ptarget >> 1); in setup_voice()
592 if (vp->ptarget > 0xffff) vp->ptarget = 0xffff; in setup_voice()
594 vp->ptarget = 0xffff; in setup_voice()
596 if (LO_BYTE(parm->modatkhld) >= 0x80) { in setup_voice()
597 parm->modatkhld &= ~0xff; in setup_voice()
598 parm->modatkhld |= 0x7f; in setup_voice()
602 vp->vtarget = 0; in setup_voice()
604 if (LO_BYTE(parm->volatkhld) >= 0x80 && parm->voldelay >= 0x8000) { in setup_voice()
605 parm->voldelay = 0xbfff; in setup_voice()
606 vp->vtarget = voltarget[vp->avol % 0x10] >> (vp->avol >> 4); in setup_voice()
610 if (LO_BYTE(parm->volatkhld) >= 0x80) { in setup_voice()
611 parm->volatkhld &= ~0xff; in setup_voice()
612 parm->volatkhld |= 0x7f; in setup_voice()
639 calc_pan(struct snd_emux_voice *vp) in calc_pan() argument
641 struct snd_midi_channel *chan = vp->chan; in calc_pan()
645 if (vp->reg.fixpan > 0) /* 0-127 */ in calc_pan()
646 pan = 255 - (int)vp->reg.fixpan * 2; in calc_pan()
648 pan = chan->control[MIDI_CTL_MSB_PAN] - 64; in calc_pan()
649 if (vp->reg.pan >= 0) /* 0-127 */ in calc_pan()
650 pan += vp->reg.pan - 64; in calc_pan()
651 pan = 127 - (int)pan * 2; in calc_pan()
655 if (vp->emu->linear_panning) { in calc_pan()
657 if (pan != vp->apan) { in calc_pan()
658 vp->apan = pan; in calc_pan()
660 vp->aaux = 0xff; in calc_pan()
662 vp->aaux = (-pan) & 0xff; in calc_pan()
668 if (vp->apan != (int)pan_volumes[pan]) { in calc_pan()
669 vp->apan = pan_volumes[pan]; in calc_pan()
670 vp->aaux = pan_volumes[255 - pan]; in calc_pan()
683 * minimum when 255 (-96dB or silence).
686 /* tables for volume->attenuation calculation */
740 calc_volume(struct snd_emux_voice *vp) in calc_volume() argument
744 struct snd_midi_channel *chan = vp->chan; in calc_volume()
745 struct snd_emux_port *port = vp->port; in calc_volume()
747 expression_vol = chan->control[MIDI_CTL_MSB_EXPRESSION]; in calc_volume()
748 LIMITMAX(vp->velocity, 127); in calc_volume()
750 if (port->port_mode == SNDRV_EMUX_PORT_MODE_OSS_SYNTH) { in calc_volume()
751 /* 0 - 127 */ in calc_volume()
752 main_vol = chan->control[MIDI_CTL_MSB_MAIN_VOLUME]; in calc_volume()
753 vol = (vp->velocity * main_vol * expression_vol) / (127*127); in calc_volume()
754 vol = vol * vp->reg.amplitude / 127; in calc_volume()
762 main_vol = chan->control[MIDI_CTL_MSB_MAIN_VOLUME] * vp->reg.amplitude / 127; in calc_volume()
765 vol = voltab1[main_vol] + voltab2[vp->velocity]; in calc_volume()
767 vol += vp->reg.attenuation; in calc_volume()
768 vol += ((0x100 - vol) * expressiontab[expression_vol])/128; in calc_volume()
771 master_vol = port->chset.gs_master_volume; in calc_volume()
774 vol += port->volume_atten; in calc_volume()
777 if (chan->private) { in calc_volume()
778 struct snd_emux_effect_table *fx = chan->private; in calc_volume()
779 vol += fx->val[EMUX_FX_ATTEN]; in calc_volume()
784 if (vp->avol == vol) in calc_volume()
787 vp->avol = vol; in calc_volume()
789 && LO_BYTE(vp->reg.parm.volatkhld) < 0x7d) { in calc_volume()
791 if (vp->velocity < 70) in calc_volume()
794 atten = vp->velocity; in calc_volume()
795 vp->acutoff = (atten * vp->reg.parm.cutoff + 0xa0) >> 7; in calc_volume()
797 vp->acutoff = vp->reg.parm.cutoff; in calc_volume()
811 calc_pitch(struct snd_emux_voice *vp) in calc_pitch() argument
813 struct snd_midi_channel *chan = vp->chan; in calc_pitch()
817 if (vp->reg.fixkey >= 0) { in calc_pitch()
818 offset = (vp->reg.fixkey - vp->reg.root) * 4096 / 12; in calc_pitch()
820 offset = (vp->note - vp->reg.root) * 4096 / 12; in calc_pitch()
822 offset = (offset * vp->reg.scaleTuning) / 100; in calc_pitch()
823 offset += vp->reg.tune * 4096 / 1200; in calc_pitch()
824 if (chan->midi_pitchbend != 0) { in calc_pitch()
826 offset += chan->midi_pitchbend * chan->gm_rpn_pitch_bend_range / 3072; in calc_pitch()
830 * coarse = -8192 to 8192 (100 cent per 128) in calc_pitch()
831 * fine = -8192 to 8192 (max=100cent) in calc_pitch()
834 offset += chan->gm_rpn_coarse_tuning * 4096 / (12 * 128); in calc_pitch()
835 offset += chan->gm_rpn_fine_tuning / 24; in calc_pitch()
839 if (chan->private) { in calc_pitch()
840 struct snd_emux_effect_table *fx = chan->private; in calc_pitch()
841 if (fx->flag[EMUX_FX_INIT_PITCH]) in calc_pitch()
842 offset += fx->val[EMUX_FX_INIT_PITCH]; in calc_pitch()
847 offset += 0xe000 + vp->reg.rate_offset; in calc_pitch()
848 if (vp->emu->ops.get_pitch_shift) in calc_pitch()
849 offset += vp->emu->ops.get_pitch_shift(vp->emu); in calc_pitch()
851 if (offset == vp->apitch) in calc_pitch()
853 vp->apitch = offset; in calc_pitch()
865 switch (port->chset.midi_mode) { in get_bank()
867 val = chan->control[MIDI_CTL_MSB_BANK]; in get_bank()
870 return chan->control[MIDI_CTL_LSB_BANK]; in get_bank()
873 if (chan->drum_channel) in get_bank()
876 return chan->control[MIDI_CTL_MSB_BANK]; in get_bank()
879 if (chan->drum_channel) in get_bank()
881 return chan->control[MIDI_CTL_MSB_BANK]; in get_bank()
897 preset = chan->midi_program; in get_zone()
900 def_preset = port->ctrls[EMUX_MD_DEF_DRUM]; in get_zone()
904 def_bank = port->ctrls[EMUX_MD_DEF_BANK]; in get_zone()
907 return snd_soundfont_search_zone(emu->sflist, notep, vel, preset, bank, in get_zone()
917 struct snd_emux_voice *vp; in snd_emux_init_voices() local
921 spin_lock_irqsave(&emu->voice_lock, flags); in snd_emux_init_voices()
922 for (i = 0; i < emu->max_voices; i++) { in snd_emux_init_voices()
923 vp = &emu->voices[i]; in snd_emux_init_voices()
924 vp->ch = -1; /* not used */ in snd_emux_init_voices()
925 vp->state = SNDRV_EMUX_ST_OFF; in snd_emux_init_voices()
926 vp->chan = NULL; in snd_emux_init_voices()
927 vp->port = NULL; in snd_emux_init_voices()
928 vp->time = 0; in snd_emux_init_voices()
929 vp->emu = emu; in snd_emux_init_voices()
930 vp->hw = emu->hw; in snd_emux_init_voices()
932 spin_unlock_irqrestore(&emu->voice_lock, flags); in snd_emux_init_voices()
941 spin_lock_irqsave(&emu->voice_lock, flags); in snd_emux_lock_voice()
942 if (emu->voices[voice].state == SNDRV_EMUX_ST_OFF) in snd_emux_lock_voice()
943 emu->voices[voice].state = SNDRV_EMUX_ST_LOCKED; in snd_emux_lock_voice()
945 dev_warn(emu->card->dev, in snd_emux_lock_voice()
947 voice, emu->voices[voice].state); in snd_emux_lock_voice()
948 spin_unlock_irqrestore(&emu->voice_lock, flags); in snd_emux_lock_voice()
959 spin_lock_irqsave(&emu->voice_lock, flags); in snd_emux_unlock_voice()
960 if (emu->voices[voice].state == SNDRV_EMUX_ST_LOCKED) in snd_emux_unlock_voice()
961 emu->voices[voice].state = SNDRV_EMUX_ST_OFF; in snd_emux_unlock_voice()
963 dev_warn(emu->card->dev, in snd_emux_unlock_voice()
965 voice, emu->voices[voice].state); in snd_emux_unlock_voice()
966 spin_unlock_irqrestore(&emu->voice_lock, flags); in snd_emux_unlock_voice()