On Wed, Nov 27, 2013 at 12:49:41PM -0500, Paul Davis wrote:
i have no idea what a "console-only" version
of hdspmixer would actually
do, but perhaps you could consider the following as inspiration also (which
uses amixer(1) to control the hdsp matrix mixer from the cmd line):
#!/bin/bash
AMIXER="amixer -q"
CARD="-c 1"
...
Very similar to the script I use to init a Multiface:
#!/bin/bash
# Multiface II mixer
#
# inputs: 0-7 (analog), 16-23 (adat), 24-25 (spdif) 26-33, 42..51 (playback channels)
# outputs: 0-7 (analog), 16-23 (adat) 24-25 (spdif), 26-27 (phones)
device=hw:DSP
gain=32768
function set_gain ()
{
amixer -D $device cset numid=5 $1,$2,$3 > /dev/null 2>&1
}
function reset_matrix ()
{
for out in $(seq 0 27); do
for inp in $(seq 0 51); do
set_gain $inp $out 0
done
done
}
echo Clearing matrix mixer ...
# Reset all
reset_matrix
echo Setting default connections ...
# Playback 1..8 to analog outs
set_gain 26 0 $gain
set_gain 27 1 $gain
set_gain 28 2 $gain
set_gain 29 3 $gain
set_gain 30 4 $gain
set_gain 31 5 $gain
set_gain 32 6 $gain
set_gain 33 7 $gain
# Playback 9..16 to ADAT outs
set_gain 42 16 $gain
set_gain 43 17 $gain
set_gain 44 18 $gain
set_gain 45 19 $gain
set_gain 46 20 $gain
set_gain 47 23 $gain
set_gain 48 24 $gain
set_gain 49 25 $gain
# Playback 17,18 to headphone amp
set_gain 50 26 $gain
set_gain 51 27 $gain
amixer -D$device sset 'Preferred Sync Reference' 'ADAT1'
amixer -D$device sset 'Sample Clock Source' 'AutoSync'
echo Done.
exit 0
Ciao,
--
FA
A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)