From: Jaroslav Kysela Date: Thu, 29 Jul 2010 15:08:59 +0000 (+0200) Subject: hda-analyzer: fix amp_index_match when no offset information is present X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=cb1cc91bbc847329cad6f83d626323f971608597;p=alsa.git hda-analyzer: fix amp_index_match when no offset information is present Signed-off-by: Jaroslav Kysela --- diff --git a/hda-analyzer/hda_proc.py b/hda-analyzer/hda_proc.py index 660993b..3363b09 100644 --- a/hda-analyzer/hda_proc.py +++ b/hda-analyzer/hda_proc.py @@ -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):