ports/devel/pwlib and multiple sound devices

Matthias Apitz matthias.apitz at oclc.org
Fri Jul 11 07:48:52 UTC 2008


El día Friday, July 11, 2008 a las 07:49:51AM +0200, Alexander Leidinger escribió:

> Quoting Rong-En Fan <rafan at freebsd.org> (from Sun, 6 Jul 2008 19:01:37 
> +0800):
> 
> >[please CC me, I don't subscribe multimedia@]
> >
> >Hi multimedia@,
> >
> >Sometime ago, I committed a patch in PR 122584 in order to make
> >Ekiga happy with other KDE applications. However, a user informed
> >me that the patch makes Ekiga to use only dsp0.
> >
> >According to sound(4), one should not directly use specific
> >sound device (i.e., dspX nor dsp). Since I'm not familiar with
> >the sound(4) framework. Can someone who is familiar with sound(4)
> >shed us some lights?
> 
> You should use '/dev/dsp' (or better, the user should be able to chose  
> which, but as long as you are not willing to implement such a feature  
> in the GUI, take /dev/dsp, as this will allow to let the admin of the  
> system set a default of which pcm device to use by default, in case of  
> more than one device).
> 
> Bye,
> Alexander.

The patch I have submitted to the code in SVN of
ptlib/plugins/sound_oss/sound_oss.cxx is:

#if defined P_FREEBSD
              // in FreeBSD the file name should be used via the
              // devfs(5) and
              // is just "/dev/dsp0" and devfs(5) takes care of virtual
              // channels,
              // like /dev/dsp0.0 /dev/dsp0.1 ...
              // everything else would conflict with other KDE apps
              // using the
              // audio
              devname = devdir + "dsp0";
              PTRACE(1, "OSS\tCollectSoundDevices FreeBSD devname set to devfs(5) name:" << devname );
#endif

and the man page of sound(4) says:

...
     The above device nodes are only created on demand through the dynamic
     devfs(5) clone handler.  Users are strongly discouraged to access them
     directly.  For specific sound card access, please instead use /dev/dsp or
     /dev/dsp%d.
     ^^^^^^^^^^

and it works fine with KDE sharing sound with all othe applications;
what is wrong with /dev/dsp0?

Thx

	matthias
-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <matthias.apitz at oclc.org> - w http://www.oclc.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/
«...una sola vez, que es cuanto basta si se trata de verdades definitivas.»
«...only once, which is enough if it has todo with definite truth.»
José Saramago, Historia del Cerca de Lisboa


More information about the freebsd-multimedia mailing list