Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on pulseaudio.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/pulseaudio.e>
#           or at <http://angg.twu.net/e/pulseaudio.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######




# «.debian-packages»	(to "debian-packages")
# «.mailing-list»	(to "mailing-list")
# «.pulseaudio-kill»	(to "pulseaudio-kill")
# «.pulseaudio»		(to "pulseaudio")
# «.pacmd»		(to "pacmd")
# «.dummy-output»	(to "dummy-output")
# «.pavucontrol»	(to "pavucontrol")
# «.email-2020mar03»	(to "email-2020mar03")
# «.pa-info»		(to "pa-info")




#####
#
# debian-packages
# 2020mar01
#
#####

# «debian-packages» (to ".debian-packages")
# (find-zsh "installeddebs | sort | grep pulseaudio")
# (find-zsh "availabledebs | sort | grep pulseaudio")
# (find-status   "pulseaudio")
# (find-vldifile "pulseaudio.list")
# (find-udfile   "pulseaudio/")
# (find-status   "pulseaudio-utils")
# (find-vldifile "pulseaudio-utils.list")
# (find-udfile   "pulseaudio-utils/")

# (find-fline "/etc/alsa/conf.d")
# (find-fline "/etc/alsa/conf.d" "50-pulseaudio.conf")
# (find-fline "/etc/alsa/conf.d" "99-pulse.conf")
# (find-fline "/usr/share/alsa/alsa.conf.d/pulse.conf")
# (find-fline "/usr/share/alsa/pulse-alsa.conf")

# (find-fline "/etc/dbus-1/system.d/pulseaudio-system.conf")
# (find-fline "/etc/pulse/daemon.conf")
# (find-fline "/etc/pulse/default.pa")
# (find-fline "/etc/pulse/system.pa")
# (find-fline "/lib/udev/rules.d/90-pulseaudio.rules")
# (find-man "5 pulse-daemon.conf")



#####
#
# mailing-list
# 2020mar01
#
#####

# «mailing-list» (to ".mailing-list")
# https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Community/
# https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
# https://lists.freedesktop.org/archives/pulseaudio-discuss/



#####
#
# pulseaudio-kill
# 2020mar01
#
#####

# «pulseaudio-kill» (to ".pulseaudio-kill")
# (find-es "alsa" "email-2020feb29")

Hi,

Subdevices: 0/1 means that something was currently using that sound
device when you did aplay -l. I think it's likely that pulseaudio is
your problem.

Try doing pulseaudio --kill before running your test.


Hi Patrick,

when I kill it it gets started again. By running pstree I can see that
its parent process is systemd, but I've spend the last 20 minutes
grepping the /etc/ directory looking for who starts pulseaudio and how
to stop it cleanly and I haven't found much yet... there are two
entries with "pulse" in their names in /etc/alsa/conf.d/, but they are
in a strange syntax. If you have any further hints I'll be grateful -
especially because I won't have much time for hacking in the next
three days...

  Cheers =\,
    Eduardo Ochs





# (find-sh "pstree")


# (find-man "1 pulseaudio")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
pulseaudio --help
pulseaudio --version
pulseaudio --dump-conf
pulseaudio --dump-modules
pulseaudio --dump-resample-methods
pulseaudio --cleanup-shm
pulseaudio --start
pulseaudio --kill
pulseaudio --check

pulseaudio --start
ps ax | grep pulse
pulseaudio --start
ps ax | grep pulse
pulseaudio --kill
ps ax | grep pulse
pulseaudio --kill
ps ax | grep pulse

# (code-c-d "etc" "/etc/")
# (find-etcgrep "grep --color -nRHa --null -e pulseaudio *")
# (find-fline "/etc/rc2.d/" "S01mpd")





#####
#
# pulseaudio
# 2011may04
#
#####

# «pulseaudio»  (to ".pulseaudio")
# (find-es "alsa" "pulseaudio")
# https://wiki.ubuntu.com/PulseAudio
# http://www.pulseaudio.org
# http://www.pulseaudio.org/wiki/Daemon
# http://www.pulseaudio.org/wiki/FirstSteps
# http://www.pulseaudio.org/wiki/PerfectSetup
# http://www.pulseaudio.org/wiki/PerfectSetup#ALSAApplications
# http://www.pulseaudio.org/wiki/PerfectSetup#ESOUNDApplications
# http://www.pulseaudio.org/wiki/FAQ
# http://www.pulseaudio.org/wiki/CLI
# http://jackaudio.org/pulseaudio_and_jack
# (find-fline "/etc/pulse/")
# (find-fline "/etc/pulse/default.pa" "module-hal-detect")
# (find-sh "pstree")
# (find-sh "ps ax")




#####
#
# pacmd
# 2020mar01
#
#####

# «pacmd» (to ".pacmd")
# (find-angg ".emacs" "pulseaudio")
# (find-angg ".emacs" "pulseaudio" "eepitch-pacmd")
# (find-status   "pulseaudio-utils")
# (find-vldifile "pulseaudio-utils.list")
# (find-udfile   "pulseaudio-utils/")
# (find-man "1 pacmd")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
pacmd

# (find-pacmd "help")
# (find-pacmd "play-file /usr/share/sounds/question.wav 0")

* (eepitch-pacmd)
* (eepitch-kill)
* (eepitch-pacmd)
help
list-cards
list-sinks
play-file /usr/share/sounds/question.wav 0

list-modules
list-sources
list-clients
list-sink-inputs
list-source-outputs
list-cards
stat
info
load-module
unload-module
describe-module
set-sink-volume
set-sink-input-volume
set-source-volume
set-sink-mute
set-sink-input-mute
set-source-mute

# (find-man "pacmd")
# (find-man "pactl")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
echo list-modules | pacmd




sudo apt-get install libasound2-plugins "pulseaudio-*" paman padevchooser paprefs pavucontrol pavumeter

# (find-status   "paprefs")
# (find-vldifile "paprefs.list")
# (find-udfile   "paprefs/")
# (find-status   "padevchooser")
# (find-vldifile "padevchooser.list")
# (find-udfile   "padevchooser/")
# (find-man "1 padevchooser")

# (find-status   "pulseaudio-utils")
# (find-vldifile "pulseaudio-utils.list")
# (find-udfile   "pulseaudio-utils/")
pacmd

# (find-zsh "installeddebs | sort | grep pulse")
# (find-zsh "availabledebs | sort | grep pulse")
# (find-zsh "grep-available 'Source: pulseaudio'")
# (find-zsh "grep-available pulse")
# (find-zsh "grep-installed pulse")
# (find-zsh "grep-status pulse")

Package: libpulse-browse0
Package: libpulse-browse0-dbg
Package: libpulse-dev
Package: libpulse-mainloop-glib0
Package: libpulse-mainloop-glib0-dbg
Package: libpulse0
Package: libpulse0-dbg
Package: pulseaudio-dbg
Package: pulseaudio-esound-compat
Package: pulseaudio-esound-compat-dbg
Package: pulseaudio-module-bluetooth
Package: pulseaudio-module-bluetooth-dbg
Package: pulseaudio-module-gconf
Package: pulseaudio-module-gconf-dbg
Package: pulseaudio-module-hal
Package: pulseaudio-module-hal-dbg
Package: pulseaudio-module-jack
Package: pulseaudio-module-jack-dbg
Package: pulseaudio-module-lirc
Package: pulseaudio-module-lirc-dbg
Package: pulseaudio-module-raop
Package: pulseaudio-module-raop-dbg
Package: pulseaudio-module-x11
Package: pulseaudio-module-x11-dbg
Package: pulseaudio-module-zeroconf
Package: pulseaudio-module-zeroconf-dbg
Package: pulseaudio-utils
Package: pulseaudio-utils-dbg

pulse

libpulse-mainloop-glib0
libpulse0





#####
#
# dummy-output
# 2020mar01
#
#####

# «dummy-output» (to ".dummy-output")
# https://unix.stackexchange.com/questions/396487/how-i-can-fix-dummy-output-on-audio




#####
#
# pavucontrol
# 2020mar01
#
#####

# «pavucontrol» (to ".pavucontrol")
# (find-status   "pavucontrol")
# (find-vldifile "pavucontrol.list")
# (find-udfile   "pavucontrol/")
# (find-man "1 pavucontrol")
# https://freedesktop.org/software/pulseaudio/pavucontrol/

# (find-status   "pulseaudio")
# (find-vldifile "pulseaudio.list")
# (find-udfile   "pulseaudio/")
# (find-fline "/usr/share/pulseaudio/alsa-mixer/")
# (find-fline "/etc/alsa/conf.d/99-pulse.conf")





#####
#
# email-2020mar03
# 2020mar03
#
#####

# «email-2020mar03» (to ".email-2020mar03")
# (find-es "alsa" "email-2020feb29")
# https://lists.freedesktop.org/archives/pulseaudio-discuss/2020-March/031632.html
# https://mail.google.com/mail/ca/u/0/#sent/KtbxLwHPzVBHvWvbxQjRstjqQDhQcbMgdB
# "General PulseAudio Discussion" <pulseaudio-discuss@lists.freedesktop.org>
# No sound in one Debian 10 partition (and a debug script)

Hi all,

I have two Debian 10 partitions in my laptop, one that was a Debian 9
that I "apt-get dist-upgrade"d to Debian 10, and one in which Debian
10 was installed from scratch using an installation pen drive...

In the "dist-upgrade"d partition sound doesn't work and in the other
one it does, so let me call them the "bad partition" and the "good
partition".

I was guessing that the problem was in ALSA, and to test that I wrote
the script below, ran it in both partitions, and compared their
outputs:

  logthis () { echo $*:; eval $* 2>&1; echo; echo; }
  {
    # Debian version
    logthis cat /etc/issue
    logthis cat /etc/debian_version
    logthis cat /etc/os-release
    logthis lsb_release -da
    logthis hostnamectl

    # List devices and PCMs
    logthis aplay -l
    logthis aplay -L

    # Drivers and modules
    logthis "lspci -vvv | grep -A8 Audio"
    logthis "lspci -knn | grep -A2 Audio"

    # Permissions
    logthis groups
    logthis ls -lAF /proc/asound/

    # This partition
    logthis "mount | grep 'on / '"

    # ALSA state
    logthis "rm -f /tmp/o; /usr/sbin/alsactl -f /tmp/o store; cat /tmp/o"

  } | tee ~/oalsa

then I sent a long e-mail to the ALSA mailing list - this one:

  https://www.mail-archive.com/alsa-user@lists.sourceforge.net/msg32698.html

I got two answers. This one, by Kaj Persson, about MANY other sound
bugs in a dist-upgraded Debian 10,

  https://www.mail-archive.com/alsa-user@lists.sourceforge.net/msg32699.html

and another one, very brief, in private - and possibly sent from a
cell phone -, from Patrick May, saying that he thinks that "aplay -l"
gives me "Subdevices: 0/1" in the bad partition and "Subdevices: 1/1"
in the good partition because something - possibly pulseaudio - is
using one of the subdevices, and that I should try "pulseaudio
--kill"...

I tried to test Patrick's suggestion, but I found that when I kill a
pulseaudio process systemd starts a new one, and I spent about two
hours trying to find a clean way to kill pulseaudio without systemd
restarting it... I couldn't find a way, and the details overwhelmed
me, and my brain overheated! Sorry!... =(

If several people are having problems with sound on dist-upgraded
Debian 10s - note that "several" at this moment means "at least two"!
- then I think that it would be great to have a much bigger version of
the script above that would also make pulseaudio report lots of things
about its status. I can start working on that bigger script, but:

  1) *** ALL HINTS AND SUGGESTIONS ARE WELCOME ***,

  2) again: how do I kill pulseaudio? The most urgent thing now is to
     add a block like this to the script:

       logthis my-kill-pulseaudio
       logthis aplay -l
       logthis my-restart-pulseaudio


Thanks in advance!
  Eduardo Ochs
  http://angg.twu.net/
  http://angg.twu.net/emacsconf2019.html
    (^ on "executable notes")




#####
#
# pa-info
# 2020mar07
#
#####

# «pa-info» (to ".pa-info")
# https://lists.freedesktop.org/archives/pulseaudio-discuss/2020-March/031632.html edrx
# https://lists.freedesktop.org/archives/pulseaudio-discuss/2020-March/031634.html tanuk
# https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/master/src/utils/pa-info
# https://gitlab.freedesktop.org/pulseaudio/pulseaudio/
# (find-git-links "https://gitlab.freedesktop.org/pulseaudio/pulseaudio/" "pulseaudio")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# rm -Rfv ~/usrc/pulseaudio/
cd      ~/usrc/
git clone https://gitlab.freedesktop.org/pulseaudio/pulseaudio/
# warning: redirecting to https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git/
cd      ~/usrc/pulseaudio/

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (find-fline "~/usrc/")
# (find-fline "~/usrc/pulseaudio/")
# (find-gitk  "~/usrc/pulseaudio/")

# (code-c-d "pulseaudio" "~/usrc/pulseaudio/")
# (find-pulseaudiofile "")
# (find-pulseaudiosh "find * | sort")
# (find-pulseaudiofile "src/utils/")
# (find-pulseaudiofile "src/utils/pa-info")
# (find-pulseaudiofile "src/utils/pa-info" "which alsa-info")
# (find-fline "/usr/sbin/" "alsa-info")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
sudo ~/usrc/pulseaudio/src/utils/pa-info | tee opainfo

# (find-fline "/tmp/opainfo")
cp -v /tmp/opainfo ~/opainfo



Hi all,
Please note, the official IRC channel for PulseAudio has moved from
Freenode to OFTC.

We also have a Matrix room bridged to IRC.

Details at
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Community/#ircandmatrix


Combinar plugins em saĆ­da virtual do PulseAudio
https://forum.debxp.org/viewtopic.php?t=186

https://news.ycombinator.com/item?id=30611794 PipeWire: A year in review and a look ahead (collabora.com)
https://news.ycombinator.com/item?id=36108927 Easy Effects: Audio effects for PipeWire applications (github.com/wwmm)





#  Local Variables:
#  coding:               utf-8-unix
#  End: