From owner-freebsd-questions@FreeBSD.ORG Wed Dec 15 06:43:03 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F37AC16A4CE for ; Wed, 15 Dec 2004 06:43:02 +0000 (GMT) Received: from chello084114137224.1.15.vie.surfer.at (chello084114137224.1.15.vie.surfer.at [84.114.137.224]) by mx1.FreeBSD.org (Postfix) with SMTP id 888D143D2D for ; Wed, 15 Dec 2004 06:43:01 +0000 (GMT) (envelope-from 4711@chello.at) Received: (qmail 1104 invoked from network); 15 Dec 2004 06:43:00 -0000 Received: from matrix010.matrix.net (192.168.123.10) by ns.matrix.net with SMTP; 15 Dec 2004 06:43:00 -0000 From: Christian Hiris <4711@chello.at> To: freebsd-questions@freebsd.org Date: Wed, 15 Dec 2004 07:42:44 +0100 User-Agent: KMail/1.7 References: <16829.40585.759971.425967@szamoca.krvarr.bc.ca> <16831.6359.873230.920480@szamoca.krvarr.bc.ca> <41BF6D30.8070508@nbritton.org> In-Reply-To: <41BF6D30.8070508@nbritton.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200412150742.59900.4711@chello.at> cc: Nikolas Britton cc: Sandy Rutherford Subject: Re: Changing hw.snd.pcm0.buffersize in 4.10. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2004 06:43:03 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 14 December 2004 23:46, Nikolas Britton wrote: > Sandy Rutherford wrote: [...] > > > > > > I wonder if it wouldn't be: > > > > > > set hw.snd.pcm0.bufffersize=N > > > >This doesn't work either. No error --- it just ignores the setting. This only works, if the driver supports it. To load loader environmental variables something like TUNABLE_INT("hw.snd.pcmN.buffersize, &...) should show up in the driver code: % cd /usr/src/sys/dev/sound/ && cat `ls` | grep TUNABLE_ % cd /usr/src/sys/dev/sound/isa && cat `ls` | grep TUNABLE_ % cd /usr/src/sys/dev/sound/pci && cat `ls` | grep TUNABLE_ % cd /usr/src/sys/dev/sound/pcm && cat `ls` | grep TUNABLE_ TUNABLE_INT("hw.snd.targetirqrate", &chn_targetirqrate); TUNABLE_INT("hw.snd.verbose", &sndstat_verbose); TUNABLE_INT_DECL("hw.snd.verbose", 1, sndstat_verbose); TUNABLE_INT("hw.snd.unit", &snd_unit); TUNABLE_INT("hw.snd.maxautovchans", &snd_maxautovchans); % cd /usr/src/sys/dev/sound/usb && cat `ls` | grep TUNABLE_ This means only the tuneables hw.snd.targetirqrate, hw.snd.verbose, hw.snd.unit and hw.snd.maxautovchans are retrieved from the loader environment at boot time by the pcm driver. (I took this from the sources of the RELENG_*5* branch on my system) [...] > Yea, I got my old laptop out that has 4.10 on it and I was rooting > around in the src and found that, I tried everywitch way to get it to > work in the kernel file but It nerver did work (config always bitched at > me), I tried it also like this "make DSP_BUFFERSIZE=16384 depend && make > DSP_BUFFERSIZE=16384 && make DSP_BUFFERSIZE=16384 install". this did not > pruduce any errors but it didn't do anything ether, it skipped over the > sound stuff as if there was no change, also I tried hard coding it it in > sound_config.h but again same effect (maybe I did it wrong, i'm not a > programmer), maybe you have to do a "complete" rebuild of the kernel and > I did not try that because this laptop is only a P100 with 40MB Ram. > also I found refrences to "bufsz" from /dev/sndstat so I tried adding it > to the kernel config file like this "device sbc0 at isa? port 0x220 irq > 10 drq 1 bufsz 16384" and config didn't like that (I never tried it with > device pcm tho?) AFAIK the define is named DSP_BUFFSIZE (in src/sys/dev/sound/pcm/sound.h. DSP_BUFFSIZE can be used to define the default buffersize for sound drivers, but most of the sound drivers use their own defines. If you want to change the default buffersize for a sound driver you need to search for a define like xxx_BUFFSIZE, where xxx is the name of the sound driver (maybe some developers use other naming-conventions). ie., if you want to change the default buffersize of the ESS driver you need to change the line "#define ESS_BUFFSIZE (4096)" in src/sys/dev/sound/isa/ess.c. If you use the sbc driver, you need to do this changes in sb8.c or sb16.c, depending on the soundcard you are using. sbc.c is only the code for the corresponding bridge driver. However, I'm not a guru, so I can't guess, if a driver works better with any other buffer size defined, than the original one. - -- Christian Hiris <4711@chello.at> | OpenPGP KeyID 0x3BCA53BE OpenPGP-Key at hkp://wwwkeys.eu.pgp.net and http://pgp.mit.edu -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBv9zz09WjGjvKU74RAtNOAJ4wAZwaRAC3cGywvLB9fGftObId0ACdGGGh nCoW63okjf5L5LRPyidM2JA= =R3es -----END PGP SIGNATURE-----