aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris J Arges <chris.j.arges@canonical.com>2013-04-12 16:26:42 -0500
committerChris J Arges <chris.j.arges@canonical.com>2013-04-12 16:26:42 -0500
commitee8f31756b8a1c9353e32eb90845a24a776be8bd (patch)
treed03be60fd259d730b587392da0388a0db40a5640
parentf8e624fd966d4e3349df907972acc15052ec8e28 (diff)
downloadsos-ee8f31756b8a1c9353e32eb90845a24a776be8bd.tar.gz
Enable soundcard plugin for Debian/Ubuntu.
-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/*")