problems with Sound Blaster/ESS card and fixes

Frank Gockel (gockel@sent13.uni-duisburg.de)
Wed, 2 Sep 1998 22:21:19 +0200 (MET DST)


Hi,

Recently I ran into some problems with my SB compatible ESS 1868 sound card
and hacked the driver of 2.0.35 a bit in order to get rid of them. Maybe
some sound hackers are interested in it. This is indeed my second attempt
to fix those problems (the first one should go to /dev/null).

* The MPU of the ESS sound card is not found because of an IRQ problem.
This is obviously a kind of typo in the driver, as the SB driver routines
ignore the sign of the IRQ value but the ESS routines do not (and go
wrong). The sign of the IRQ value seems to have a special meaning, but I
don't know which.

* Another problem is the microphone volume level. The ESS sound card has
different registers for left and right channels even for the microphone.
I finally found that it's indeed a bug in the driver as it wrongly reports
the microphone as a mono device to a user program, e.g. a mixer. The bug
makes a mixer only see (and change) the left channel volume. As a result
I always have annoying feedback through the right channel and the
microphone :((

Anyways, the diff below fixes both problems at least for my sound card.
Maybe that's a thing to fix in 2.0.36 ?

Frank

--- linux/drivers/sound/sb_mixer.c.old Sat Aug 22 15:39:10 1998
+++ linux/drivers/sound/sb_mixer.c Sat Aug 22 15:40:51 1998
@@ -329,6 +329,8 @@
case SOUND_MIXER_STEREODEVS:
if (devc->model == MDL_JAZZ || devc->model == MDL_SMW)
return snd_ioctl_return ((int *) arg, devc->supported_devices);
+ else if(devc->model == MDL_ESS)
+ return snd_ioctl_return ((int *) arg, devc->supported_devices & ~(SOUND_MASK_SPEAKER));
else
return snd_ioctl_return ((int *) arg, devc->supported_devices & ~(SOUND_MASK_MIC | SOUND_MASK_SPEAKER));
break;
--- linux/drivers/sound/sb_common.c.orig Sun Jun 14 10:39:02 1998
+++ linux/drivers/sound/sb_common.c Sun Jun 14 11:21:38 1998
@@ -1057,8 +1057,9 @@
cfg |= tmp << 3;

tmp = 1; /* MPU enabled without interrupts */
-
- switch (hw_config->irq)
+ /* seems not supported (return 0 below) */
+ /* be sure to ignore sign of irq value here */
+ switch (hw_config->irq<0?-hw_config->irq:hw_config->irq)
{
case 9:
tmp = 0x4;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html