While performing tests on a USB audio DAC, I wanted to select a specific sample rate, but noticed that the only way to do so was by disabling anything that might get plugged on the sink (eg. running pavucontrol creates peak-detect elements, and I've seen it affect the sample rate selection) and playing sounds having that particular sample rate. Having the ability to force a sink sample rate (and sample type) would be quite practical in this particular (niche I admit) use case, I don't know if there are other relevant ones (testing of resamplers? defective sample rate on a device?).
You can force a particular sample rate on all sinks (no per-sink configuration support) by setting "default-sample-rate" and "alternate-sample-rate" to the same value in /etc/pulse/deamon.conf. I suppose it would be nice to be able to do the configuration in pavucontrol or other GUI without restarting pulseaudio, and to configure the sample rate on per-sink basis. I don't expect that the feature will be implemented any time soon, unfortunately (unless you write the code yourself).
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/184.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.