I've been reading pulse-cli-syntax(5) and I don't understand what is the difference between 'suspend-sink' and 'kill-sink-input' and how they are used. Is it true that I use the former when I want to free a hardware device so I can open it from another sound server, and that I would use the latter command to stop a client from playing sound without killing its process? Will Pulseaudio just ignore any further samples that are sent by a client or sink input which has been "killed", or will the client get an error of some kind? Is there another manual page or document which describes these in more detail? What is the meaning of the argument to 'suspend-sink' and 'suspend' which is boolean? What is the difference between removing a client or sink, and removing it "forcibly" (as the manual page says is done by the "kill-" commands)? I think all of this should be documented in a place which is easy for new users to locate, such as the pulse-cli-syntax(5) man page or some document which is referenced by it. As it is, I find a lot of examples on the web invoking things like 'pacmd suspend true' and each time I read this stuff I go to your man page and find it frustratingly incomplete.
(In reply to Frederick Eaton from comment #0) > I've been reading pulse-cli-syntax(5) and I don't understand what is the > difference between 'suspend-sink' and 'kill-sink-input' and how they are > used. Is it true that I use the former when I want to free a hardware device > so I can open it from another sound server, and that I would use the latter > command to stop a client from playing sound without killing its process? > Will Pulseaudio just ignore any further samples that are sent by a client or > sink input which has been "killed", or will the client get an error of some > kind? You're correct about what suspending does. Killing a sink input will terminate that particular application stream. The application will get notified about the stream termination. The application isn't disconnected from pulseaudio, and it can create a new stream if it wants to (but more likely it will just be confused, because it's unusual for streams to die all of a sudden). > Is there another manual page or document which describes these in more > detail? > > What is the meaning of the argument to 'suspend-sink' and 'suspend' which is > boolean? > > What is the difference between removing a client or sink, and removing it > "forcibly" (as the manual page says is done by the "kill-" commands)? Normally clients themselves control when they disconnect themselves or terminate their streams. "Forcibly" refers to the client not being in control. > I think all of this should be documented in a place which is easy for new > users to locate, such as the pulse-cli-syntax(5) man page or some document > which is referenced by it. As it is, I find a lot of examples on the web > invoking things like 'pacmd suspend true' and each time I read this stuff I > go to your man page and find it frustratingly incomplete. You're right, at least the suspend commands have quite limited documentation in pulse-cli-syntax(5). I submitted a patch: https://patchwork.freedesktop.org/patch/215758/
Thank you Tanu, that looks good. I wasn't aware that there are separate 'pacmd' and 'pactl' man pages. I'm not sure what the difference is, it is not quite clear from the manual pages, the 'pactl' man page says "pactl only exposes a subset of the available operations. For the full set use the pacmd". But 'pactl' has some commands which are not in 'pulse-cli-syntax', like 'subscribe'. Also it is much more convenient to refer to 'pactl' than 'pacmd' because all the 'pacmd' arguments are documented in a separate man page ... anyway these are just some more observations. I'm sure there are lots of things to work on documentation-wise, thanks for taking the time to address my bug.
(In reply to Frederick Eaton from comment #2) > Thank you Tanu, that looks good. I wasn't aware that there are separate > 'pacmd' and 'pactl' man pages. > > I'm not sure what the difference is, it is not quite clear from the manual > pages, the 'pactl' man page says "pactl only exposes a subset of the > available operations. For the full set use the pacmd". But 'pactl' has some > commands which are not in 'pulse-cli-syntax', like 'subscribe'. Also it is > much more convenient to refer to 'pactl' than 'pacmd' because all the > 'pacmd' arguments are documented in a separate man page ... anyway these are > just some more observations. I'm sure there are lots of things to work on > documentation-wise, thanks for taking the time to address my bug. I didn't realize that the pactl man page recommends pacmd, that should be fixed... It should be the other way around, the pacmd man page should recommend people to use pactl instead, unless they really need the few commands and other things that are not currently provided by pactl. The reason why pactl is preferable (in addition to the reasons you listed) is that it behaves like any other pulseaudio client, while pacmd uses a different way to talk to the server, which breaks down on many less common setups.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/71.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.