]> git.alsa-project.org Git - alsa.git/commitdiff
hda-analyzer: fix amp_index_match when no offset information is present
authorJaroslav Kysela <perex@perex.cz>
Thu, 29 Jul 2010 15:08:59 +0000 (17:08 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 29 Jul 2010 15:08:59 +0000 (17:08 +0200)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
hda-analyzer/hda_proc.py

index 660993b379739457c01812e6a570a60e8191eace..3363b0988c3385b4113ec8173dd631b915b5bc3d 100644 (file)
@@ -167,8 +167,11 @@ class HDApcmControl:
     return str
 
   def amp_index_match(self, idx):
-    count = (self.amp_chs & 1) + ((self.amp_chs >> 1) & 1)
-    return idx >= self.amp_idx and idx < self.amp_idx + count
+    if not self.amp_chs is None:
+      count = (self.amp_chs & 1) + ((self.amp_chs >> 1) & 1)
+      return idx >= self.amp_idx and idx < self.amp_idx + count
+    else:
+      return False
 
 class ProcNode(HDABaseProc):