mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-25 06:33:55 +08:00
fix tici sound card check
This commit is contained in:
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user