fix tici sound card check

old-commit-hash: 59ea5eade9f3266fc4cd9519a71fc0a84cae4ac2
This commit is contained in:
Adeeb Shihadeh
2021-03-04 11:57:43 -08:00
parent a13c21c7a7
commit b3f8b886cb
+2 -1
View File
@@ -44,7 +44,8 @@ class Tici(HardwareBase):
return "tici"
def get_sound_card_online(self):
return os.system("pulseaudio --check") == 0
return (os.path.isfile('/proc/asound/card0/state') and
open('/proc/asound/card0/state').read().strip() == 'ONLINE')
def reboot(self, reason=None):
subprocess.check_output(["sudo", "reboot"])