diff options
Diffstat (limited to 'aataaj.lua')
-rwxr-xr-x | aataaj.lua | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -231,9 +231,20 @@ print(s) | |||
231 | -- io.flush() | 231 | -- io.flush() |
232 | end | 232 | end |
233 | 233 | ||
234 | -- TODO - Need to maximize the volume, and turn on IEC958 for the devices / sub devices. Coz seems they might default to "can't hear it" states. | ||
235 | if 'start' == cmd then | 234 | if 'start' == cmd then |
236 | print('Your ' .. cnt .. ' audio devices are - ') | 235 | print('Your ' .. cnt .. ' audio devices are - ') |
236 | |||
237 | for k = 0, cnt do | ||
238 | -- Turn on IEC958 for everything, they seem to default to off, so can't hear them. | ||
239 | for l, m in ipairs(__("amixer -c " .. k .. " scontrols | grep 'IEC958' | cut -d ',' -f 2"):noErr():Do().lines) do | ||
240 | __("amixer -c " .. k .. " set IEC958," .. m .. " on"):Do() | ||
241 | end | ||
242 | -- Turn the volume to maximum for everything. | ||
243 | for l, m in ipairs(__("amixer -c " .. k .. " controls | grep ' Playback Volume' | cut -d ',' -f 1"):noErr():Do().lines) do | ||
244 | __("amixer -c " .. k .. " cset iface=MIXER,name='PCM Playback Volume'," .. m .. " 100% "):Do() | ||
245 | end | ||
246 | end | ||
247 | |||
237 | for k,C in pairs(Cards) do | 248 | for k,C in pairs(Cards) do |
238 | for j,c in ipairs(C['playbackDevs']) do | 249 | for j,c in ipairs(C['playbackDevs']) do |
239 | speak(C.name, nil, C.card - 1, 'Your ' .. cnt .. ' audio devices are - ', false, true, 'your', numbers[cnt], 'devices') | 250 | speak(C.name, nil, C.card - 1, 'Your ' .. cnt .. ' audio devices are - ', false, true, 'your', numbers[cnt], 'devices') |