-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PipeWire output plugin does not set sample rate #1283
Comments
|
First of all, why did you refuse to post your log? Second: can you explain how to do that, and what MPD is doing wrong?
... which gets passed to pw_stream_connect() here:MPD/src/output/plugins/PipeWireOutputPlugin.cxx Lines 412 to 422 in 771c460
Had you pasted your log, as I asked you to (but you refused), you would have seen that MPD's resampling code is disabled, and MPD passes whatever sample rate is in your source file to libpipewire. It is then libpipewire's decision to resample, if that really happens, no idea, you didn't post any data backing this up. My point is: MPD told libpipewire the audio format, and my idea is that's all that's needed to convince PipeWire to use that audio format. The decision to use another audio format is now outside of MPD. |
|
Is what you're asking even possible with PipeWire?
|
I didn't refuse anything, log did not contain anything that could be useful for the issue but contained lots of personal data I don't want to share and was not eager on filtering just to attach redundant log.
Where did I claim MPD resamples?
My point is: MPD didn't told libpipewire the audio format
It is, as mentioned in description both ALSA plugin provided by PipeWire, as well as PulseAudio server provided by PipeWire do it right.
I don't really know, I'm merely MPD user which tried out new PipeWire output and didn't see his DAC changing frequency. But anyway after quick look into ALSA plugin code I guess the missing piece is: After adding this prop sample rate is dynamic, though
|
Yes, you did refuse. And you just explained the reason. But let me judge what is useful and what is not.
You did not. But without implying that MPD resamples, your issue description doesn't make sense. If we had your log available, I could have explained to you.
What the ... are you trying to troll me? That makes no sense. And as long as we don't agree on certain very very basic facts, I can't help you.
I didn't find |
NODE_RATE is to suggest a new sample rate to the graph (ie, change the samplerate of everything, including the devices if that's possible). pw-top only shows the latency requested by the application, you can't see the requested samplerate. |
What kind of documentation would you like? expand the comment in https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/pipewire/keys.h#L160 ? Add examples? add a howto for these features? |
|
So... an application should always set both |
An explanation of what "requested rate of the graph" means, why an application would want to request a rate, why/when setting this is useful/helpful/necessary, how it relates to |
The reason is that other nodes (mostly filters) in the graph don't use a format with a samplerate but always follow the graph rate, so they should be able to suggest one. For pw-stream, I guess we could do this automatically based on the samplerate in the format (if any). |
It think I will make a chapter about pw-stream then with all this info. |
"RATE" column name got me confused. Indeed setting PW_KEY_NODE_LATENCY populates this column. Thanks. |
|
@jpalus Hi, Can you post your pipewire settings in mpd.conf please?, I am having trouble getting it to work. |
|
@leigh123linux I didn't do anything extraordinary with MPD configuration, just added: Together with small modification of it just works (after applying d5be8c7 linked to this issue of course). |
Thanks. I found the issue, mpd wasn't running as user. |
|
@wtay Does pipewire support DSD? Mpd has to convert it to PCM Alsa I added this to pipewire.conf |
|
PipeWire supports DSD since version 0.3.38, released a few weeks ago. MPD does not yet support that mode. I suggest opening a feature request issue here. |
Thanks. |
Bug report
Describe the bug
With new

pipewireoutput plugin inmpd 0.23sample rate is no longer set dynamically based on input file. When using ALSA as well as PulseAudio plugins, both backed by pipewire, sample rate is changed correctly.pw-topshows as ifmpddidn't setrate(value 0) hence device seems to always be set to default rate (48kHz) instead of matching rate from input file:Expected Behavior
Sample rate of output device matches input file.
Actual Behavior
Sample rate of output device remains constant.
Version
The text was updated successfully, but these errors were encountered: