[pulseaudio-discuss] Does pulseaudio resample when source and sink sample rate / bits are identical?
Joshua Redstone
redstone at gmail.com
Sat Jul 16 10:50:37 PDT 2011
Hi pulseaudio-discuss,
I'm running pulseaudio 0.9.22-24-g67d18 on Ubuntu 11.04, with a source at
"s16le 2ch 44100Hz" and a USB card that is configured the same way. I see
CPU usage at 25% - I would have thought that if the source/sink sample rates
are identical and there is nothing else going on in the system, that
pulseaudio would have no sample conversion work to do. Is there a setting
to get more info on what it's doing? I've tried 'pulseaudio -vv' and I see:
D: alsa-util.c: snd_pcm_dump():
D: alsa-util.c: Hardware PCM card 1 'USB Audio CODEC ' device 0 subdevice 0
D: alsa-util.c: Its setup is:
D: alsa-util.c: stream : CAPTURE
D: alsa-util.c: access : MMAP_INTERLEAVED
D: alsa-util.c: format : S16_LE
D: alsa-util.c: subformat : STD
D: alsa-util.c: channels : 2
D: alsa-util.c: rate : 44100
D: alsa-util.c: exact rate : 44100 (44100/1)
D: alsa-util.c: msbits : 16
D: alsa-util.c: buffer_size : 88200
D: alsa-util.c: period_size : 44100
D: alsa-util.c: period_time : 1000000
D: alsa-util.c: tstamp_mode : ENABLE
D: alsa-util.c: period_step : 1
D: alsa-util.c: avail_min : 87319
D: alsa-util.c: period_event : 0
D: alsa-util.c: start_threshold : -1
D: alsa-util.c: stop_threshold : 1445068800
D: alsa-util.c: silence_threshold: 0
D: alsa-util.c: silence_size : 0
D: alsa-util.c: boundary : 1445068800
D: alsa-util.c: appl_ptr : 0
D: alsa-util.c: hw_ptr : 0
and later on, when I play a stream:
I: sink-input.c: Created input 0 "ALSA Playback" on
alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00-default.analog-stereo
with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: sink-input.c: media.name = "ALSA Playback"
I: sink-input.c: application.name = "ALSA plug-in [chrome]"
I: sink-input.c: native-protocol.peer = "TCP/IP client from
192.168.0.200:46969"
I: sink-input.c: native-protocol.version = "16"
I: sink-input.c: application.process.id = "3722"
...
I: sink-input.c: application.process.binary = "chrome"
I: sink-input.c: window.x11.display = ":0.0"
I: sink-input.c: application.language = "en_US.UTF-8"
I: sink-input.c: application.process.machine_id =
"fa43ac05f22ed9742e52c9fc48d16edd"
I: sink-input.c: application.process.session_id =
"fa43ac05f22ed9742e52c9fc48d16edd-1310830453.452376-1268823141"
I: sink-input.c: module-stream-restore.id =
"sink-input-by-application-name:ALSA plug-in [chrome]"
I: protocol-native.c: Requested tlength=500.00 ms, minreq=20.00 ms
D: protocol-native.c: Early requests mode enabled, configuring sink latency
to minreq.
D: alsa-sink.c: Cutting sleep time for the initial iterations by half.
D: alsa-sink.c: Cutting sleep time for the initial iterations by half.
D: memblockq.c: memblockq requested: maxlength=4194304, tlength=88200,
base=4, prebuf=84672, minreq=3528 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=4194304, tlength=88200,
base=4, prebuf=84672, minreq=3528 maxrewind=0
I: protocol-native.c: Final latency 520.00 ms = 460.00 ms + 2*20.00 ms +
20.00 ms
.....
It seems like they match up exactly, or am I missing something?
Thanks,
Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110716/52fb4b01/attachment.htm>
More information about the pulseaudio-discuss
mailing list