* [PATCH] hda-analyzer: Make parsing code more robust against future proc file changes
@ 2013-02-07 13:47 David Henningsson
0 siblings, 0 replies; only message in thread
From: David Henningsson @ 2013-02-07 13:47 UTC (permalink / raw)
To: tiwai, perex, alsa-devel; +Cc: David Henningsson
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@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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-02-07 13:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-07 13:47 [PATCH] hda-analyzer: Make parsing code more robust against future proc file changes David Henningsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).