Changing hw.snd.pcm0.buffersize in 4.10.

Nikolas Britton freebsd at nbritton.org
Tue Dec 14 14:46:19 PST 2004


Sandy Rutherford wrote:

>>>>>>On Mon, 13 Dec 2004 12:03:15 -0600, 
>>>>>>"Kevin D. Kinsey, DaleCo, S.P." <kdk at daleco.biz> said:
>>>>>>            
>>>>>>
>
> > 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.
>
> > in accordance with other variables in /boot/loader.help.
>
>
> > OTOH, there was a note in
>
> >     /sys/i386/isa/sound/sound_config.h
>
> >        (as of March) that refers to using "make config"
> > to change the DSP_BUFFERSIZE constant during, I assume,
> > the kernel build operation.  As I didn't start using
> > FreeBSD on the desktop until 5.2 came out, I can't
> > say that this is in anyway authoritative, and possibly
> > isn't even helpful, though....
>
>DSP_BUFFSIZE is not among the options that are setable in the kernel
>config file and any attempt to set it gives an error when config is
>run.  I'm guessing that the only way to change this is by hacking the
>header files in the kernel source.
>
>Thanks,
>Sandy
>
>  
>
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?)

stumbleine# more /dev/sndstat
FreeBSD Audio Driver (newpcm)
pcm0: <ESS 0 DSP> at io 0x220 irq 10 drq 1 bufsz 4096 (1p/1r/0v channels 
duplex)

also reading the man pages for loader.conf , loader.4th, loader, and 
reading LINT help a bit., also there is a "device.hints" under /boot 
that loader reads so I tried adding it there as 
hint.pcm.0.buffersize="16384" but this did not work, it did tho add it 
as a loader environment variable (used show at the loader prompt). I 
also tried setting at the loader prompt hw.snd.pcm0.buffersize=16384 and 
again no deal, also helpful was setting verbose_loading="YES" into 
loader.conf. in all here is everything I tried with loader.conf:

set hw.snd.pcm0.buffersize="3D16384"
sh sysctl hw.snd.pcm0.buffersize=16384
sysctl hw.snd.pcm0.buffersize=16384
set hw.snd.pcm0.buffersize="8192"
set hw.snd.pcm0.buffersize=8192
set hw.snd.pcm.0.buffersize="8192"
set hw.snd.pcm.0.buffersize=8192
hw.snd.pcm0.buffersize="8192"
hw.snd.pcm0.buffersize=8192
hint.pcm.0.buffersize="8192"

Id like to get some input from a kernel hack or guru, and maybe you 
should cross post this in the freebsd-multimedia, freebsd-hackers, 
and/or freebsd-hardware mailling lists and I can not find anything 
relevant in my google / google groups searches about this problem, at 
this point I think it would just be easyer to upgrade to 5.3 (your comp 
will handle it, I have it running on a dual PII 366 system) to set the 
stupid thing. this might help (but its for linux): 
http://www.geocities.com/Hollywood/3709/kernelhack.html

and this looks interesting: http://www.freebsd.org/cgi/query-pr.cgi?pr=5359

also the only stuff I can find about DSP_BUFFSIZE, buffer stuff is from 
Matthew Dillon (dillon at backplane.com), maybe you should give him a buzz


More information about the freebsd-questions mailing list