ESS 1868 sound card probs and fix

Frank Gockel (gockel@sent13.uni-duisburg.de)
Sat, 11 Jul 1998 22:43:31 +0200 (MET DST)


Hello,

Recently I ran into some glitches with my ESS 1868 sound card and hacked the
driver of 2.0.34 a bit in order to get rid of them. Maybe some sound hackers
are interested in this :)

The MPU of the ESS sound card is not detected 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. Anyways, this diff fixes the problem.
----------------------BEGIN DIFF---------------------------------
--- sb_common.c.orig Sun Jun 14 10:39:02 1998
+++ 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 - FGZ 14JUN98 */
+ switch (hw_config->irq<0?-hw_config->irq:hw_config->irq)
{
case 9:
tmp = 0x4;
--------------------END DIFF-------------------------------------

Another problem is the microphone volume level. The ESS sound card has
different registers for left and right channels even for the microphone.
But all mixers I know just assume there's only the left channel register
which sets both left and right volume (yes most sound cards really behave
this way but the ESS just doesn't). As a result I always have annoying
feedback through the right channel and the microphone :((
This is in fact a user application problem that should be fixed in the
mixers. But there are too much. So this diff changes it in the kernel
and degrades the ESS to a SB card in respect of the microphone volume -
it just sets the right channel volume for the microphone always
identical to the left volume.
-------------------BEGIN DIFF------------------------------------
--- sb_mixer.c.orig Wed Aug 21 08:18:09 1996
+++ sb_mixer.c Sun Jun 14 22:13:58 1998
@@ -200,6 +200,7 @@
*/
}

+ if(dev==SOUND_MIXER_MIC)right=left; /* everyone assumes this */
change_bits (devc, &val, dev, RIGHT_CHN, right);

sb_setmixer (devc, regoffs, val);
-------------------END DIFF--------------------------------------

Frank

-
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