[PC-BSD Testing] pcm-oss.conf

Kris Moore kris at pcbsd.org
Fri Aug 24 07:14:48 PDT 2012


On 08/24/2012 08:21, N V wrote:
> Hi.
>
> I've tested this script and only once. But that worked ok. I'll make more 
> testing with few PCs if available.
>
> Regards,
> Vans
>
> On 22 августа 2012 20:17:29 Kris Moore wrote:
>> On 08/21/2012 10:36, N V wrote:
>>> Hi.
>>>
>>> Where is //compat/linux/etc/alsa/pcm/pcm-oss.conf file for the linux
>>> apps. It has deafult device configured. I've got usb webcam with
>>> intergrated microphone (which appears as hda device). If I run skype, it
>>> doesn't know anything about it, because there is no entry in
>>> /compat/linux/etc/alsa/pcm/pcm-oss.conf but only default device. So I've
>>> got sound, but buddy on the other side doesn't hear me. If I make
>>> microphone hda device (pcm6 here) default one, I've got no sound in
>>> Skype of course, but buddy on the other side hears me. :)
>>>
>>> Well, imho, there is some ways to fix this:
>>> - pregenerate anough devices in pcm-oss.conf;
>>> - generate device list each time I change sound configuration;
>>> - generate pcm-oss.conf each time sound device configuration changes
>>> (using devd, for example).
>>>
>>> The last variant seems to be most user friendly and Plug'n'Play-like, but
>>> it introduces some kind of automagical staff which (personally) I don't
>>> like. But you may find it ok. Here is rough-and-ready prototype for this
>>> variant, it may be called by devfs attach/detach events, it may be like
>>> webcamd script: [code]
>>> #!/bin/sh
>>>
>>> PCM=`egrep -o 'pcm[0-9]+' /dev/sndstat | egrep -o '[0-9]+'`
>>> cat > /tmp/pcm-oss.conf <<EOF
>>> # pcm-oss plugin configuration
>>>
>>> pcm.oss {
>>>
>>>         type oss
>>>         device /dev/dsp
>>>         hint {
>>>         
>>>                 description "Open Sound System"
>>>         
>>>         }
>>>
>>> }
>>>
>>> ctl.oss {
>>>
>>>         type oss
>>>         device /dev/mixer
>>>         hint {
>>>         
>>>                 description "Open Sound System"
>>>         
>>>         }
>>>
>>> }
>>>
>>> EOF
>>>
>>> for NUM in $PCM; do
>>>
>>>   cat >> /tmp/pcm-oss.conf <<EOF
>>>
>>> pcm.oss${NUM} {
>>>
>>> 	type oss
>>> 	device /dev/dsp${NUM}
>>> 	hint {
>>> 	
>>> 		description "Open Sound System Unit ${NUM}"
>>> 	
>>> 	}
>>>
>>> }
>>>
>>> ctl.oss${NUM} {
>>>
>>> 	type oss
>>> 	device /dev/mixer${NUM}
>>> 	hint {
>>> 	
>>> 		description "Open Sound System Unit ${NUM}"
>>> 	
>>> 	}
>>>
>>> }
>>>
>>> EOF
>>>
>>> done
>>>
>>> mv /tmp/pcm-oss.conf /compat/linux/etc/alsa/pcm/pcm-oss.conf
>>>
>>> [/code]
>>>
>>> May be, it is not the time to integrate anything for the
>>> /compat/linux/etc/alsa/pcm/pcm-oss.conf, may be it's for the next
>>> release.
>>>
>>> Regards,
>>> Vans.
>>> _______________________________________________
>>> Testing mailing list
>>> Testing at lists.pcbsd.org
>>> http://lists.pcbsd.org/mailman/listinfo/testing
>> This looks helpful to make sure our Linux apps use the proper sound
>> configuration. Have you or anybody else tested this script yet on some
>> systems to see if it works as expected?
> _______________________________________________
> Testing mailing list
> Testing at lists.pcbsd.org
> http://lists.pcbsd.org/mailman/listinfo/testing

I did some testing here, and it looks like it works fine as a devd
script. I've added it for RC2, so we can do some further testing :)

-- 
Kris Moore
PC-BSD Software
iXsystems



More information about the Testing mailing list