aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/plugins/soundcard.py35
1 files changed, 28 insertions, 7 deletions
diff --git a/sos/plugins/soundcard.py b/sos/plugins/soundcard.py
index 0a01499c..0aec3282 100644
--- a/sos/plugins/soundcard.py
+++ b/sos/plugins/soundcard.py
@@ -12,23 +12,44 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-from sos.plugins import Plugin, RedHatPlugin
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
import os
-class soundcard(Plugin, RedHatPlugin):
+
+class Soundcard(Plugin):
""" Sound card information
"""
+ plugin_name = "soundcard"
+
def default_enabled(self):
return False
def setup(self):
- self.add_copy_specs([
- "/proc/asound/*",
- "/etc/alsa/*",
- "/etc/asound.*"])
+ self.add_copy_spec("/proc/asound/*")
self.add_cmd_output("lspci | grep -i audio")
self.add_cmd_output("aplay -l")
self.add_cmd_output("aplay -L")
self.add_cmd_output("amixer")
- self.add_cmd_output("lsmod | grep snd | awk '{print $1}'", suggest_filename = "sndmodules_loaded")
+ self.add_cmd_output("lsmod | grep snd | awk '{print $1}'",\
+ suggest_filename = "sndmodules_loaded")
+
+class RedHatSoundcard(Soundcard, RedHatPlugin):
+ """ Sound card information for RedHat distros
+ """
+
+ def setup(self):
+ super(RedHatSoundcard, self).setup()
+
+ self.add_copy_specs([
+ "/etc/alsa/*",
+ "/etc/asound.*"])
+
+class DebianSoundcard(Soundcard, DebianPlugin, UbuntuPlugin):
+ """ Sound card information for Debian/Ubuntu distros
+ """
+
+ def setup(self):
+ super(DebianSoundcard, self).setup()
+
+ self.add_copy_spec("/etc/pulse/*")