aboutsummaryrefslogtreecommitdiffstats
path: root/aataaj.lua
diff options
context:
space:
mode:
authoronefang2026-05-13 08:56:14 +1000
committeronefang2026-05-13 08:56:14 +1000
commitdc4137c3da23eafb4ccf3a9cfaa1e4fd7cbcdfbe (patch)
treea454888ba400780d2aa6af36030e0bd3c1c5c983 /aataaj.lua
parentAttempts to get it working on boot. (diff)
downloadJackOnAllDevices-dc4137c3da23eafb4ccf3a9cfaa1e4fd7cbcdfbe.zip
JackOnAllDevices-dc4137c3da23eafb4ccf3a9cfaa1e4fd7cbcdfbe.tar.gz
JackOnAllDevices-dc4137c3da23eafb4ccf3a9cfaa1e4fd7cbcdfbe.tar.bz2
JackOnAllDevices-dc4137c3da23eafb4ccf3a9cfaa1e4fd7cbcdfbe.tar.xz
Moving the output text to before the output speech seems to help at boot time.
Diffstat (limited to 'aataaj.lua')
-rwxr-xr-xaataaj.lua25
1 files changed, 13 insertions, 12 deletions
diff --git a/aataaj.lua b/aataaj.lua
index 3518871..48d52a2 100755
--- a/aataaj.lua
+++ b/aataaj.lua
@@ -5,7 +5,7 @@
5# Provides: aataaj 5# Provides: aataaj
6# Required-Start: $local_fs 6# Required-Start: $local_fs
7# Required-Stop: 7# Required-Stop:
8# X-Start-Before: alsa-utils espeakup 8# X-Start-Before: alsa-utils espeakup networking
9# Default-Start: S 9# Default-Start: S
10# Default-Stop: 10# Default-Stop:
11# Short-Description: Scan for audio devices. 11# Short-Description: Scan for audio devices.
@@ -218,6 +218,18 @@ io.flush()
218 218
219 219
220print('Your ' .. cnt .. ' audio devices are - ') 220print('Your ' .. cnt .. ' audio devices are - ')
221print(' being turned on and volume maxed - ')
222for k = 0, cnt do
223 -- Turn on IEC958 for everything, they seem to default to off, so can't hear them.
224 for l, m in ipairs(__("amixer -c " .. k .. " scontrols | grep 'IEC958' | cut -d ',' -f 2"):noErr():Do().lines) do
225 __("amixer -c " .. k .. " set IEC958," .. m .. " on"):Do()
226 end
227 -- Turn the volume to maximum for everything.
228 for l, m in ipairs(__("amixer -c " .. k .. " controls | grep ' Playback Volume' | cut -d ',' -f 1"):noErr():Do().lines) do
229 __("amixer -c " .. k .. " cset iface=MIXER,name='PCM Playback Volume," .. m .. "' 100% "):Do()
230 end
231end
232
221 233
222local speak = function(card, subdevice, device, words, printIt, forkIt, ...) 234local speak = function(card, subdevice, device, words, printIt, forkIt, ...)
223 local files = {...} 235 local files = {...}
@@ -242,17 +254,6 @@ end
242-- TODO - Start with the device, then go through the sub devices. Coz at boot time subs don't seem to work. 254-- TODO - Start with the device, then go through the sub devices. Coz at boot time subs don't seem to work.
243-- Likely that'll lock things up at "all speak at once" time. 255-- Likely that'll lock things up at "all speak at once" time.
244if 'start' == cmd then 256if 'start' == cmd then
245 print(' being turned on and volume maxed - ')
246 for k = 0, cnt do
247 -- Turn on IEC958 for everything, they seem to default to off, so can't hear them.
248 for l, m in ipairs(__("amixer -c " .. k .. " scontrols | grep 'IEC958' | cut -d ',' -f 2"):noErr():Do().lines) do
249 __("amixer -c " .. k .. " set IEC958," .. m .. " on"):Do()
250 end
251 -- Turn the volume to maximum for everything.
252 for l, m in ipairs(__("amixer -c " .. k .. " controls | grep ' Playback Volume' | cut -d ',' -f 1"):noErr():Do().lines) do
253 __("amixer -c " .. k .. " cset iface=MIXER,name='PCM Playback Volume," .. m .. "' 100% "):Do()
254 end
255 end
256 257
257 print(' being spoken through all at once, then one at a time - ') 258 print(' being spoken through all at once, then one at a time - ')
258 print('Please type the device number you hear best - ') 259 print('Please type the device number you hear best - ')