Received: (at submit) by bugs.debian.org; 31 Jul 2000 18:41:21 +0000 From dz@cs.unitn.it Mon Jul 31 13:41:20 2000 Return-path: Received: from (nikita.dz.net) [213.192.16.21] by master.debian.org with esmtp (Exim 3.12 2 (Debian)) id 13JKV4-0004Jx-00; Mon, 31 Jul 2000 13:41:19 -0500 Received: (from dz@localhost) by nikita.dz.net (8.9.3/8.9.3/Debian 8.9.3-21) id UAA10427; Mon, 31 Jul 2000 20:24:55 +0200 From: Massimo Dal Zotto Message-Id: <200007311824.UAA10427@nikita.dz.net> Subject: oss driver doen't handle ViBRA16C IMIX control To: submit@bugs.debian.org Date: Mon, 31 Jul 2000 20:24:55 +0200 (MEST) CC: Alan.Cox@linux.org X-UIDL: b14681451f7ecb0e09c80a21ccacf7f4 X-Mailer: ELM [version 2.4ME+ PL66 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=ELM965067895-10169-0_ Content-Transfer-Encoding: 7bit Delivered-To: submit@bugs.debian.org --ELM965067895-10169-0_ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Package: kernel-source-2.2.17 Version: 2.2.17pre6-1 Hi, the sb_mixer of OSS 3.8s distributed with 2.2.x kernels has a bug in the handling of the SOUND_MIXER_IMIX (Input Monitor) control of the sb16. This register controls which input lines are directly connected to the output lines of the soundcard. The sb16_mix IMIX register is incorrectly declared as 1-bit, while it is actually a 5-bits register with the following bit meanings: 0x10 line left 0x08 line_right 0x04 cd left 0x02 cd right 0x01 microphone For example to listen line and cd inputs I must set the imix to 24+6. The imix control doesn't work at all with the standard driver, while with a patched kernel I can enable/disable the input monitor for any individual input channel. My soundcard is a Creative SoundBlaster ViBRA16C, pnpdump says: # Card 1: (serial identifier e5 ff ff ff ff 70 00 8c 0e) # Vendor Id CTL0070, No Serial Number (-1), checksum 0xE5. # Version 1.0, Vendor version 1.0 # ANSI string -->Creative ViBRA16C PnP<-- I understant that this is an old card and probably not widely used but it is very annoying having to recompile every new version of the kernel only for being able to control the mixer. The patch in the attachment fixes the bug. Please apply it. -- Massimo Dal Zotto +----------------------------------------------------------------------+ | Massimo Dal Zotto email: dz@cs.unitn.it | | Via Marconi, 141 phone: ++39-0461534251 | | 38057 Pergine Valsugana (TN) www: http://www.cs.unitn.it/~dz/ | | Italy pgp: finger dz@tango.cs.unitn.it | +----------------------------------------------------------------------+ --ELM965067895-10169-0_ Content-Type: text/plain Content-Disposition: inline; filename="/tmp/sb_mixer.patch" Content-Transfer-Encoding: quoted-printable --- drivers/sound/sb_mixer.c.orig Mon Aug 9 21:04:40 1999 +++ drivers/sound/sb_mixer.c Mon Jul 31 13:41:39 2000 @@ -109,7 +109,7 @@ MIX_ENT(SOUND_MIXER_LINE, 0x38, 7, 5, 0x39, 7, 5), MIX_ENT(SOUND_MIXER_MIC, 0x3a, 7, 5, 0x00, 0, 0), MIX_ENT(SOUND_MIXER_CD, 0x36, 7, 5, 0x37, 7, 5), -MIX_ENT(SOUND_MIXER_IMIX, 0x3c, 0, 1, 0x00, 0, 0), +MIX_ENT(SOUND_MIXER_IMIX, 0x3c, 4, 5, 0x00, 0, 0), MIX_ENT(SOUND_MIXER_ALTPCM, 0x00, 0, 0, 0x00, 0, 0), MIX_ENT(SOUND_MIXER_RECLEV, 0x3f, 7, 2, 0x40, 7, 2), /* Obsolete. Use IGAI= N */ MIX_ENT(SOUND_MIXER_IGAIN, 0x3f, 7, 2, 0x40, 7, 2), @@ -597,6 +597,13 @@ =20 case SOUND_MIXER_OUTSRC: ret =3D set_outmask(devc, val); + break; + + case SOUND_MIXER_IMIX: + val =3D *(int *) arg; + devc->levels[SOUND_MIXER_IMIX] =3D val & 0x1f; + sb_setmixer (devc, 0x3c, val); + return val; break; =20 default: --ELM965067895-10169-0_ --ELM965067895-10169-0_--