All of lore.kernel.org
 help / color / mirror / Atom feed
From: maximilian attems <max@stro.at>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, maximilian attems <max@stro.at>,
	uwe_debbug@arcor.de
Subject: [PATCH] emux midi synthesizer doesn't honor SOFT_PEDAL-release event
Date: Thu,  8 May 2008 22:53:36 +0200	[thread overview]
Message-ID: <1210280016-14742-1-git-send-email-max@stro.at> (raw)

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.

The attached patch fixes this problem by analysing the value (0 or 127)
of the midi control event and resetting the effect register in case of a
release event. I'm not 100% sure if the code to reset the register is
correct but at least it works.

Original patch from "Uwe KrÃ#ger" <uwe_debbug@arcor.de>
Submitted to http://bugs.debian.org/474312

Cc: uwe_debbug@arcor.de
Signed-off-by: maximilian attems <max@stro.at>
---
 sound/synth/emux/emux_synth.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/sound/synth/emux/emux_synth.c b/sound/synth/emux/emux_synth.c
index 478369b..f81e081 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])
+			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;
 
-- 
1.5.5.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

             reply	other threads:[~2008-05-08 20:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08 20:53 maximilian attems [this message]
2008-05-09  7:33 ` [PATCH] emux midi synthesizer doesn't honor SOFT_PEDAL-release event Clemens Ladisch
  -- strict thread matches above, loose matches on Subject: below --
2008-05-09  8:44 maximilian attems
2008-05-09 10:48 ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1210280016-14742-1-git-send-email-max@stro.at \
    --to=max@stro.at \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    --cc=uwe_debbug@arcor.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.