[pulseaudio-tickets] [Bug 46412] Need to obtain PA's sample rate

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Feb 22 11:57:56 PST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=46412

--- Comment #3 from Chris <chris.kcat at gmail.com> 2012-02-22 11:57:56 PST ---
I don't suppose it would be possible to make the 'pulse' plugin always use PA's
format, rate, and channels (excepting to make sure the channel order matches
what ALSA would usually give, as ALSA has no way to specify this itself), and
rely on the 'plug' plugin for format conversion, resampling, and remixing
channels?

In other words, apps would use "plug:pulse" (which should automatically obey
the SND_PCM_NO_AUTO_* flags) to output to PulseAudio with any
format/rate/channels, while just "pulse" would require float32 (or whatever is
most efficient to give to the mixer), and whatever rate and channels are being
used for the device. The "default" device override can use a plug->pulse chain
to keep compatibility with apps that expect more formats/rates/channels.

I think that would be best in keeping with ALSA's design, though I'm not sure
if messing with the pulse plugin like that would be a problem.

Another option may be to create the stream on snd_pcm_open with default
settings, restrict the 'hardware configuration space' depending on the
aforementioned flags, and recreate the stream when snd_pcm_hw_params is called
with the new format.


Just some ideas, anyway. Can't say I know enough about the internal workings of
these things to know for sure the best way to go.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the pulseaudio-bugs mailing list