[alsa-devel] [PATCH] hda-analyzer: Make parsing code more robust against future proc file changes
David Henningsson
david.henningsson at canonical.com
Thu Feb 7 14:47:33 CET 2013
Historically, new additions to the codec proc file has crashed hda-analyzer.
With this patch, new additions will instead be ignored.
Signed-off-by: David Henningsson <david.henningsson at canonical.com>
---
hda-analyzer/hda_proc.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hda-analyzer/hda_proc.py b/hda-analyzer/hda_proc.py
index 3d544c8..10aa662 100644
--- a/hda-analyzer/hda_proc.py
+++ b/hda-analyzer/hda_proc.py
@@ -644,9 +644,8 @@ class HDACodecProc(HDACodec, HDABaseProc):
if line == 'Invalid AFG subtree':
print "Invalid AFG subtree for codec %s?" % self.proc_codec_id
return
- while line.startswith('Power-Map: ') or \
- line.startswith('Analog Loopback: '):
- print 'Sigmatel specific "%s" verb ignored for the moment' % line
+ while not line.startswith('Node '):
+ print 'Vendor specific "%s" verb ignored at the moment' % line
idx += 1
line = lines[idx].strip()
node = None
@@ -728,7 +727,7 @@ class HDACodecProc(HDACodec, HDABaseProc):
elif line.startswith(' Volume-Knob: '):
node.add_volknob(line[15:])
else:
- self.wrongfile(line)
+ print 'Node line "%s" ignored at the moment' % line
idx += 1
if idx < len(lines):
line = lines[idx]
--
1.7.9.5
More information about the Alsa-devel
mailing list