[pulseaudio-tickets] [Bug 46412] New: Need to obtain PA's sample rate
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Feb 21 12:00:58 PST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=46412
Bug #: 46412
Summary: Need to obtain PA's sample rate
Classification: Unclassified
Product: PulseAudio
Version: unspecified
Platform: x86 (IA32)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: alsa
AssignedTo: pulseaudio-bugs at lists.freedesktop.org
ReportedBy: Joerg-Cyril.Hoehle at T-Systems.com
QAContact: pulseaudio-bugs at lists.freedesktop.org
CC: lennart at poettering.net
Hi,
PA resamples everything, which is fine.
However there should be a means to find out the rate that PA itself uses to
drive the underlying device.
By contrast, plug:dmix resamples everything too. Yet when I use
snd_pcm_open("plug:dmix",0 , SND_PCM_NO_AUTO_RESAMPLE |
SND_PCM_NO_AUTO_CHANNELS | SND_PCM_NO_AUTO_FORMAT) it becomes trivial to find
out using e.g. snd_pcm_hw_params_get_rate that it is mixing at 48000 and solely
accepts S32_LE.
Currently, Wine does not manage to find out PA's rate. PA accepts each and
every format despite the above flags. As a result, Wine uses 48000 which PA
accepts and publishes this rate via the MMDevAPI interface. What then happens
is that MS apps resample all their sounds to 48000 for mmdevapi, which passes
that to ALSA->PA which resamples down to 44100 to drive the ALSA HW. That is a
gratuitous waste of the HW owner's resources.
Of course Wine could hard code 44100 when it detects "pulse", but that is a
hack. Any user could launch PA at a different rate AFAIK.
IMHO the alsa_plugins for PA should obey SND_PCM_NO_AUTO_* but I'm open for
suggestions. How to detect PA's rate from the ALSA side?
Thank you,
Jörg Höhle
--
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