summaryrefslogtreecommitdiffstats
path: root/sound/synth
diff options
context:
space:
mode:
authormaximilian attems <max@stro.at>2008-05-09 13:43:09 +0200
committerTakashi Iwai <tiwai@suse.de>2008-05-13 14:47:43 +0200
commitbf91141d3565b35fb2a44364bfb874a3be3c12b6 (patch)
treece935acdf57873608f1edf82670b8ec4da97140c /sound/synth
parentc714a534d85576af21b06be605ca55cb2fb887ee (diff)
downloadlinux-bf91141d3565b35fb2a44364bfb874a3be3c12b6.tar.gz
linux-bf91141d3565b35fb2a44364bfb874a3be3c12b6.tar.bz2
linux-bf91141d3565b35fb2a44364bfb874a3be3c12b6.zip
[ALSA] emux midi synthesizer doesn't honor SOFT_PEDAL-release event
When the hardware wavetable synthesizer of an Creative SB Audigy or SB Live! card (with emu10k chip) receives the MIDI SOFT_PEADAL-press event (?? 67 127) the appropriate voice is attenuted. Unfortunately when the pedal is released (event ?? 67 0) the voice does not get it's original volume again. Boolean MIDI controls should interpret 0..63 as false and 64..127 as true. Thanks to Clemens Ladisch for review and correction. Original patch from "Uwe Kraeger" <uwe_debbug@arcor.de> Submitted to http://bugs.debian.org/474312 Signed-off-by: maximilian attems <max@stro.at> Cc: uwe_debbug@arcor.de Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/synth')
-rw-r--r--sound/synth/emux/emux_synth.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/synth/emux/emux_synth.c b/sound/synth/emux/emux_synth.c
index 478369bb38c3..b343818dbb96 100644
--- a/sound/synth/emux/emux_synth.c
+++ b/sound/synth/emux/emux_synth.c
@@ -341,8 +341,12 @@ snd_emux_control(void *p, int type, struct snd_midi_channel *chan)
case MIDI_CTL_SOFT_PEDAL:
#ifdef SNDRV_EMUX_USE_RAW_EFFECT
/* FIXME: this is an emulation */
- snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, -160,
+ if (chan->control[type] >= 64)
+ snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, -160,
EMUX_FX_FLAG_ADD);
+ else
+ snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, 0,
+ EMUX_FX_FLAG_OFF);
#endif
break;