mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
add script to collect information for bug reports
This commit is contained in:
parent
72d528c50c
commit
91fb54dab1
3 changed files with 83 additions and 1 deletions
|
|
@ -105,6 +105,7 @@ EXTRA_DIST = \
|
|||
daemon/systemd/user/pulseaudio.socket \
|
||||
utils/padsp.in \
|
||||
utils/qpaeq \
|
||||
utils/pa-info \
|
||||
daemon/pulseaudio.desktop.in \
|
||||
map-file \
|
||||
daemon/pulseaudio-system.conf \
|
||||
|
|
@ -189,7 +190,8 @@ endif
|
|||
# Utility programs #
|
||||
###################################
|
||||
|
||||
bin_SCRIPTS =
|
||||
bin_SCRIPTS = \
|
||||
utils/pa-info
|
||||
|
||||
if HAVE_ESOUND
|
||||
bin_SCRIPTS += esdcompat
|
||||
|
|
|
|||
|
|
@ -111,3 +111,5 @@ endif
|
|||
if dbus_dep.found() and fftw_dep.found()
|
||||
install_data('qpaeq', install_dir : bindir)
|
||||
endif
|
||||
|
||||
install_data('pa-info', install_dir : bindir)
|
||||
|
|
|
|||
78
src/utils/pa-info
Executable file
78
src/utils/pa-info
Executable file
|
|
@ -0,0 +1,78 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This file is part of PulseAudio.
|
||||
#
|
||||
# Copyright 2019 Russell Treleaven <rtreleaven@bunnykick.ca>
|
||||
#
|
||||
# PulseAudio is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# PulseAudio is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
export LC_ALL=C
|
||||
header='________________'
|
||||
function cards_get {
|
||||
local line
|
||||
local re='/proc/asound/card([0-9])'
|
||||
local cards=()
|
||||
while read -r line; do
|
||||
[[ $line =~ $re ]] && cards+="${BASH_REMATCH[1]} "
|
||||
done <<< "$(ls --directory /proc/asound/card[0-9])"
|
||||
echo $cards
|
||||
}
|
||||
function jacks_do {
|
||||
local cards=($(cards_get))
|
||||
for card in "${cards[@]}" ; do
|
||||
echo "card=$card"
|
||||
while read -r line; do
|
||||
[[ $line != "" ]] && amixer -c$card cget "$line";
|
||||
done <<< "$(amixer -c$card controls | grep Jack)"
|
||||
done
|
||||
}
|
||||
function alsa_info_do {
|
||||
alsa_info=$(which alsa-info.sh)
|
||||
[ $alsa_info ] || alsa_info=$(which alsa-info)
|
||||
[ $alsa_info ] || alsa_info='/usr/share/alsa-base/alsa-info.sh'
|
||||
[ -f $alsa_info ] && {
|
||||
$alsa_info --stdout
|
||||
return
|
||||
}
|
||||
echo "neither alsa-info.sh or alsa-info were found"
|
||||
}
|
||||
function pulseaudio_ps_do {
|
||||
ps aux | grep pulseaudio
|
||||
}
|
||||
function cmd_do {
|
||||
echo "$header"
|
||||
echo "> $1"
|
||||
$1
|
||||
}
|
||||
cmds=(
|
||||
'pulseaudio_ps_do'
|
||||
'which pulseaudio'
|
||||
'pidof pulseaudio'
|
||||
'pulseaudio --version'
|
||||
'pactl info'
|
||||
'pactl list'
|
||||
'cat /etc/pulse/daemon.conf'
|
||||
'cat /etc/pulse/client.conf'
|
||||
'cat /etc/pulse/default.pa'
|
||||
'cat /etc/pulse/system.pa'
|
||||
'ls -alt /dev/snd/*'
|
||||
'lsof /dev/snd/*'
|
||||
'jacks_do'
|
||||
'aplay -L'
|
||||
'arecord -L'
|
||||
'alsa_info_do'
|
||||
)
|
||||
for cmd in "${cmds[@]}" ; do
|
||||
cmd_do "$cmd"
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue