]> err.no Git - linux-2.6/commitdiff
[ALSA] Fix emu10k1 synth problems.
authorTim <tedon@rogers.com>
Tue, 25 Oct 2005 09:10:55 +0000 (11:10 +0200)
committerJaroslav Kysela <perex@suse.cz>
Fri, 4 Nov 2005 12:20:13 +0000 (13:20 +0100)
Modules: EMU10K1/EMU10K2 driver,Common EMU synth

This patch fixes problems with voices cutting off or not
sounding at all.

Signed-off-by: Tim <tedon@rogers.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/emu10k1/emu10k1_callback.c
sound/synth/emux/emux_synth.c

index 7cf2f908eed9aa6ae5449593234df104672b37ed..6589bf24abcda1bbe540db08a0ddd9d30d50c1f4 100644 (file)
@@ -241,7 +241,7 @@ lookup_voices(snd_emux_t *emu, emu10k1_t *hw, best_voice_t *best, int active_onl
                else if (state == SNDRV_EMUX_ST_RELEASED ||
                         state == SNDRV_EMUX_ST_PENDING) {
                        bp = best + V_RELEASED;
-#if 0
+#if 1
                        val = snd_emu10k1_ptr_read(hw, CVCF_CURRENTVOL, vp->ch);
                        if (! val)
                                bp = best + V_OFF;
@@ -349,7 +349,7 @@ start_voice(snd_emux_voice_t *vp)
        }
 
        /* channel to be silent and idle */
-       snd_emu10k1_ptr_write(hw, DCYSUSV, ch, 0x0080);
+       snd_emu10k1_ptr_write(hw, DCYSUSV, ch, 0x0000);
        snd_emu10k1_ptr_write(hw, VTFT, ch, 0x0000FFFF);
        snd_emu10k1_ptr_write(hw, CVCF, ch, 0x0000FFFF);
        snd_emu10k1_ptr_write(hw, PTRX, ch, 0);
index 751bf1272af3bc77917d5ba3f66427ca76cdd09a..bd71b73be6571fecb3027952ec6c8a1d360c87f6 100644 (file)
@@ -171,7 +171,6 @@ snd_emux_note_off(void *p, int note, int vel, snd_midi_channel_t *chan)
                vp = &emu->voices[ch];
                if (STATE_IS_PLAYING(vp->state) &&
                    vp->chan == chan && vp->key == note) {
-                       vp->time = emu->use_time++;
                        vp->state = SNDRV_EMUX_ST_RELEASED;
                        if (vp->ontime == jiffies) {
                                /* if note-off is sent too shortly after