[pulseaudio-discuss] alternate-sample-rate and pavucontrol
Marcus van Dam
marcus at marcusvandam.nl
Tue Nov 11 14:06:25 PST 2014
Hi,
Today I ran into an issue regarding alternate-sample-rate. Hooking up my
16/48 DAC, I was hoping to play back some 48Khz FLAC files.
With the defaults of:
default-sample-rate = 44100
alternate-sample-rate = 48000
This should be possible, PA should switch sample rates to 48000.
At this time I had `pavucontrol` open to switch the source to the right
sink, and adjust the volume. Using `pacmd list-sinks | grep sample` I
noticed that the sample rate is not changing, however if I flip output
profiles on the sink with pavucontrol it does.
Tracing the whole thing back it seems to come down to the following;
`pavucontrol` opens a source on the soundcard. Directly at startup of
`pavucontrol`:
source-output.c: Created output 0 "Peak detect" on
alsa_output.usb-Burr-Brown_from_TI_USB_Audio_DAC-00-DAC.iec958-stereo.monitor
with sample spec float32le 1ch 25Hz and channel map mono
source-output.c: media.name = "Peak detect"
source-output.c: application.name = "PulseAudio Volume Control"
Sample rate on startup is "s16le 2ch 44100Hz" as usual.
Now if I start the 48Khz source (mplayer: AO: [pulse] 48000Hz 2ch s16le
(2 bytes per sample)) the sample rate of the sink stays the same. With
the following in the debug log:
source.c: Cannot update rate, SOURCE_IS_RUNNING, will keep using 44100 Hz
I've read that _not_ switching sample rates on a sink with has streams
connected is expected behavior. However `pavucontrol` does not show any
streams connected, and only its internal "Peak detect" is connected to
the sink with no way to kick that one out.
Switching the profiles seems to temporary remove the sink, kicking even
the "Peak detect" out and therefore switching to 48Khz, but then again,
never back down to 44.1Khz.
So is this a little known caveat, did I encounter a bug, or is there a
better way to control PA keeping the alternate-sample-rate functionality?
--
Kind regards,
Marcus van Dam
More information about the pulseaudio-discuss
mailing list