[alsa-devel] es18xx: Enable wavetable input from ESS chips

Krzysztof Helt krzysztof.h1 at poczta.fm
Wed Dec 26 23:48:37 CET 2007


From: Krzysztof Helt <krzysztof.h1 at wp.pl>

This patch enables wavetable chips ES689/ES69X connected to
ESS ES18xx chips. The wavetable chip uses FM DAC if the clock signal
from the wavetable is active.
It has no effect if there is no ESS wavetable chip present.

Signed-off-by: Krzysztof Helt <krzysztof.h1 at wp.pl>

---

This patch has a gotcha. In theory, the OPL synthesis or wavetable input should
use FM DAC depending on the active clock signal from the wavetable chip.
Unfortunately, the default state of the wavetable chip from ESS (ES689/ES690/ES692)
is to send clock signal all the time. This blocks OPL3 signal if the wavetable chip is 
present.

This problem can be solved with sysex command 4 send to the wavetable chip.
It sets the wavetable chip to auto-deactivate mode which switches the wavetable off
 if there are 5 seconds without midi input (according to the es1879 datasheet).

I tested this patch on the es1868 chip without the wavetable. The OPL3 synthesis
worked (no clock signal from the wavetable).

I tested it on the card with es1868 chip and es690 wavetable. The OPL3 synthesis
did not work, the wavetable worked. Both the OPL3 and wavetable worked if the
 sysex command 4 was sent to the wavetable chip (e.g. by amidi tool).

Is it ok to add this sysex command sending to the driver? How?
The wavetable clock signal can be detected (there is status bit which says if wavetable is
active).

Another question is about ES938 chip (bass, treble and 3D control) on the card.
This chip is controlled by sysex midi commands. It can be detected (by reading
settings with sysex commands). Is it possible to add this to the alsamixer or external tool
for setting these controls is recommended?

Regards,
Krzysztof

diff -urp linux-2.6.24/sound/isa/es18xx.c linux-new/sound/isa/es18xx.c
--- linux-2.6.24/sound/isa/es18xx.c	2007-12-25 23:23:03.000000000 +0100
+++ linux-new/sound/isa/es18xx.c	2007-12-26 16:30:08.000000000 +0100
@@ -1442,6 +1442,8 @@ static int __devinit snd_es18xx_initiali
 		snd_es18xx_write(chip, 0xB2, 0x50);
 		/* Enable MPU and hardware volume interrupt */
 		snd_es18xx_mixer_write(chip, 0x64, 0x42);
+		/* Enable ESS wavetable input */
+		snd_es18xx_mixer_bits(chip, 0x48, 0x10, 0x10);
 	}
 	else {
 		int irqmask, dma1mask, dma2mask;


----------------------------------------------------------------------
Rozdajemy nagrody! Wygraj samochod!

Sprawdz >> http://link.interia.pl/f1cb8




More information about the Alsa-devel mailing list