[pulseaudio-discuss] alternate-sample-rate and pavucontrol

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Wed Nov 12 07:26:48 PST 2014


On 11/11/14, 4:06 PM, Marcus van Dam wrote:
> 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?

If you are already running pavucontrol, chances a source becomes active 
to show the vu-meter on the 'input devices' tab. you should double-check 
with pacmd list-sources.
In general pavucontrol is known to get in the way to sink/source 
reconfiguration (and prevent them from going to idle due to the vumeter)
-Pierre



More information about the pulseaudio-discuss mailing list