From: makoto-tsudo <117238120+makoto-tsudo@users.noreply.github.com>
Date: Fri, 12 May 2023 10:26:48 +0900
X-Dgit-Generated: 0.21-1 a9bc6c14b6fcf601fe14395dedd8a23fcce5f1a5
Subject: Fix do not create alsa mixcer control.


---

diff --git a/hifiberrydsp/alsa/alsasync.py b/hifiberrydsp/alsa/alsasync.py
index 9042a04..34550fe 100644
--- a/hifiberrydsp/alsa/alsasync.py
+++ b/hifiberrydsp/alsa/alsasync.py
@@ -91,10 +91,10 @@ class AlsaSync(Thread):
 
     def set_alsa_control(self, alsa_control):
         from alsaaudio import Mixer
-        try:
-            self.mixer = self.get_dsp_mixer(alsa_control)
+        self.mixer = self.get_dsp_mixer(alsa_control)
+        if self.mixer != None:
             logging.debug("using existing ALSA control %s", alsa_control)
-        except:
+        else:
             try:
                 logging.debug(
                     "ALSA control %s does not exist, creating it", alsa_control)
