SB2 (and earlier) don't have a mixer [2.2.0-pre1-ac4 patch]

Nimrod Zimerman (zimerman@deskmail.com)
Fri, 1 Jan 1999 17:11:20 +0200


Hello.

Recently (2.2.0-pre1-ac3), an addition to the Sound Blaster support in the
kernel broke it for me. Here's why.

In sb_audio.c, when opening a device (sb_audio_open), the following line was
added:

ess_mixer_reload (devc, SOUND_MIXER_RECLEV);

This is fine, if you ignore the fact some cards don't have a mixer.

Below is a fix. I don't know how clean you would consider it, but it is
probably quite okay, unless SB_NO_MIXER means something aside of not having
a mixer.

It applies against 2.2.0-pre1-ac4, and should probably have no problems with
ac3 either.

--- linux/drivers/sound/sb_audio.c.ORIG Fri Jan 1 01:51:37 1999
+++ linux/drivers/sound/sb_audio.c Fri Jan 1 16:52:24 1999
@@ -67,7 +67,8 @@
devc->fullduplex = devc->duplex &&
((mode & OPEN_READ) && (mode & OPEN_WRITE));
sb_dsp_reset(devc);
- ess_mixer_reload (devc, SOUND_MIXER_RECLEV);
+ if (!(devc->caps & SB_NO_MIXER))
+ ess_mixer_reload (devc, SOUND_MIXER_RECLEV);

/* The ALS007 seems to require that the DSP be removed from the output */
/* in order for recording to be activated properly. This is done by */
--- linux/drivers/sound/sb_common.c.ORIG Fri Jan 1 15:43:43 1999
+++ linux/drivers/sound/sb_common.c Fri Jan 1 17:03:18 1999
@@ -955,6 +955,8 @@
if (!(devc->caps & SB_NO_MIXER))
if (devc->major == 3 || devc->major == 4)
sb_mixer_init(devc);
+ else
+ devc->caps |= SB_NO_MIXER;

#ifdef CONFIG_MIDI
if (!(devc->caps & SB_NO_MIDI))

Nimrod

-
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.tux.org/lkml/