pulseaudio issueshttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues2020-12-16T15:24:59Zhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1075Allow stream API to provide fixed-size requests without compromising latency2020-12-16T15:24:59ZArun RaghavanAllow stream API to provide fixed-size requests without compromising latencyCurrently, our users of our API need to make a choice between `PA_STREAM_EARLY_REQUESTS` which effectively gives `tlength + minreq` latency, or use `PA_STREAM_ADJUST_LATENCY` and have no real control over the size of data requested in th...Currently, our users of our API need to make a choice between `PA_STREAM_EARLY_REQUESTS` which effectively gives `tlength + minreq` latency, or use `PA_STREAM_ADJUST_LATENCY` and have no real control over the size of data requested in the callback..
Even with the former, we provide no guarantees w.r.t. the size of data requested in the API. It might be worth revisiting how we do this, or even providing some API to emulate a fixed-size callback, which other system audio APIs favour (I believe JACK does this, and likely macOS too).https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/797Sound output from all applications garbled when MuseScore is running2020-02-05T13:25:58ZJeremy VisserSound output from all applications garbled when MuseScore is running### Summary
Whenever I launch MuseScore (with native Pulse audio output enabled), all the audio coming out of my HDMI audio becomes garbled; even audio from other applications (e.g. VLC).
Closing MuseScore immediately restores audio ...### Summary
Whenever I launch MuseScore (with native Pulse audio output enabled), all the audio coming out of my HDMI audio becomes garbled; even audio from other applications (e.g. VLC).
Closing MuseScore immediately restores audio quality. Or, moving MuseScore to a different sound card (e.g. my non-HDMI sound card) also restores HDMI sound quality.
### Environment
- Fedora 31 (up-to-date as of 2019-01-19)
- PulseAudio 13.0 (pulseaudio-13.0-1.fc31.x86_64)
- MuseScore 3.3.4 (mscore-3.3.4-4.fc31.x86_64) configured to use native Pulse audio output in preferences
- AMD Radeon RX 580 with HDMI audio output to LG 27UD88-W
- 0d:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]
- (My motherboard also has a AMD Starship/Matisse HD Audio Controller which does *not* exhibit this problem. Only the HDMI audio is affected.)
- [pa-info.txt](/uploads/e7bf573c3f2c818daa2756a5234dd00b/pa-info.txt)
- [pa-log.txt](/uploads/ad8a2401fc3769074f43f3e8f7839f78/pa-log.txt)
### Steps to reproduce
([Video illustrating issue](https://photos.app.goo.gl/MXZLCS4Nv8a6cycW6))
1. Use HDMI audio (AMD Radeon Ellesmere HDMI Audio)
2. Start audio playing (e.g. with VLC)
Observe that audio output sounds fine
3. Open MuseScore (ensure it's configured for native Pulse audio output)
Audio becomes garbled, even without composing or playing any music in the application.
4. Close MuseScore
Audio returns to normal.
### What is the current *bug* behavior?
Audio becomes garbled while MuseScore is running.
### What is the expected *correct* behavior?
Audio stays normal, and all application audio is correctly mixed.Jeremy VisserJeremy Visserhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/785please migrate to the new Fedora translation platform2020-07-01T16:20:47ZJean-Baptisteplease migrate to the new Fedora translation platformHello, the Fedora project migrates its translation platform to Weblate [1].
This tool directly interact with your git repository, and requires us to know:
* [mandatory] which branch is your development branch?
* [mandatory] have you me...Hello, the Fedora project migrates its translation platform to Weblate [1].
This tool directly interact with your git repository, and requires us to know:
* [mandatory] which branch is your development branch?
* [mandatory] have you merged latest translation from Zanata and locked the project?
* [info] Weblate will handle updates when pot file changes, don't edit po files for this [2]
* [optional] what is the license of translation? (please use a code from https://spdx.org/licenses/)
* [optional] do you have any announcement/warning you would like to display to the translators? (it will be displayed in Weblate)
* [optional] do you need us to activate any specific checks? (this is a setting per component [3])
* [optional] do you need us to automatically detect new translation files? (typical usecase: website translation with one translation file per page)
Please note:
* For github and gitlab hosted projects, Weblate open pull request. For other project, you'll have to add a key to allow commits.
* In Weblate's vocable, one project is a group of component. Each component is a translation file. You can have many projects or many components or both.
* You can change your mind over time, just reach trans@lists.fedoraproject.org
[1] https://communityblog.fedoraproject.org/fedora-localization-platform-migrates-to-weblate/
[2] https://docs.weblate.org/en/latest/admin/continuous.html#avoiding-merge-conflicts
[3] https://docs.weblate.org/en/latest/user/checks.html#translation-checksRussell TreleavenRussell Treleavenhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/774Feature Request: Remove (or hide) port for a given card OR implement device f...2019-12-09T10:51:05ZMarcelo Marzola BossoniFeature Request: Remove (or hide) port for a given card OR implement device fallback priorityScenario:
I have a monitor and a TV constantly plugged in my desktop.
ALSA reports my monitor and my TV as audio sinks. (HDMI-2)
My monitor doesn't have speakers.(HDMI-1)
I switch to my TV and set it as default device (either by extendi...Scenario:
I have a monitor and a TV constantly plugged in my desktop.
ALSA reports my monitor and my TV as audio sinks. (HDMI-2)
My monitor doesn't have speakers.(HDMI-1)
I switch to my TV and set it as default device (either by extending the screen or by switching to TV only)
Problem: Whenever I switch screen to monitor only the TV audio becomes unavailable but instead of audio being routed to speakers it is being routed to my monitor)
Workaround: As a workaround I've commented alsa files to set monitor audio as disconnected (/usr/share/pulseaudio/alsa-mixer/paths/hdmi-output-0.conf - I've added state.unplugged = yes to Jack section)
Request: A request would be to have some module (udev-detect?) or some control command to hide undesired sinks.
Another solution would let user define the fallback device priority, like HDMI-2 > Headphone -> Speaker -> HDMI-0Russell TreleavenRussell Treleavenhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/765Feature: don't overlap music players2019-11-17T11:09:41ZR.Feature: don't overlap music playersA feature that is becoming widely used in mobile OSs such as Android and iOS is to pause currently playing music clients when a new one starts playing.
Originally at https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/470A feature that is becoming widely used in mobile OSs such as Android and iOS is to pause currently playing music clients when a new one starts playing.
Originally at https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/470Russell TreleavenRussell Treleavenhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/764pa-info only works with bash and coreutils2023-05-10T20:02:50ZRolf Eike Beerpa-info only works with bash and coreutilsSo this is not very useful on an embedded device without bash.
One (basically untested) suggestion is this:
```sh
function cards_get {
ls -d /proc/asound/card[0-9] 2>/dev/null |sed 's#^/proc/asound/card##'
}
```
The busybox ``...So this is not very useful on an embedded device without bash.
One (basically untested) suggestion is this:
```sh
function cards_get {
ls -d /proc/asound/card[0-9] 2>/dev/null |sed 's#^/proc/asound/card##'
}
```
The busybox ```ps``` does not know about "aux" arguments, and the ash shell does not work with arrays.Russell TreleavenRussell Treleavenhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/743Feature request: Loudness safety protection2022-02-10T12:00:08ZFederico CerattoFeature request: Loudness safety protectionBoth the master and application volumes might be set very high for a number of reasons.
(e.g. after listening to a very quiet recording, or due to applications changing the volumes automatically, user error)
Ideally something in PulseAu...Both the master and application volumes might be set very high for a number of reasons.
(e.g. after listening to a very quiet recording, or due to applications changing the volumes automatically, user error)
Ideally something in PulseAudio should measure the real output volume level and prevent sudden/loud noises.
This is mean to protect hearing as well as expensive audio equipment.
A dedicated control in pavucontrol or a line in the configuration file could be used to set the maximum level. Hopefully applications will not attempt at changing safety parameters.
Perhaps it should react to sudden volume increases (in addition to the instantaneous level) to give the user the time to react.
Thank you!Russell TreleavenRussell Treleavenhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/689Allow to split default.pa configuration file in multiple inside a directory2019-06-18T18:22:14ZFrancisco RamosAllow to split default.pa configuration file in multiple inside a directoryWhen reading this:
https://github.com/EHfive/pulseaudio-modules-bt/issues/33#issuecomment-500364600
I discovered that the current way of handling configuration relies on manually editing /etc/pulse/default.pa. Maybe it would be better t...When reading this:
https://github.com/EHfive/pulseaudio-modules-bt/issues/33#issuecomment-500364600
I discovered that the current way of handling configuration relies on manually editing /etc/pulse/default.pa. Maybe it would be better to allow something like it's done with xorg-server: having a /etc/pulse/default.pa.d/ directory allowing other packages to drop configuration files there. That would allow other apps to provide the configurations needed by them without messing with the default config provided by pulseaudio package
Thanks a lotRussell TreleavenRussell Treleavenhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/686Send sound over HDMI when connected2019-07-11T19:14:00ZjakoblmSend sound over HDMI when connectedPulseAudio is not able to automatically send the sound over HDMI, when my laptop is connected to an external monitor (TV) or back to internal speakers, when disconnected. I had to write a script to do this. I also tried the “module-switc...PulseAudio is not able to automatically send the sound over HDMI, when my laptop is connected to an external monitor (TV) or back to internal speakers, when disconnected. I had to write a script to do this. I also tried the “module-switch-on-connect” to get the sound over HDMI, but it doesn’t work. Please, fix it! Thank you!
**Enviroment:** Linux Mint 19.1 Cinnamon
**Laptop:** Lenovo Ideapad 110jakoblmjakoblmhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/679X11-bell not retriggerable2019-05-29T14:19:32ZTomas MudrunkaX11-bell not retriggerableI listen to music and work in terminal at the same time. Terminal sometimes generates X11 bell event (eg. everytime i hit autocompletion or end of the line). That is generaly a good thing and i like it. But pulseaudio handles this bell e...I listen to music and work in terminal at the same time. Terminal sometimes generates X11 bell event (eg. everytime i hit autocompletion or end of the line). That is generaly a good thing and i like it. But pulseaudio handles this bell event by playing the x11-bell sample and pauses all other streams while doing so. So it gets frustrating very quickly as i use music to help me focus on the work i do in terminal and when it suddenly pauses all the time, it's very disturbing and makes me the worst DJ in the office, lol.
Can you please make it so that X11 bell does not interrupt music playing on background?Russell TreleavenRussell Treleavenhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/678Extend output of `pactl list short sinks` with `volume`, `mutestate` and pote...2019-08-25T18:14:58ZTormenExtend output of `pactl list short sinks` with `volume`, `mutestate` and potentially `description`To allow effective scripting of pulseaudio the current implementation is only focused on **set**ting things, but not **get**ting things.
So my first idea was to add getter functions ( see #660 ).
But it would also be really nice to (...To allow effective scripting of pulseaudio the current implementation is only focused on **set**ting things, but not **get**ting things.
So my first idea was to add getter functions ( see #660 ).
But it would also be really nice to (potentially instead?) add all crucial information in ONE place in a consize format(!).
So I am suggesting to extend the output of `pactl list short sinks` with common and important sink-status information:
* `mute-state` : (muted|unmuted)
* `volume(s)` : *smart* volume indication: 1 value if all channels are the same (mostly!),
otherwise 1 value for each channel (e.g. 50L 50R 50F 50C ...)
* `default-sink` : not sure if this info is already given, but this is an important info as well
Potentially also:
* `description` : human readable name of sink
To avoid breaking existing parsing scripts these could be added to the end.TormenTormenhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/671Audio Mixing Causing Combinational Tone2021-10-06T18:16:06ZDanielAudio Mixing Causing Combinational Tone### Summary
I've recently tried to listen to 2 tones of different frequencies simultaneously. I've written about it on [this forum](https://forums.linuxmint.com/viewtopic.php?f=48&t=293881). To summarise, I've tried to listen to 4 kHz ...### Summary
I've recently tried to listen to 2 tones of different frequencies simultaneously. I've written about it on [this forum](https://forums.linuxmint.com/viewtopic.php?f=48&t=293881). To summarise, I've tried to listen to 4 kHz and 6 kHz sine wave tones with the same audio encoding settings and heard an overpowering 2 kHz tone over the 2 other tones, making it really difficult to pick out the individual tones. Same was experienced with 250 Hz and 300 Hz (but the sound of them together causes a strange fax-like tone at a lower frequency).
As in the forum post above, it seems as though this is the effect of the mixing formula (with clamping of the amplitude) (more on this on the forum)
### environment
`uname -a`: (too short to be worth a file)
Linux LINUX 4.18.0-18-generic #19~18.04.1-Ubuntu SMP Fri Apr 5 10:22:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
`aplay -l`:
[aplay_-l.txt](/uploads/ac699a492df1a72ebe7f330a5ff5bca2/aplay_-l.txt)
`arecord -l`: (too short to be worth a file)
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
`pactl info`:
[pactl_info.txt](/uploads/41016ec1d16c4a0203600fb74355bbbf/pactl_info.txt)
`pactl list`:
[pactl_list.txt](/uploads/667993134e9ce5ff25fd98d25d3d9a3c/pactl_list.txt)
`pulseaudio --version`: (too short to be worth a file)
pulseaudio 11.1
### Steps to reproduce
Already specified in the Summary, but the following 2 youtube videos were used (and more test cases on the forum specified above): [6000 Hz](https://www.youtube.com/watch?v=nyZhQj0k7-s) and [4000 Hz](https://www.youtube.com/watch?v=8uO_qYHTreU)
Test case 2: [250 Hz](https://www.youtube.com/watch?v=rqRDla4zIZs) and [300 Hz](https://www.youtube.com/watch?v=xUZ4hUdZ2e8)
### What is the current *bug* behavior?
A tone is heard overpowering the original 2 tones
### What is the expected *correct* behavior?
Both tones should be heard separately with the 3rd tone being barely audible and not overpowering the original requested 2 tones. This is what happens on Windows under the same conditions and on the only Mac I tested with (obviously different hardware, but the hardware is not the reason from what I've seen, it seems the issue is actually just the mixing formula used - including clamping)Russell TreleavenRussell Treleavenhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/664please tell users how to configure, install, debug, etc.2019-06-06T17:03:23Zarchenemiesplease tell users how to configure, install, debug, etc.I noticed that the PulseAudio repo doesn't have any instructions for how to configure, make, install, etc.
I guess it's fairly obvious to experienced users that one should try `./autogen.sh`.
However, I think this should be explained i...I noticed that the PulseAudio repo doesn't have any instructions for how to configure, make, install, etc.
I guess it's fairly obvious to experienced users that one should try `./autogen.sh`.
However, I think this should be explained in an INSTALL file.
I was looking for instructions on how to build PulseAudio with debugging symbols included in the output binaries, so that I could run it inside gdb.
I can probably figure it out, but I thought maybe this is the kind of thing that one finds at the top level of a project directory. Thanks.Russell TreleavenRussell Treleavenhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/661parecord, please add duration option2019-04-20T22:46:25Zarchenemiesparecord, please add duration optionPlease add a "duration" flag to `parecord` so that I can get the same functionality as `arecord`. Also see the arecord "samples" flag which allows the recording duration to be specified in samples.
Also please fix this very confusing se...Please add a "duration" flag to `parecord` so that I can get the same functionality as `arecord`. Also see the arecord "samples" flag which allows the recording duration to be specified in samples.
Also please fix this very confusing section in "parecord(1)":
--process-time=BYTES
Explicitly configure the process time, with a time
specified in bytes in the selected sample format. If
left out the server will pick the process time. Use
either this option or --process-time- msec, but not
both.
--process-time-msec=MSEC
Explicitly configure the process time, with a time
specified in miliseconds. If left out the server will
pick the process time. Use either this option or
--process-time, but not both.
In these lines, there are 8 occurrences of the term "process time", so it should probably be defined for the reader. Googling 'pulseaudio "process time"' takes me to this manual page, so it would actually be a great place to put the definition of the term. I would change the above lines to:
--process-time=BYTES
--process-time-msec=MSEC
Explicitly configure the process time in bytes or
milliseconds. The "process time" is [....]. By default the
server will pick the process time.
where '[....]' is replaced with the correct definition of the term (I still have no idea what it is).
Thanks.Russell TreleavenRussell Treleavenhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/660Wouldn't it be nice to allow `pactl get-sink-volume` ?2021-01-18T19:56:37ZTormenWouldn't it be nice to allow `pactl get-sink-volume` ?Dear pulseaudio Team,
there are these nice short commands to change and set the default sinks volume:
```
$ pactl set-sink-volume @DEFAULT_SINK@ +3%
$ pactl set-sink-volume @DEFAULT_SINK@ -3%
$ pactl set-sink-mute @DEFAULT_SINK@ toggle...Dear pulseaudio Team,
there are these nice short commands to change and set the default sinks volume:
```
$ pactl set-sink-volume @DEFAULT_SINK@ +3%
$ pactl set-sink-volume @DEFAULT_SINK@ -3%
$ pactl set-sink-mute @DEFAULT_SINK@ toggle
```
But what about if I want to /get/ the volume ?
Then I need to use awk, sed, grep etc... ?!
Currently I am dreaming of this to become possible:
`pactl get-sink-volume @DEFAULT_SINK@`
Don't you? ;)
Thanks a lot in advance for any feedback!
PS: Related issue:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/445
Even though I prefer my proposed solution to the same problem.Russell TreleavenRussell Treleavenhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/657please provide examples for all network protocols2019-04-28T22:06:03Zarchenemiesplease provide examples for all network protocolsPlease provide working examples for all network protocol modules (and all other modules).
I'm trying to set up my laptop so that it can play audio to the soundcard on a desktop, over my LAN. These are some observations I made:
1. There...Please provide working examples for all network protocol modules (and all other modules).
I'm trying to set up my laptop so that it can play audio to the soundcard on a desktop, over my LAN. These are some observations I made:
1. There is an example for doing this [here](https://www.willprice.org/2013/05/10/pulseaudio-network-streaming.html) which uses ZeroConf. I'm not sure if this works. The PulseAudio documentation should contain an example like this, both with and without ZeroConf. An example without ZeroConf is required so that people can know what is happening "behind the scenes" when you use ZeroConf.
2. There is an answer [here](https://unix.stackexchange.com/questions/470961/how-to-set-up-pulseaudio-remote-properly-and-securely) which suggests that you need a GUI called 'paprefs' where you can check or uncheck some authentication-related options before the above will work. If this additional configuration is necessary, then the PulseAudio documentation should explain that. It should also explain how to do it without the GUI.
3. I got sidetracked looking at 'module-simple-protocol-tcp'. There were two questions I couldn't answer with the documentation: what does this protocol suffer from, compared to the "native" protocol? (is it going to lack synching or just automatic format conversion or what?) And how do I create a PulseAudio sink which writes to a port on a remote server that is listening via this "simple" protocol?
Eventually I discovered that I can run this command locally:
pacmd load-module module-tunnel-sink server=192.168.1.24 sink=music_sink sink_name=remote_music_sink
to write to the native protocol socket I had created on my server with:
pacmd load-module module-native-protocol-tcp auth-ip-acl='127.0.0.1;192.168.0.0/24' auth-anonymous=1
4. It worked in the end, but it was too difficult for me as a user. A big part of this is due to the fact that pacmd doesn't print an error message when loading the module fails for some reason. But without changing the design of the system, much of the frustration could have been resolved with better documentation. For example the documentation of `module-native-protocol-tcp` should mention `module-tunnel-sink` and vice-versa. If the documentation had provided working examples of server and client setup (at the command-line level), then this information would have been present already. So I think providing examples should be the priority.
My last point might belong in a separate issue:
5. Ideally there should be documentation for all of these things, including working examples, installed on my computer when I install PulseAudio. Instead I have to look at this website <https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/> and there are no examples. Available online tutorials seem to suffer from not having a standard place to point people to for detailed documentation of the system. When the system was changing a lot, maybe it wasn't feasible to provide this. But now it seems stable enough that we can ask for all the essentials to be documented in standard places like manual pages. This would include all the command-line APIs.Russell TreleavenRussell Treleavenhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/655module-jack-sink: Make jack autoconnect port_name_pattern configurable2019-05-03T18:41:55Zsimpliciusmodule-jack-sink: Make jack autoconnect port_name_pattern configurableIt would be nice to have port_name_pattern configurable when loading the module.It would be nice to have port_name_pattern configurable when loading the module.Russell TreleavenRussell Treleavenhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/654Allow to set volume of non-active pulseaudio clients2020-05-22T05:37:12ZPablo BianchiAllow to set volume of non-active pulseaudio clientsCurrently, pulseaudio doesn't let you set the volume of non-active clients (AFAIK). After [several years from being asked here](https://askubuntu.com/q/44680/349837) a guy named Roland Haas [developed this project](https://github.com/rha...Currently, pulseaudio doesn't let you set the volume of non-active clients (AFAIK). After [several years from being asked here](https://askubuntu.com/q/44680/349837) a guy named Roland Haas [developed this project](https://github.com/rhaas80/pa_volume) to aim this particular issue (I filed there [a counterpart issue](https://github.com/rhaas80/pa_volume/issues/4)). I'm not sure if should be added to `pacmd`, `pactl`, `pavucontrol` or elsewhere but certainly would be neat to have it built-in in pulseaudio.
.Pablo BianchiPablo Bianchihttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/649how to set equalizer controls from command-line2019-03-25T19:13:42Zarchenemieshow to set equalizer controls from command-linePlease have a look at [this question](https://unix.stackexchange.com/questions/164476/how-to-control-equalizer-within-command-line) on Unix Stack Exchange.
Looking at the code for
src/modules/module-ladspa-sink.c
I see
.set_c...Please have a look at [this question](https://unix.stackexchange.com/questions/164476/how-to-control-equalizer-within-command-line) on Unix Stack Exchange.
Looking at the code for
src/modules/module-ladspa-sink.c
I see
.set_cb = set_algorithm_parameters
which suggests there is a way to set the parameters at runtime. However, I can't find any instructions for doing this from the command-line or from a library. If I could do it, then maybe I could load a LADSPA equalizer like `mbeq_1197` and control its parameters via this interface, thus ansering the SE question.
I believe that your already-excellent software would benefit from having this feature documented, or explained to users via help forums like Stack Exchange. Thank you.Russell TreleavenRussell Treleavenhttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/646feature request: pacmd and sink-input - too many numbers2019-03-28T08:01:10Zarchenemiesfeature request: pacmd and sink-input - too many numbersI want to do something like this:
pactl move-sink-input music music_normal
pactl move-sink-input music music_nighttime
However, move-sink-input only takes a sink number. So I have to do this instead:
pactl move-sink-input ...I want to do something like this:
pactl move-sink-input music music_normal
pactl move-sink-input music music_nighttime
However, move-sink-input only takes a sink number. So I have to do this instead:
pactl move-sink-input 5 music_normal
pactl move-sink-input 5 music_nighttime
In order to get the number 5, first I have to list all the modules and extract the associated sink_names:
$ pactl list modules | grep "Module\|sink_name"
Module #22
Argument: sink_name=hw1 device=hw:2 tsched=0 fixed_latency_range=yes fragments=1 fragment_size=15
Module #23
Argument: sink_name=hw2 device=hw:4 tsched=0 fixed_latency_range=yes fragments=1 fragment_size=15
Module #24
Argument: sink_name=combined slaves=1,2
Module #25
Argument: sink_name=noise master=combined
Module #26
Argument: sink_name=music_nighttime master=combined plugin=filter label=hpf control=300
Module #27
Argument: sink_name=music_normal master=combined
Module #28
Argument: sink_name=music master=music_nighttime
Module #29
Argument: sink_name=null
Module #30
Now that I have a module number (28) I can look up the sink input number associated with that module:
$ pactl list sink-inputs | grep 'Sink Input\|Owner'
Sink Input #0
Owner Module: 24
Sink Input #1
Owner Module: 24
Sink Input #2
Owner Module: 25
Sink Input #3
Owner Module: 26
Sink Input #4
Owner Module: 27
Sink Input #5
Owner Module: 28
Sink Input #7
Owner Module: 11
Sink Input #8
Owner Module: 11
This is very awkward.
Please let me know if there is a less awkward way to do it, but I also recommend documenting this use case and empowering the command-line syntax a bit and then updating the shell completion for `pacmd move-sink-input`.
By the way, my sinks these are connected using `module-remap-sink` with no channel remapping specified:
pactl load-module module-remap-sink sink_name=music master=music_nighttime
Is that the standard way to do it?
See vaguely related <https://stackoverflow.com/questions/39736580/look-up-pulseaudio-sink-input-index-by-property>.
It is great that these features exist in the first place, and that audio can be redirected on the fly and so on. Big improvement over ALSA. Thank you.Russell TreleavenRussell Treleaven