Skip to content

Commit e4b04e0

Browse files
committed
Remove commented out code
1 parent 1bc31e6 commit e4b04e0

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

usr/bin/autojack

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,51 +1251,6 @@ def msg_cb_new(*args, **kwargs):
12511251
if args[0].find("sound-card") >= 0:
12521252
device_signal = 1
12531253
return
1254-
'''# check to see if any new cards
1255-
with open('/proc/asound/cards', "r") as card_file:
1256-
my_cards_f = card_file.read()
1257-
if my_cards_f == cards_f:
1258-
logging.debug("card file not changed, skip")
1259-
return
1260-
else:
1261-
cards_f = my_cards_f
1262-
# remake database
1263-
old_devs_db = copy.deepcopy(conf_db['devices'])
1264-
import_config("msg_cb_new")
1265-
dev_db = {}
1266-
for dev_name in conf_db['devices']:
1267-
dev_db = conf_db['devices'][dev_name]
1268-
# we only care about usb devices that are plugged in and have audio
1269-
if dev_db['usb'] and dev_db['number'] != -1 and len(dev_db['sub']):
1270-
# check if it was not in db before or "card number" has changed
1271-
if dev_name not in old_devs_db or dev_db[
1272-
'number'] != old_devs_db[dev_name]['number']:
1273-
# tell gui devicelist has changed so it can up date
1274-
# device dropdowns
1275-
sendbs.state(version, 'usb')
1276-
logging.debug(f"USB device {dev_name} has been plugged in")
1277-
1278-
for subn in dev_db['sub']:
1279-
subname = f"{dev_name},{str(subn)},0"
1280-
if subname == last_master:
1281-
# this device is current master
1282-
# maybe jack did a reset?
1283-
continue
1284-
sub_db = dev_db['sub'][subn]
1285-
if (conf_db['jack']['driver'] == "alsa") and (
1286-
conf_db['jack']['usbdev'] == subname):
1287-
logging.debug(
1288-
f"Changing jack master to: {subname}")
1289-
config_start()
1290-
return
1291-
if sub_db['play-pid'] or sub_db['cap-pid']:
1292-
# device in use already
1293-
continue
1294-
if conf_db['extra']['usbauto']:
1295-
# extra_devices()
1296-
start_slave(subname)
1297-
if subname == conf_db['extra']['phone-device']:
1298-
phones_switch(True)'''
12991254

13001255

13011256
def device_new():

0 commit comments

Comments
 (0)