From 60dda03110b335c5afa0412f28a82f82d5ac2643 Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 13 May 2026 08:56:59 +1000 Subject: Option to skip some devices, defulting to HDMI. --- aataaj.lua | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/aataaj.lua b/aataaj.lua index 48d52a2..f982c00 100755 --- a/aataaj.lua +++ b/aataaj.lua @@ -68,6 +68,7 @@ local options = asoundrcPath = {help = 'Path to our config files and stuff.', value = '/var/lib/aataaj', }, asoundrc = {help = 'Name of asoundrc file.', value = 'asoundrc', }, aliases = {help = 'Aliases for audio devices.', value = {}, }, + skip = {help = 'Devices to skip.', value = {'HDMI'}}, install = { help = 'Command to install aataaj.lua', @@ -531,18 +532,26 @@ elseif 'JACK' == cmd then print('Rest of ALSA sound devices converted to JACK.') for k,C in pairs(Cards) do + local doit = true + for j0, c0 in ipairs(options.skip.value) do + if c0 == C['name'] then doit = nil ; print('Skipping device ' .. C['name']) end + end for j,c in ipairs(C['playbackDevs']) do - print('HW playback: ' .. C['name'] .. '\tDEVICE: ' .. C['playbackDevs'][j]) - __(AOUT .. ' -j ' .. C['name'] .. '_' .. C['playbackDevs'][j] .. '-in -d ' .. C['name'] .. C['playbackDevs'][j]):fork() + if doit then + print('HW playback: ' .. C['name'] .. '\tDEVICE: ' .. C['playbackDevs'][j]) + __(AOUT .. ' -j ' .. C['name'] .. '_' .. C['playbackDevs'][j] .. '-in -d ' .. C['name'] .. C['playbackDevs'][j]):noOut():noErr():fork() + end -- __'sleep 1':Do() -- __('jack_connect cloop:capture_1 ' .. C['name'] .. '_' .. C['playbackDevs'][j] .. '-in' .. ':playback_1'):Do() -- __('jack_connect cloop:capture_2 ' .. C['name'] .. '_' .. C['playbackDevs'][j] .. '-in' .. ':playback_2'):Do() end for j,c in ipairs(C['captureDevs']) do - print('HW capture: ' .. C['name'] .. '\tDEVICE: ' .. C['captureDevs'][j]) - -- TODO - This looks like the source of the "Detected excessive timing errors, waiting 10 seconds." spam. Shut it up for now, investigate later. - -- https://discourse.ardour.org/t/hdmi-speakers-are-silent-with-intermittent-noise/108563 last post might help. - __(AIN .. ' -j ' .. C['name'] .. '_' .. C['captureDevs'][j] .. '-out -d ' .. C['name'] .. C['captureDevs'][j]):noOut():fork() + if doit then + print('HW capture: ' .. C['name'] .. '\tDEVICE: ' .. C['captureDevs'][j]) + -- TODO - This looks like the source of the "Detected excessive timing errors, waiting 10 seconds." spam. Shut it up for now, investigate later. + -- https://discourse.ardour.org/t/hdmi-speakers-are-silent-with-intermittent-noise/108563 last post might help. + __(AIN .. ' -j ' .. C['name'] .. '_' .. C['captureDevs'][j] .. '-out -d ' .. C['name'] .. C['captureDevs'][j]):noOut():noErr():fork() + end end end print('') -- cgit v1.1