<div dir="ltr"><div>Hi,</div><div><br></div><div>Below the result of the command "pacmd list".</div><div>Here without any change of resampling method.</div><div><br></div><div>Thanks</div><div><br></div><div>Memory blocks currently allocated: 10, size: 102.5 KiB.<br>Memory blocks allocated during the whole lifetime: 105406, size: 15.0 MiB.<br>Memory blocks imported from other processes: 5, size: 8.6 KiB.<br>Memory blocks exported to other processes: 2, size: 188 B.<br>Total sample cache size: 0 B.<br>Default sample spec: s16le 2ch 44100Hz<br>Default channel map: front-left,front-right<br>Default sink name: VAC<br>Default source name: VACmic<br>Memory blocks of type POOL: 5 allocated/101237 accumulated.<br>Memory blocks of type POOL_EXTERNAL: 0 allocated/0 accumulated.<br>Memory blocks of type APPENDED: 0 allocated/0 accumulated.<br>Memory blocks of type USER: 0 allocated/0 accumulated.<br>Memory blocks of type FIXED: 0 allocated/0 accumulated.<br>Memory blocks of type IMPORTED: 5 allocated/4169 accumulated.<br>21 module(s) loaded.<br>    index: 0<br>        name: <module-device-restore><br>   argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "Automatically restore the volume/mute state of devices"<br>               module.version = "12.2"<br>    index: 1<br>     name: <module-stream-restore><br>   argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "Automatically restore the volume/mute/device state of streams"<br>                module.version = "12.2"<br>    index: 2<br>     name: <module-card-restore><br>     argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "Automatically restore profile of cards"<br>               module.version = "12.2"<br>    index: 3<br>     name: <module-augment-properties><br>       argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "Augment the property sets of streams with additional static information"<br>              module.version = "12.2"<br>    index: 4<br>     name: <module-switch-on-port-available><br> argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "David Henningsson"<br>         module.description = "Switches ports and profiles when devices are plugged/unplugged"<br>               module.version = "12.2"<br>    index: 5<br>     name: <module-udev-detect><br>      argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "Detect available audio hardware and load matching drivers"<br>            module.version = "12.2"<br>    index: 6<br>     name: <module-native-protocol-unix><br>     argument: <><br>    used: -1<br>      load once: no<br> properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "Native protocol (UNIX sockets)"<br>               module.version = "12.2"<br>    index: 7<br>     name: <module-default-device-restore><br>   argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "Automatically restore the default sink and source"<br>            module.version = "12.2"<br>    index: 8<br>     name: <module-rescue-streams><br>   argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "When a sink/source is removed, try to move its streams to the default sink/source"<br>            module.version = "12.2"<br>    index: 9<br>     name: <module-always-sink><br>      argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Colin Guthrie"<br>             module.description = "Always keeps at least one sink loaded even if it's a null one"<br>            module.version = "12.2"<br>    index: 11<br>    name: <module-intended-roles><br>   argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "Automatically set device of streams based on intended roles of devices"<br>               module.version = "12.2"<br>    index: 12<br>    name: <module-suspend-on-idle><br>  argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "When a sink/source is idle for too long, suspend it"<br>          module.version = "12.2"<br>    index: 13<br>    name: <module-console-kit><br>      argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "Create a client for each ConsoleKit session of this user"<br>             module.version = "12.2"<br>    index: 14<br>    name: <module-systemd-login><br>    argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "Create a client for each login session of this user"<br>          module.version = "12.2"<br>    index: 15<br>    name: <module-position-event-sounds><br>    argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "Position event sounds between L and R depending on the position on screen of the widget triggering them."<br>             module.version = "12.2"<br>    index: 16<br>    name: <module-role-cork><br>        argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "Mute & cork streams with certain roles while others exist"<br>                module.version = "12.2"<br>    index: 17<br>    name: <module-filter-heuristics><br>        argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Colin Guthrie"<br>             module.description = "Detect when various filters are desirable"<br>            module.version = "12.2"<br>    index: 18<br>    name: <module-filter-apply><br>     argument: <><br>    used: -1<br>      load once: yes<br>        properties:<br>           module.author = "Colin Guthrie"<br>             module.description = "Load filter sinks automatically when needed"<br>          module.version = "12.2"<br>    index: 19<br>    name: <module-null-sink><br>        argument: <sink_name=VAC sink_properties=device.description=VAC><br>        used: 2<br>       load once: no<br> properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "Clocked NULL sink"<br>            module.version = "12.2"<br>    index: 20<br>    name: <module-remap-source><br>     argument: <master=VAC.monitor source_name=VACmic source_properties=device.description=VAC><br>      used: 1<br>       load once: no<br> properties:<br>           module.author = "Stefan Huber"<br>              module.description = "Virtual channel remapping source"<br>             module.version = "12.2"<br>    index: 21<br>    name: <module-cli-protocol-unix><br>        argument: <><br>    used: -1<br>      load once: no<br> properties:<br>           module.author = "Lennart Poettering"<br>                module.description = "Command line interface protocol (UNIX sockets)"<br>               module.version = "12.2"<br>1 sink(s) available.<br>  * index: 1<br>        name: <VAC><br>     driver: <module-null-sink.c><br>    flags: DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY<br>     state: RUNNING<br>        suspend cause: (none)<br> priority: 1000<br>        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB<br>            balance 0.00<br>      base volume: 65536 / 100% / 0.00 dB<br>   volume steps: 65537<br>   muted: no<br>     current latency: 0.41 ms<br>      max request: 0 KiB<br>    max rewind: 0 KiB<br>     monitor source: 1<br>     sample spec: s16le 2ch 44100Hz<br>        channel map: front-left,front-right<br>                Stereo<br>     used by: 1<br>    linked by: 2<br>  configured latency: 0.50 ms; range is 0.50 .. 2000.00 ms<br>      module: 19<br>    properties:<br>           device.description = "VAC"<br>          device.class = "abstract"<br>           device.icon_name = "audio-card"<br>2 source(s) available.<br>    index: 1<br>     name: <VAC.monitor><br>     driver: <module-null-sink.c><br>    flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY<br> state: RUNNING<br>        suspend cause: (none)<br> priority: 1000<br>        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB<br>            balance 0.00<br>      base volume: 65536 / 100% / 0.00 dB<br>   volume steps: 65537<br>   muted: no<br>     current latency: 0.00 ms<br>      max rewind: 0 KiB<br>     sample spec: s16le 2ch 44100Hz<br>        channel map: front-left,front-right<br>                Stereo<br>     used by: 1<br>    linked by: 1<br>  configured latency: 2000.00 ms; range is 0.50 .. 2000.00 ms<br>   monitor_of: 1<br> module: 19<br>    properties:<br>           device.description = "Monitor of VAC"<br>               device.class = "monitor"<br>            device.icon_name = "audio-input-microphone"<br>  * index: 2<br>  name: <VACmic><br>  driver: <module-remap-source.c><br> flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY<br> state: RUNNING<br>        suspend cause: (none)<br> priority: 1000<br>        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB<br>            balance 0.00<br>      base volume: 65536 / 100% / 0.00 dB<br>   volume steps: 65537<br>   muted: no<br>     current latency: 0.00 ms<br>      max rewind: 0 KiB<br>     sample spec: s16le 2ch 44100Hz<br>        channel map: front-left,front-right<br>                Stereo<br>     used by: 1<br>    linked by: 1<br>  configured latency: 2000.00 ms; range is 0.50 .. 2000.00 ms<br>   module: 20<br>    properties:<br>           device.master_device = "VAC.monitor"<br>                device.class = "filter"<br>             device.description = "VAC"<br>          device.icon_name = "audio-input-microphone"<br>9 client(s) logged in.<br>    index: 0<br> driver: <module-systemd-login.c><br>        owner module: 14<br>      properties:<br>           <a href="http://application.name">application.name</a> = "Login Session 9"<br>            systemd-login.session = "9"<br>    index: 1<br> driver: <module-systemd-login.c><br>        owner module: 14<br>      properties:<br>           <a href="http://application.name">application.name</a> = "Login Session 11"<br>           systemd-login.session = "11"<br>    index: 2<br>        driver: <protocol-native.c><br>     owner module: 6<br>       properties:<br>           <a href="http://application.name">application.name</a> = "The Sound Player"<br>           native-protocol.peer = "UNIX socket client"<br>         native-protocol.version = "32"<br>              <a href="http://application.process.id">application.process.id</a> = "15814"<br>          application.process.user = "vagrant"<br>                application.process.host = "debian10.localdomain"<br>           application.process.binary = "TheRecorder"<br>          application.language = "en_US.utf8"<br>         window.x11.display = ":0"<br>           application.process.machine_id = "c79df160d01f4c7780e6da0aaf5515c3"<br>         application.process.session_id = "9"<br>    index: 5<br>        driver: <protocol-native.c><br>     owner module: 6<br>       properties:<br>           <a href="http://application.name">application.name</a> = "The Sound Player"<br>           native-protocol.peer = "UNIX socket client"<br>         native-protocol.version = "32"<br>              <a href="http://application.process.id">application.process.id</a> = "15877"<br>          application.process.user = "vagrant"<br>                application.process.host = "debian10.localdomain"<br>           application.process.binary = "W3DClient"<br>            application.language = "en_US.utf8"<br>         window.x11.display = ":0"<br>           application.process.machine_id = "c79df160d01f4c7780e6da0aaf5515c3"<br>         application.process.session_id = "9"<br>    index: 6<br>        driver: <protocol-native.c><br>     owner module: 6<br>       properties:<br>           <a href="http://application.name">application.name</a> = "VLC media player (LibVLC 3.0.12)"<br>           native-protocol.peer = "UNIX socket client"<br>         native-protocol.version = "32"<br>              <a href="http://application.id">application.id</a> = "org.VideoLAN.VLC"<br>               application.version = "3.0.12"<br>              application.icon_name = "vlc"<br>               application.language = "en_US.utf8"<br>         <a href="http://application.process.id">application.process.id</a> = "15877"<br>          application.process.user = "vagrant"<br>                application.process.host = "debian10.localdomain"<br>           application.process.binary = "W3DClient"<br>            window.x11.display = ":0"<br>           application.process.machine_id = "c79df160d01f4c7780e6da0aaf5515c3"<br>         application.process.session_id = "9"<br>    index: 7<br>        driver: <protocol-native.c><br>     owner module: 6<br>       properties:<br>           <a href="http://application.name">application.name</a> = "VLC media player (LibVLC 3.0.12)"<br>           native-protocol.peer = "UNIX socket client"<br>         native-protocol.version = "32"<br>              <a href="http://application.id">application.id</a> = "org.VideoLAN.VLC"<br>               application.version = "3.0.12"<br>              application.icon_name = "vlc"<br>               application.language = "en_US.utf8"<br>         <a href="http://application.process.id">application.process.id</a> = "15877"<br>          application.process.user = "vagrant"<br>                application.process.host = "debian10.localdomain"<br>           application.process.binary = "W3DClient"<br>            window.x11.display = ":0"<br>           application.process.machine_id = "c79df160d01f4c7780e6da0aaf5515c3"<br>         application.process.session_id = "9"<br>    index: 8<br>        driver: <protocol-native.c><br>     owner module: 6<br>       properties:<br>           <a href="http://application.name">application.name</a> = "VLC media player (LibVLC 3.0.12)"<br>           native-protocol.peer = "UNIX socket client"<br>         native-protocol.version = "32"<br>              <a href="http://application.id">application.id</a> = "org.VideoLAN.VLC"<br>               application.version = "3.0.12"<br>              application.icon_name = "vlc"<br>               application.language = "en_US.utf8"<br>         <a href="http://application.process.id">application.process.id</a> = "15877"<br>          application.process.user = "vagrant"<br>                application.process.host = "debian10.localdomain"<br>           application.process.binary = "TheSoundPlayer"<br>               window.x11.display = ":0"<br>           application.process.machine_id = "c79df160d01f4c7780e6da0aaf5515c3"<br>         application.process.session_id = "9"<br>    index: 9<br>        driver: <protocol-native.c><br>     owner module: 6<br>       properties:<br>           <a href="http://application.name">application.name</a> = "Lavf58.20.100"<br>              native-protocol.peer = "UNIX socket client"<br>         native-protocol.version = "32"<br>              <a href="http://application.process.id">application.process.id</a> = "15985"<br>          application.process.user = "vagrant"<br>                application.process.host = "debian10.localdomain"<br>           application.process.binary = "ffmpeg"<br>               application.language = "C"<br>          window.x11.display = ":0"<br>           application.process.machine_id = "c79df160d01f4c7780e6da0aaf5515c3"<br>         application.process.session_id = "9"<br>    index: 10<br>       driver: <cli.c><br> owner module: 21<br>      properties:<br>           <a href="http://application.name">application.name</a> = "UNIX socket client"<br>0 card(s) available.<br>1 sink input(s) available.<br>    index: 1<br>       driver: <protocol-native.c><br>     flags: <br>       state: RUNNING<br>        sink: 1 <VAC><br>   volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB<br>            balance 0.00<br>      muted: no<br>     current latency: 47.01 ms<br>     requested latency: 0.50 ms<br>    sample spec: s16le 2ch 44100Hz<br>        channel map: front-left,front-right<br>                Stereo<br>     resample method: (null)<br>       module: 6<br>     client: 5 <The Sound Player><br>    properties:<br>           <a href="http://media.name">media.name</a> = "playStream"<br>             <a href="http://application.name">application.name</a> = "The Sound Player"<br>           native-protocol.peer = "UNIX socket client"<br>         native-protocol.version = "32"<br>              <a href="http://application.process.id">application.process.id</a> = "15877"<br>          application.process.user = "vagrant"<br>                application.process.host = "debian10.localdomain"<br>           application.process.binary = "W3DClient"<br>            application.language = "en_US.utf8"<br>         window.x11.display = ":0"<br>           application.process.machine_id = "c79df160d01f4c7780e6da0aaf5515c3"<br>         application.process.session_id = "9"<br>                <a href="http://module-stream-restore.id">module-stream-restore.id</a> = "sink-input-by-application-name:The Sound Player"<br>2 source output(s) available.<br>    index: 0<br>     driver: <module-remap-source.c><br> flags: START_CORKED <br>  state: RUNNING<br>        source: 1 <VAC.monitor><br> volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB<br>            balance 0.00<br>      muted: no<br>     current latency: 0.00 ms<br>      requested latency: 2000.00 ms<br> sample spec: s16le 2ch 44100Hz<br>        channel map: front-left,front-right<br>                Stereo<br>     resample method: (null)<br>       owner module: 20<br>      properties:<br>           <a href="http://media.name">media.name</a> = "Remapped Stream"<br>                media.role = "filter"<br>               <a href="http://module-stream-restore.id">module-stream-restore.id</a> = "source-output-by-media-role:filter"<br>    index: 1<br> driver: <protocol-native.c><br>     flags: <br>       state: RUNNING<br>        source: 2 <VACmic><br>      volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB<br>            balance 0.00<br>      muted: no<br>     current latency: 0.50 ms<br>      requested latency: 2000.00 ms<br> sample spec: s16le 2ch 48000Hz<br>        channel map: front-left,front-right<br>                Stereo<br>     resample method: speex-float-1<br>        owner module: 6<br>       client: 9 <Lavf58.20.100><br>       properties:<br>           <a href="http://media.name">media.name</a> = "record"<br>         <a href="http://application.name">application.name</a> = "Lavf58.20.100"<br>              native-protocol.peer = "UNIX socket client"<br>         native-protocol.version = "32"<br>              <a href="http://application.process.id">application.process.id</a> = "15985"<br>          application.process.user = "vagrant"<br>                application.process.host = "debian10.localdomain"<br>           application.process.binary = "ffmpeg"<br>               application.language = "C"<br>          window.x11.display = ":0"<br>           application.process.machine_id = "c79df160d01f4c7780e6da0aaf5515c3"<br>         application.process.session_id = "9"<br>                <a href="http://module-stream-restore.id">module-stream-restore.id</a> = "source-output-by-application-name:Lavf58.20.100"<br>0 cache entrie(s) available.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 2 févr. 2021 à 02:31, Sean Greenslade <<a href="mailto:sean@seangreenslade.com">sean@seangreenslade.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, Jan 30, 2021 at 12:29:46PM +0100, Renaud GHIA wrote:<br>
> Hi,<br>
> <br>
> I use pulseaudio in a use case where the cpu usage is very high (30%) and<br>
> IHMO this is not normal.<br>
> I tried all the tricks to decrease the cpu load without success<br>
> (resampling-method etc...). The cpu remains high.<br>
> <br>
> My use case is simple. I redirect the sound output of an application to the<br>
> sound input of another application (in this case ffmpeg). I load two<br>
> modules to create my virtual audio cable like this:<br>
> <br>
> pactl load-module module-null-sink sink_name=VAC_spk<br>
> sink_properties=device.description=VAC<br>
> <br>
> pactl load-module module-remap-source master=VAC_spk.monitor<br>
> source_name=VAC1_mic source_properties=device.description=VAC<br>
> <br>
> Everything works perfectly, except the cpu which is 30% for this simple use<br>
> case.<br>
> My cpu is a AMD threadripper and i'am with the latest stable release<br>
> pulseaudio 14.2 freshly compiled,<br>
> Do you know how to lower the CPU usage?<br>
<br>
Have you made sure that everything in the chain is operating at the same<br>
sample rate? That could be a cause of high CPU usage.<br>
<br>
Also, I've seen high CPU usage on my setups when I have a large number<br>
of pulse clients running and I open pavucontrol, since pavucontrol<br>
creates a source output for every client in order to display its VU<br>
meters.<br>
<br>
If neither of those are the cause, can you share the output of the<br>
command "pacmd list" when you're seeing high CPU usage? That might shed<br>
additional light on what's happening in your setup.<br>
<br>
--Sean<br>
<br>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org" target="_blank">pulseaudio-discuss@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br>
</blockquote></div>