Re: [LAD] Headless RME HDSP/HDSPM mixer settings

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: raf <rmouneyres@...>
Cc: linux-audio-dev@lists.linuxaudio.org <linux-audio-dev@...>
Date: Wednesday, November 27, 2013 - 5:49 pm

--047d7b6251b0bf989604ec2c38e3
Content-Type: text/plain; charset=ISO-8859-1

On Wed, Nov 27, 2013 at 12:41 PM, raf wrote:

> hello,

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"

if [ x$1 = xon ] ; then
gain=32768
verb="route"
else
gain=0
verb="mute"
fi

shift;

#input_source : 0-25 (physical channels),
# 26-51 (software playback)
#output_source : 0-25 (physical channels),
# 26-27 (line out)

case $1 in
play)
for chn in $(seq 26 51);do
$AMIXER $CARD cset numid=5 $chn,$(($chn-26)),$gain
done
;;

thru)
for input in $(seq 0 25);do
for output in $(seq 0 25); do
if [ $input != $output ]; then
$AMIXER $CARD cset numid=5 $input,$output,$gain
fi
done
done
;;

thru12)
$AMIXER $CARD cset numid=5 0,0,$gain
$AMIXER $CARD cset numid=5 1,1,$gain
;;

mon)
for chn in $(seq 26 51);do
if [ $(($chn % 2)) -eq 0 ] ; then
$AMIXER $CARD cset numid=5 $chn,26,$gain
else
$AMIXER $CARD cset numid=5 $chn,27,$gain
fi
done
;;

all)
for input in $(seq 0 51); do
for output in $(seq 0 27); do
echo -n "."
if [ $gain = 0 -o $input != $output ]; then
$AMIXER $CARD cset numid=5 $input,$output,$gain
fi
done
echo
done
;;

off)
for input in $(seq 0 51); do
for output in $(seq 0 27); do
echo -n "."
if [ $gain = 0 -o $input != $output ]; then
$AMIXER $CARD cset numid=5 $input,$output,$gain
fi
done
echo
done
;;
esac

--047d7b6251b0bf989604ec2c38e3
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Wed, Nov 27, 2013 at 12:41 PM, raf <rmouneyres@gmail.com=

hello,

tested successfully with a HDSP 9652.
great usefull tool !

notice that if hdspmixer has not been started after bootup (means the card =
is not initialized in some way), hdspdump throw no error, and creates a dum=
p file filled with 0. It means that alsa is not throwing errors either as y=
our programs goes nicely to the end.

I've been looking at hdspmixer code for some days now to make it consol=
e only, removing FLTK dependencies. Your program gives me motivation to go =
on with this hard task.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 a=
mixer(1) to control the hdsp matrix mixer from the cmd line):
#!/bin/bashAMIXER=3D"amixer -q"CARD=3D=
"-c 1"if [ x$1 =3D xon ] ; then=A0=A0=A0 gain=3D32768=
=A0=A0=A0 verb=3D"route"else=A0=A0=A0 gain=3D0=A0=
=A0=A0 verb=3D"mute"
fishift;#input_source : 0-25=A0 (physical channels), #=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 26-51 (software playback)#ou=
tput_source : 0-25 (physical channels), #=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0 26-27 (line out)case $1 in=A0=A0=A0 play)
=A0=A0=A0 for chn in $(seq 26 51);do=A0=A0=A0 =A0=A0=A0 $AMIXER $CARD c=
set numid=3D5 $chn,$(($chn-26)),$gain=A0=A0=A0 done=A0=A0=A0 ;;=
=A0=A0=A0 thru)=A0=A0=A0 for input in $(seq 0 25);do=A0=A0=A0 =
=A0=A0=A0 for output in $(seq 0 25); do=A0=A0=A0 =A0=A0=A0 if [ $input =
!=3D $output ]; then
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 $AMIXER $CARD cset numid=3D5 $input,$output,$=
gain=A0=A0=A0 =A0=A0=A0 fi=A0=A0=A0 =A0=A0=A0 done=A0=A0=A0 don=
e=A0=A0=A0 ;;=A0=A0=A0 thru12) =A0=A0=A0 $AMIXER $CARD cset=
numid=3D5 0,0,$gain=A0=A0=A0 $AMIXER $CARD cset numid=3D5 1,1,$gain
=A0=A0=A0 ;;=A0=A0=A0 mon)=A0=A0=A0 for chn in $(seq 26 51);do<=
br>=A0=A0=A0 =A0=A0=A0 if [ $(($chn % 2)) -eq 0 ] ; then=A0=A0=A0 =A0=
=A0=A0 $AMIXER $CARD cset numid=3D5 $chn,26,$gain=A0=A0=A0 =A0=A0=A0 el=
se=A0=A0=A0 =A0=A0=A0 $AMIXER $CARD cset numid=3D5 $chn,27,$gain
=A0=A0=A0 =A0=A0=A0 fi=A0=A0=A0 done=A0=A0=A0 ;;=A0=A0=A0 a=
ll)=A0=A0=A0 for input in $(seq 0 51); do=A0=A0=A0 =A0=A0=A0 for ou=
tput in $(seq 0 27); do=A0=A0=A0 =A0=A0=A0 echo -n "."=A0=
=A0=A0 =A0=A0=A0 if [ $gain =3D 0 -o $input !=3D $output ]; then=A0=A0=
=A0 =A0=A0=A0 =A0=A0=A0 $AMIXER $CARD cset numid=3D5 $input,$output,$gain
=A0=A0=A0 =A0=A0=A0 fi=A0=A0=A0 =A0=A0=A0 done=A0=A0=A0 =A0=A0=A0 e=
cho=A0=A0=A0 done=A0=A0=A0 ;;=A0=A0=A0 off)=A0=A0=A0 fo=
r input in $(seq 0 51); do=A0=A0=A0 =A0=A0=A0 for output in $(seq 0 27)=
; do=A0=A0=A0 =A0=A0=A0 echo -n "."=A0=A0=A0 =A0=A0=A0 if=
[ $gain =3D 0 -o $input !=3D $output ]; then
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 $AMIXER $CARD cset numid=3D5 $input,$output,$=
gain=A0=A0=A0 =A0=A0=A0 fi=A0=A0=A0 =A0=A0=A0 done=A0=A0=A0 =A0=
=A0=A0 echo=A0=A0=A0 done=A0=A0=A0 ;;esac

--047d7b6251b0bf989604ec2c38e3--

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [LAD] Headless RME HDSP/HDSPM mixer settings, Adrian Knoth, (Thu Nov 28, 10:17 pm)
Re: [LAD] Headless RME HDSP/HDSPM mixer settings, Ralf Mardorf, (Fri Nov 29, 10:25 am)
Re: [LAD] Headless RME HDSP/HDSPM mixer settings, Arnold Krille, (Thu Nov 28, 10:43 pm)
Re: [LAD] Headless RME HDSP/HDSPM mixer settings, Paul Davis, (Wed Nov 27, 5:49 pm)
Re: [LAD] Headless RME HDSP/HDSPM mixer settings, Esben Stien, (Wed Dec 4, 5:58 pm)
Re: [LAD] Headless RME HDSP/HDSPM mixer settings, Markus Seeber, (Wed Dec 4, 7:20 pm)
Re: [LAD] Headless RME HDSP/HDSPM mixer settings, Fons Adriaensen, (Wed Nov 27, 11:39 pm)
Re: [LAD] Headless RME HDSP/HDSPM mixer settings, Mario Lang, (Tue Dec 3, 11:15 pm)
Re: [LAD] Headless RME HDSP/HDSPM mixer settings, Esben Stien, (Wed Dec 4, 5:54 pm)
Re: [LAD] Headless RME HDSP/HDSPM mixer settings, Adrian Knoth, (Wed Dec 4, 3:01 pm)
Re: [LAD] Headless RME HDSP/HDSPM mixer settings, Fons Adriaensen, (Sun Dec 1, 10:34 pm)
Re: [LAD] Headless RME HDSP/HDSPM mixer settings, Raphaƫl Mouneyres, (Mon Dec 2, 8:58 am)