<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 23, 2014 at 9:38 PM, Benjamin Scherrer <span dir="ltr"><<a href="mailto:benjamin@wagnerbrutal.de" target="_blank">benjamin@wagnerbrutal.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
apart from the hdsploader, does anyone know why the issue "need to start<br>
the hdspmixer once to hear something" hasn't been addressed? Safety<br>
reasons sound fine, but there could be a simple "on" switch in the<br>
config, couldn't there? I haven't seen (heared) this behavior with<br>
another card.<br></blockquote><div><br></div><div>ALSA has a rule that all devices are silenced at boot.<br><br>It is up to user space to restore any existing configuration.<br><br></div><div>The ALSA tools used by most distros to do this restoration don't work properly in the case of a matrix mixer (which the HDSP series has). <br>
</div><div> <br></div><div>So instead, the user gets to run hdspmixer. It CAN be done with ALSA tools, but not with alsactl store/restore. I have shell scripts like the one below that I sometimes use to restore particular settings, which I include here to just to show proof of concept.<br>
<br>---------<br>#!/bin/bash<br><br>AMIXER="amixer -q"<br>CARD="-c 1"<br><br>if [ x$1 = xon ] ; then<br>    gain=32768<br>    verb="route"<br>else<br>    gain=0<br>    verb="mute"<br>
fi<br><br>shift;<br><br>#input_source : 0-25  (physical channels), <br>#               26-51 (software playback)<br>#output_source : 0-25 (physical channels), <br>#               26-27 (line out)<br><br>case $1 in<br>    play)<br>
    for chn in $(seq 26 51);do<br>        $AMIXER $CARD cset numid=5 $chn,$(($chn-26)),$gain<br>    done<br>    ;;<br><br>    thru)<br>    for input in $(seq 0 25);do<br>        for output in $(seq 0 25); do<br>        if [ $input != $output ]; then<br>
            $AMIXER $CARD cset numid=5 $input,$output,$gain<br>        fi<br>        done<br>    done<br>    ;;<br><br>    thru12) <br>    $AMIXER $CARD cset numid=5 0,0,$gain<br>    $AMIXER $CARD cset numid=5 1,1,$gain<br>
    ;;<br><br>    mon)<br>    for chn in $(seq 26 51);do<br>        if [ $(($chn % 2)) -eq 0 ] ; then<br>        $AMIXER $CARD cset numid=5 $chn,26,$gain<br>        else<br>        $AMIXER $CARD cset numid=5 $chn,27,$gain<br>
        fi<br>    done<br>    ;;<br><br>    all)<br>    for input in $(seq 0 51); do<br>        for output in $(seq 0 27); do<br>        echo -n "."<br>        if [ $gain = 0 -o $input != $output ]; then<br>            $AMIXER $CARD cset numid=5 $input,$output,$gain<br>
        fi<br>        done<br>        echo<br>    done<br>    ;;<br><br>    off)<br>    for input in $(seq 0 51); do<br>        for output in $(seq 0 27); do<br>        echo -n "."<br>        if [ $gain = 0 -o $input != $output ]; then<br>
            $AMIXER $CARD cset numid=5 $input,$output,$gain<br>        fi<br>        done<br>        echo<br>    done<br>    ;;<br>esac<br>------------------------<br><br></div></div></div></div>