diff options
author | Oswald Buddenhagen <oswald.buddenhagen@gmx.de> | 2023-06-12 21:13:21 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-06-13 07:42:08 +0200 |
commit | e68235c8aae9af08a868e4a4337daf2bcb4f6a92 (patch) | |
tree | 8bcbf376db8a1f0ad30e8418798f5c24b2c79198 /sound/synth/emux | |
parent | ALSA: emu10k1: fix sample rates for E-MU cards at 44.1 kHz word clock (diff) | |
download | linux-e68235c8aae9af08a868e4a4337daf2bcb4f6a92.tar.xz linux-e68235c8aae9af08a868e4a4337daf2bcb4f6a92.zip |
ALSA: emu10k1: fix synthesizer pitch for E-MU cards at 44.1 kHz
This is only a very partial fix - the frequency-dependent envelope & LFO
register values aren't adjusted.
But I'm not sure they were even correct at 48 kHz to start with, as most
of them are precalculated by common code which assumes an EMU8K-specific
44.1 kHz word clock, and it seems somewhat unlikely that the hardware's
register interpretation was adjusted to compensate for the different
word clock.
In any case I'm not going to spend time on fixing that, as this code is
unlikely to be actually used by anyone today.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Link: https://lore.kernel.org/r/20230612191325.1315854-6-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/synth/emux')
-rw-r--r-- | sound/synth/emux/emux_synth.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/synth/emux/emux_synth.c b/sound/synth/emux/emux_synth.c index a5385efcedb6..075358a533a0 100644 --- a/sound/synth/emux/emux_synth.c +++ b/sound/synth/emux/emux_synth.c @@ -845,7 +845,8 @@ calc_pitch(struct snd_emux_voice *vp) /* 0xe000: root pitch */ offset += 0xe000 + vp->reg.rate_offset; - offset += vp->emu->pitch_shift; + if (vp->emu->ops.get_pitch_shift) + offset += vp->emu->ops.get_pitch_shift(vp->emu); LIMITVALUE(offset, 0, 0xffff); if (offset == vp->apitch) return 0; /* unchanged */ |