2.1.22-patch_drivers_sound-1

Keith Owens (kaos@ocs.com.au)
Sun, 26 Jan 1997 18:53:16 +1100


Repeat of part of a patch against 2.1.21, don't know why it was not
included in 2.1.22.

diff -ur linux-2.1.21.orig/drivers/sound/cs4232.c linux/drivers/sound/cs4232.c
--- linux-2.1.21.orig/drivers/sound/cs4232.c Fri Nov 15 19:15:13 1996
+++ linux/drivers/sound/cs4232.c Wed Jan 15 14:09:59 1997
@@ -25,8 +25,6 @@
#define KEY_PORT 0x279 /* Same as LPT1 status port */
#define CSN_NUM 0x99 /* Just a random number */

-static int *osp;
-
static void
CS_OUT (unsigned char a)
{
diff -ur linux-2.1.21.orig/drivers/sound/lowlevel/aci.c linux/drivers/sound/lowlevel/aci.c
--- linux-2.1.21.orig/drivers/sound/lowlevel/aci.c Fri Oct 25 20:06:35 1996
+++ linux/drivers/sound/lowlevel/aci.c Wed Jan 15 12:39:31 1997
@@ -292,7 +292,7 @@
int vol, ret;
unsigned param;

- param = get_user((int *) arg);
+ get_user(param, (int *) arg);
/* left channel */
vol = param & 0xff;
if (vol > 100) vol = 100;
@@ -313,13 +313,13 @@
static int
aci_mixer_ioctl (int dev, unsigned int cmd, caddr_t arg)
{
- int status, vol;
+ int status, vol, i;
unsigned char buf;

/* handle solo mode control */
if (cmd == SOUND_MIXER_PRIVATE1) {
- if (get_user((int *) arg) >= 0) {
- aci_solo = !!get_user((int *) arg);
+ if (get_user(i, (int *) arg) >= 0) {
+ aci_solo = !!i;
if (write_cmd(0xd2, aci_solo)) return -EIO;
} else if (aci_version >= 0xb0) {
if ((status = read_general_status()) < 0) return -EIO;
@@ -349,7 +349,8 @@
case SOUND_MIXER_LINE2: /* AUX2 */
return setvolume(arg, 0x3e, 0x36);
case SOUND_MIXER_IGAIN: /* MIC pre-amp */
- vol = get_user((int *) arg) & 0xff;
+ get_user(vol, (int *) arg);
+ vol &= 0xff;
if (vol > 100) vol = 100;
vol = SCALE(100, 3, vol);
if (write_cmd(0x03, vol)) return -EIO;