Hi Georg and others.<br><br>Find enclosed my HDSPscan script. I wrote it to identify the channels ids for using it with amixer.<br><br>It connects each in- to output, which makes it easy for you to identify the routing you&#39;re looking for. <br>
<br>It is a two-stage approach to reduce the number of test cases. <br>First it will connect every single input - one after another - to &quot;all outputs&quot; to identify the input you&#39;re looking for.<br>Then it&#39;ll connect the chosen input to every single output one after another.<br>
<br>The test tone is generated by the script (sox) itself.<br><br>Hope some of you guys find it beneficial.<br><br>It saved me a hell lot of time.<br><br>Have fun<br><br>\Klaus<br><br>HDSPscan<br>------------------------------------------------------------------------------<br>
#!/bin/bash<br>#<br># written by Klaus Schulz 10/25/2009 <br>#<br># This script scans the matrix mixer of RME HDSP 9632 for input/output connections by using amixer<br># Your current setting will be removed. Use the script at your own risk.<br>
#<br># RME HDSP 9632 ( as per definition)<br># inputs: 0-7 (analog), 16-23 (adat), 24-25 (spdif)  26-43 (playback channels)<br># output: 0-7 (analog), 16-23 (adat)  24-25 (spdif), 26-27 (line out)<br><br>track=&quot;/dev/shm/play.wav&quot;  # will be generated by the script!!!!!!!!!<br>
alsainterface=&quot;plughw:0,0&quot;<br><br>inputs_left=( 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 )<br>inputs_right=( 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 )<br>let cnt_i=${#inputs_left[@]}-1<br>
<br>outputs_left=( 0 2 4 6 8 10 12 14 16 18 20 22 24 26 )<br>outputs_right=( 1 3 5 7 9 11 13 15 17 19 21 23 25 27 )<br>let cnt_o=${#outputs_left[@]}-1<br><br><br><br>function generate_track () {<br>which sox  &gt; /dev/null 2&gt;&amp;1 || { echo &quot;Please install sox first!&quot;; exit 1 ; } ;<br>
sox -r 44100 -b 16 -c 2 -n $track synth 2 sine 300-3300 gain -18  # gain in db<br>}<br><br>function init_matrix () {<br>    echo -n &quot;Initializing hdsp-matrix...&quot;<br>    for output in $(seq 0 27); do<br>        for input in $(seq 0 43); do<br>
            echo -n &quot;.&quot;<br>            amixer cset numid=5 $input,$output,0 &gt; /dev/null 2&gt;&amp;1<br>        done<br>    done<br>echo<br>}<br><br><br>function scaninputs () {<br>for i in  $(seq 0 $cnt_i) ; do         <br>
          in_l=${inputs_left[$i]}<br>          in_r=${inputs_right[$i]} <br>          for y in  $(seq 0 $cnt_o) ; do<br>                    out_l=${outputs_left[$y]}<br>                    out_r=${outputs_right[$y]}<br>                    echo  &quot;Connecting input:$in_l/$in_r to output: $out_l/$out_r&quot;<br>
                    amixer cset numid=5 $in_l,$out_l,32768 &gt; /dev/null 2&gt;&amp;1<br>                    amixer cset numid=5 $in_r,$out_r,32768 &gt; /dev/null 2&gt;&amp;1<br>          done<br>          aplay  -D$alsainterface -fcd &quot;$track&quot; &gt; /dev/null 2&gt;&amp;1 &amp;<br>
          echo &quot;Playback started...&quot;<br>          echo -n &quot;Any sound ? (y/(N)):&quot;<br>          read z<br>          if [ &quot;$z&quot; == &quot;y&quot; ] ; then echo &quot;Identified inputs: $in_l/$in_r&quot; ;  break ; fi  <br>
          <br>          for y in  $(seq 0 $cnt_o) ; do   <br>                    out_l=${outputs_left[$y]}<br>                    out_r=${outputs_right[$y]}<br>                    echo  &quot;Connecting input:$in_l/$in_r to output: $out_l/$out_r&quot;<br>
                    amixer cset numid=5 $in_l,$out_l,0 &gt; /dev/null 2&gt;&amp;1<br>                    amixer cset numid=5 $in_r,$out_r,0 &gt; /dev/null 2&gt;&amp;1<br>          done        <br>done<br>if [ &quot;$z&quot; != &quot;y&quot; ] ; then echo &quot;No working connection identified...&quot; ; exit 1 ; fi<br>
}<br><br><br>function scanoutputs () {<br>for k in  $(seq 0 $cnt_o) ; do<br>     out_l=${outputs_left[$k]}<br>     out_r=${outputs_right[$k]}<br>     echo  &quot;Connecting input:$in_l/$in_r to output: $out_l/$out_r&quot;<br>
     amixer cset numid=5 $in_l,$out_l,32768 &gt; /dev/null 2&gt;&amp;1<br>     amixer cset numid=5 $in_r,$out_r,32768 &gt; /dev/null 2&gt;&amp;1<br>     aplay  -D$alsainterface -fcd &quot;$track&quot; &gt; /dev/null 2&gt;&amp;1 &amp;<br>
     echo &quot;Playback started...&quot;<br>     echo -n &quot;Any sound ? (y/(N)):&quot; <br>     read z<br>     if [ &quot;$z&quot; == &quot;y&quot; ] ; then echo &quot;Identified outputs: $out_l/$out_r&quot; ;  break ; fi  <br>
     amixer cset numid=5 $in_l,$out_l,0 &gt; /dev/null 2&gt;&amp;1<br>     amixer cset numid=5 $in_r,$out_r,0 &gt; /dev/null 2&gt;&amp;1 <br>done<br>}<br><br><br>echo &quot;Generating test-track...&quot;<br>generate_track<br>
init_matrix <br>echo &quot;Scan inputs...&quot;<br>scaninputs<br>init_matrix <br>echo &quot;Scan outputs...&quot;<br>scanoutputs<br>echo<br>echo &quot;Result: inputs: $in_l/$in_r outputs: $out_l/$out_r&quot;<br><br><br><br>
exit 0<br><br><br><br><br>------------------------------------------------------------------------------<br><br><br><br> <br><br><br><div class="gmail_quote">On Sun, Oct 25, 2009 at 9:53 AM, Georg Rudolph <span dir="ltr">&lt;<a href="mailto:georg.rudolph@schwaben.de">georg.rudolph@schwaben.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Klaus Schulz schrieb:<br>
<div class="im">&gt; Hi Giso and others.<br>
&gt;<br>
&gt; I managed to get a basic routing working! I wrote a script which<br>
&gt; initializes the entire matrix, connects one after another every input<br>
&gt; to every output and plays a sound per setting.<br>
&gt; I identified my alsainputs on 16/17 and analog outputs on 12/13 for my<br>
&gt; analog extension board (out1 out2).<br>
&gt;<br>
&gt; This has not very much to do with the channel assignment I&#39;ve seen<br>
&gt; everywhere.<br>
&gt;<br>
&gt; With the script I can easily scan my setup now.<br>
&gt;<br>
&gt; Finally I need to find out how to get more then 2 channels from Alsa<br>
&gt; to the same card without using Jack.<br>
&gt;<br>
&gt; The pity is really that I can not control the attenuation on the<br>
&gt; hw-outputs with amixer. I&#39;ll do that on the application side.<br>
&gt;<br>
&gt; THX for all the hints so far.<br>
&gt;<br>
&gt; Cheers<br>
&gt; \Klaus<br>
&gt;<br>
</div>Hallo Klaus,<br>
<br>
thanks for sharing this effort. I&#39;m a happy user of a multiface II and<br>
would be very much interested in controlling remotely the submix<br>
(hardware mixer). This especially can&#39;t be substituted be software<br>
mixing with jackminimix for example. Would it be okay if you send me<br>
your script, so I could do a test too, and report back?<br>
<br>
I use perl scripts to control ardour, gtklick, jackminimix, once<br>
sooperlooper too, per osc, per an infrared remote, the mceusb2.<br>
<br>
If the hdsp could be controlled by amixer commans it wouldn&#39;t be so much<br>
needed to add an osc interface. Although, I like the osc interfaces.<br>
<br>
Best Regards,<br>
<font color="#888888">Georg Rudolph<br>
<br>
</font></blockquote></div><br>