Skip to content

Commit

Permalink
Monitor should test for system: (issue #77)
Browse files Browse the repository at this point in the history
	Prevent hang if alsaaudio can't access mixer (lp #1964862)
  • Loading branch information
ovenwerks committed Mar 29, 2022
1 parent 35e554e commit b2f2dbb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
studio-controls version 2.3.1

[ Len Ovens ]
-Monitor should test for system: (issue #77)
-Prevent hang if alsaaudio can't access mixer (lp #1964862)

studio-controls version 2.3.0

[ Len Ovens ]
Expand Down
10 changes: 7 additions & 3 deletions usr/bin/autojack
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def reconfig():
logging.debug("reconfigure Headphones setup")
phones = False
phones_check()
if conf_db['extra']['monitor'] != "system:playback_1" and not phones:
if conf_db['extra']['monitor'][:7] != "system:" and not phones:
logging.debug("Check main outputs")
mon_dev, ldev, temp = conf_db['extra']['monitor'].split('-')
if not conf_db['devices'][mon_dev]['sub'][ldev] and conf_db['jack']['driver'] != "alsa" or mon_dev != last_master:
Expand Down Expand Up @@ -834,7 +834,7 @@ def config_start():
if conf_db['extra']['phone-device'] != last_master:
start_slave(conf_db['extra']['phone-device'])
con_dirty = True
elif conf_db['extra']['monitor'] != "system:playback_1":
elif conf_db['extra']['monitor'][:7] != "system:":
mon_dev = conf_db['extra']['monitor'].split('-')[0]
start_slave(mon_dev)
con_dirty = True
Expand Down Expand Up @@ -1591,7 +1591,11 @@ def phones_check():
elif dev_db['internal']:
# this is internal we can use amixer
logging.debug("Checking for phones with internal device")
my_mixers = alsaaudio.mixers(device=f"hw:{dname}")
try:
my_mixers = alsaaudio.mixers(device=f"hw:{dname}")
except:
logging.info(f"Phones device: {dname} mixer not accessable")
return
hp_sw = ""
if "Front" in my_mixers:
hp_sw = "Front "
Expand Down
2 changes: 1 addition & 1 deletion usr/share/studio-controls/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0
2.3.1

0 comments on commit b2f2dbb

Please sign in to comment.