PATCH - mixer for ad1848 based sound cards.

Itai Nahshon (nahshon@actcom.co.il)
Sat, 24 Jan 1998 15:54:14 +0200


This is a multi-part message in MIME format.
--------------80310CF28E59E97049E00D68
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

If you own a soundcard and the driver for your souncard
uses ad1848.c please test this patch.

A small change that will affect almost all cards i that the mute
bit is used also for the left channel. Without that if I set the volume
to 0 (on a stereo channel) I still get signals on the left channel
but none on the right channel.

All other changes are for the OPTI 82C930/931 chip where some bits
in the mixer setting shifted one position. That is almost un-noticed
because the mixer works but with less accuracy.

Documets for all OPTI chips can be downloaded from their FTP
site ftp://ftp.opti.com.

Itai

-- 
Itai Nahshon   nahshon@actcom.co.il
        Also   nahshon@vnet.ibm.com
--------------80310CF28E59E97049E00D68
Content-Type: text/plain; charset=us-ascii; name="diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="diff"

diff -ruN linux-2.1-orig/drivers/sound/ad1848_mixer.h linux-2.1/drivers/sound/ad1848_mixer.h --- linux-2.1-orig/drivers/sound/ad1848_mixer.h Tue Sep 30 18:46:44 1997 +++ linux-2.1/drivers/sound/ad1848_mixer.h Tue Dec 23 02:57:16 1997 @@ -77,7 +77,7 @@ */ #define MIX_ENT(name, reg_l, pola_l, pos_l, len_l, reg_r, pola_r, pos_r, len_r, mute_bit) \ - {{reg_l, pola_l, pos_l, len_l}, {reg_r, pola_r, pos_r, len_r, mute_bit}} + {{reg_l, pola_l, pos_l, len_l, mute_bit}, {reg_r, pola_r, pos_r, len_r, mute_bit}} static mixer_ents ad1848_mix_devices[32] = { MIX_ENT(SOUND_MIXER_VOLUME, 27, 1, 0, 4, 29, 1, 0, 4, 8), @@ -125,18 +125,18 @@ * MIC is level of mic monitoring direct to output. Same for CD, LINE, etc. */ static mixer_ents c930_mix_devices[32] = { -MIX_ENT(SOUND_MIXER_VOLUME, 22, 1, 0, 5, 23, 1, 0, 5, 7), +MIX_ENT(SOUND_MIXER_VOLUME,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1, 4, 3, 1, 1, 4, 7),

--------------80310CF28E59E97049E00D68--