[pulseaudio-discuss] Suggestions for enhancement of pulseaudio
lennart at poettering.net
Thu Oct 15 19:54:28 PDT 2009
On Wed, 07.10.09 13:26, stan (gryt2 at q.com) wrote:
> > > When pulse chooses its default configuration, it should query the
> > > sound device to determine the native rates and formats it supports,
> > > and choose one of them so it doesn't have to do resampling. I have
> > > an onboard NVIDIA CK8S chip that doesn't do 44100 natively, only
> > > 48000. Yet pulse is using 44100 as its default configuration for
> > > that device.
> > PA only uses native sampling rates. We always did, always will. We
> > explicitly disable resampling when opening the audio devices
> > (SND_PCM_NO_AUTO_RESAMPLE). We only resample if an application then
> > tries to connect to a sink with a non-matching sample spec.
> So that means that the default is only a suggestion. But unless I use
> the complex model, I have no way of knowing the actual default. It
> seems that to match pulseaudio and control resampling, the complex is
> the way to go.
Yes, exactly. For everything more polished, more optimized it is
recommended to use the full, complex API.
> I looked at the mainloop model as a simpler alternative to the
> threaded-mainloop, and giving it a time of -1 for the poll might do what
> I want, which is to control the loop myself by using nanosleep, perhaps
> in a separate thread that only deals with sending sound to
Urgs. nanosleep()s. Evil stuff. Don't do that. In times of laptops,
netbooks and mobile devices running Linux you really don't want
wakeups unless there's really something to do. Because that is the
most expensive thing you can do power-consumption-wise.
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
More information about the pulseaudio-discuss