Date: Sat, 14 Nov 1998 22:58:02 +0900 (JST) From: sanpei@sanpei.org To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: i386/8684: [Patch] Sound only come out from left channel with SBPro/pcm0 Message-ID: <199811141358.WAA10827@lavender.sanpei.org>
next in thread | raw e-mail | index | archive | help
>Number: 8684 >Category: i386 >Synopsis: [Patch] Sound only come out from left channel with SBPro/pcm0 >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Nov 14 06:00:00 PST 1998 >Last-Modified: >Originator: MIHIRA Yoshiro >Organization: Keio UNIV. >Release: FreeBSD 3.0-RELEASE i386 >Environment: pcm0 driver under SoundBlasterPro mode I tested ESS1868 chip(with SounBlasterPro mode) and ESS688 chip. This problem is in 2.2-stable and 3.0-current source tree. >Description: Some one reported at FreeBSD-hardware mailing list, that ``The sound only come out of the left channel'' with ESS1868 chip and pcm0. Message-ID: <362E17BD.A41AD5BD@bellatlantic.net> If use VoxWare, it's fine, sound come out from both channel. Luigi's pcm0 driver use change_bits function which is originated from VoxWare driver. But ``change_bits'' was change from VoxWare as below. VoxWare:(/sys/i386/isa/sound/sb_mixer.c) 189: shift = (*iomap)[dev][chn].bitoffs - (*iomap)[dev][LEFT_CHN].nbits + 1; pcm0:(/sys/i386/isa/snd/sound.c) 1447: shift = (*t)[dev][chn].bitoffs /*- (*t)[dev][LEFT_CHN].nbits + 1*/; ~~ ~~ And also changed some header files. VoxWare for SoundBlaster 16:(/sys/i386/isa/sound/sb_mixer.h) 155: MIX_ENT(SOUND_MIXER_VOLUME, 0x30, 7, 5, 0x31, 7, 5), pcm0 for SoundBlaster 16:(/sys/i386/isa/snd/sbcard.h) 310: PMIX_ENT(SOUND_MIXER_VOLUME, 0x30, 3, 5, 0x31, 3, 5), ~ ~ A1 B1 C1 A2 B2 C3 A: port-offset B: bit-offset C: number of bits 1: left channel, 2: right channel [B of pcm0] = [B of VoxWare] - [C of Voxware] + 1; B1 of pcm0 = 3 = 7 - 5 + 1 But mixertable for SoundBlasterPro and sgnxpro(?) were not changed, there are still same as Voxware :-< VoxWare for SoundBlasterPro :(/sys/i386/isa/sound/sb_mixer.h) 121: MIX_ENT(SOUND_MIXER_VOLUME, 0x22, 7, 4, 0x22, 3, 4), pcm0 for SoundBlasterPro:(/sys/i386/isa/snd/sbcard.h) 267: PMIX_ENT(SOUND_MIXER_VOLUME, 0x22, 7, 4, 0x22, 3, 4), ~ ~ I think Luigi forgot to change these values. I made patch file and appended this send-pr. BTW, I think some files which are in /sys/i386/isa/snd/ are needed to add $Id$. >How-To-Repeat: probe SounBlasterPro compatible card with pcm0 and play back some sounds file. >Fix: --- sys/i386/isa/snd/sbcard.h.org Fri Nov 13 02:26:00 1998 +++ sys/i386/isa/snd/sbcard.h Sat Nov 14 21:49:16 1998 @@ -264,15 +264,15 @@ static u_char sb16_recmasks_R[SOUND_MIXER_NRDEVICES]; #else /* __SB_MIXER_C__ defined */ mixer_tab sbpro_mix = { - PMIX_ENT(SOUND_MIXER_VOLUME, 0x22, 7, 4, 0x22, 3, 4), + PMIX_ENT(SOUND_MIXER_VOLUME, 0x22, 4, 4, 0x22, 0, 4), PMIX_ENT(SOUND_MIXER_BASS, 0x00, 0, 0, 0x00, 0, 0), PMIX_ENT(SOUND_MIXER_TREBLE, 0x00, 0, 0, 0x00, 0, 0), - PMIX_ENT(SOUND_MIXER_SYNTH, 0x26, 7, 4, 0x26, 3, 4), - PMIX_ENT(SOUND_MIXER_PCM, 0x04, 7, 4, 0x04, 3, 4), + PMIX_ENT(SOUND_MIXER_SYNTH, 0x26, 4, 4, 0x26, 0, 4), + PMIX_ENT(SOUND_MIXER_PCM, 0x04, 4, 4, 0x04, 0, 4), PMIX_ENT(SOUND_MIXER_SPEAKER, 0x00, 0, 0, 0x00, 0, 0), - PMIX_ENT(SOUND_MIXER_LINE, 0x2e, 7, 4, 0x2e, 3, 4), - PMIX_ENT(SOUND_MIXER_MIC, 0x0a, 2, 3, 0x00, 0, 0), - PMIX_ENT(SOUND_MIXER_CD, 0x28, 7, 4, 0x28, 3, 4), + PMIX_ENT(SOUND_MIXER_LINE, 0x2e, 4, 4, 0x2e, 0, 4), + PMIX_ENT(SOUND_MIXER_MIC, 0x0a, 0, 3, 0x00, 0, 0), + PMIX_ENT(SOUND_MIXER_CD, 0x28, 4, 4, 0x28, 0, 4), PMIX_ENT(SOUND_MIXER_IMIX, 0x00, 0, 0, 0x00, 0, 0), PMIX_ENT(SOUND_MIXER_ALTPCM, 0x00, 0, 0, 0x00, 0, 0), PMIX_ENT(SOUND_MIXER_RECLEV, 0x00, 0, 0, 0x00, 0, 0) @@ -280,15 +280,15 @@ #ifdef __SGNXPRO__ mixer_tab sgnxpro_mix = { - PMIX_ENT(SOUND_MIXER_VOLUME, 0x22, 7, 4, 0x22, 3, 4), - PMIX_ENT(SOUND_MIXER_BASS, 0x46, 2, 3, 0x00, 0, 0), - PMIX_ENT(SOUND_MIXER_TREBLE, 0x44, 2, 3, 0x00, 0, 0), - PMIX_ENT(SOUND_MIXER_SYNTH, 0x26, 7, 4, 0x26, 3, 4), - PMIX_ENT(SOUND_MIXER_PCM, 0x04, 7, 4, 0x04, 3, 4), - PMIX_ENT(SOUND_MIXER_SPEAKER, 0x42, 2, 3, 0x00, 0, 0), - PMIX_ENT(SOUND_MIXER_LINE, 0x2e, 7, 4, 0x2e, 3, 4), - PMIX_ENT(SOUND_MIXER_MIC, 0x0a, 2, 3, 0x00, 0, 0), - PMIX_ENT(SOUND_MIXER_CD, 0x28, 7, 4, 0x28, 3, 4), + PMIX_ENT(SOUND_MIXER_VOLUME, 0x22, 4, 4, 0x22, 0, 4), + PMIX_ENT(SOUND_MIXER_BASS, 0x46, 0, 3, 0x00, 0, 0), + PMIX_ENT(SOUND_MIXER_TREBLE, 0x44, 0, 3, 0x00, 0, 0), + PMIX_ENT(SOUND_MIXER_SYNTH, 0x26, 4, 4, 0x26, 0, 4), + PMIX_ENT(SOUND_MIXER_PCM, 0x04, 4, 4, 0x04, 0, 4), + PMIX_ENT(SOUND_MIXER_SPEAKER, 0x42, 0, 3, 0x00, 0, 0), + PMIX_ENT(SOUND_MIXER_LINE, 0x2e, 4, 4, 0x2e, 0, 4), + PMIX_ENT(SOUND_MIXER_MIC, 0x0a, 0, 3, 0x00, 0, 0), + PMIX_ENT(SOUND_MIXER_CD, 0x28, 4, 4, 0x28, 0, 4), PMIX_ENT(SOUND_MIXER_IMIX, 0x00, 0, 0, 0x00, 0, 0), PMIX_ENT(SOUND_MIXER_ALTPCM, 0x00, 0, 0, 0x00, 0, 0), PMIX_ENT(SOUND_MIXER_RECLEV, 0x00, 0, 0, 0x00, 0, 0), >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811141358.WAA10827>