Skip to content

News Arts and Science Teaching Media Library Services IEM - intern Contact
  You are not logged in Link icon Log in
You are here: Home » Kunst & Forschung » Signalverarbeitung » DSP MADI ALSA Linux Treiber » Mini FAQ

Mini FAQ

From Mails I got I want to compile a FAQ....

How can I monitor my ALSA-MADI Status ?

There are some other programs, but what always works under linux is "cat" of /proc alsainfo If you have one MADI-Card as first device just:

    cat /proc/asound/card0/hdspm

Its more readable without scrolling than the "alsactl" file output and some additional infos are there. To watch continously I mostly put a script in /usr/local/bin "watch_rme":

    #!/bin/sh
    watch cat /proc/asound/card0/hdspm

and for KDE User I mak a Link to Application on Desktop with this script being executed in an Terminal, so you have one Application ICON on Desktop to click for the status on your card.

How can I set the card in a wanted modus ?

The configuration of the MADI card is made by standard ALSA-utillities "alsactl" or "amixer"

My way to do it is first to get a alsa-configuration file and call it "alsa.cfg" with:

    alsactl store -f alsa.cfg

Edit the self explaining ;-) file with your favorite Editor First I delete all readonly parameter, to get a more compact file and then I copy it to a status I want, for expamle slave-modus: "slave.conf". In this file I just leave all relevant parameter I need and set "Sample Clock Source" to value Autosync, and "Preferred Sync Reference" to MADI and "Input Select" to ... and so on. (see alsaconfiguartion-file and Interface Documentation ). I do it again with "master.cfg" for master and so on. Then I can switch to this Modi eg. with:

    alsactl restore -f "slave.conf" 0

Mostly I put the configuration in a own directory /etc/alsa/madi and write some shell-scripts like "madi_set_master" und put them under /usr/local/bin:

       #!/bin/sh
       /usr/sbin/alsactl -f /etc/alsa/madi/master.cfg restore

What can I do with the hdspmixer utility ?

The hdspmixer programm was made first testing the mixerinterface and secondly to be used in script to set up a special state. It is not for setting some configuration like Syncmodi etc use alsactl instead. Here the synthax:

       hdspm_mixer <devnr> <src> <dst> [value]

if no value ist set the actual value is reported. value is 0...65535. devnr ALSA-Device Nummer, 0..3 for 1 to 4 cards. are the channel number: inputs 0-63 playback 64-127 and dst is the output channel number 0-63.

There are some examples in in the test file . Here an example to set all Input to the analog monitoring channels 63,64 (headphones):

    #!/bin/sh
    for i in $(seq 64 2 126)
    do
        ./hdspm_mixer 0 $i 62 32768
    done
    for i in $(seq 65 2 127)
    do
        ./hdspm_mixer 0 $i 63 32768
    done

Note 32768 is the value for 0dB. you also have to set the analog monitoring in the alsactl file


Last modified 02.09.2004