[LAD] ALSA doumentation

Hannu Savolainen hannu at opensound.com
Sat Nov 15 22:24:38 UTC 2008


Fons Adriaensen wrote:
> On Fri, Nov 14, 2008 at 03:47:17PM +0200, Hannu Savolainen wrote:
>
>   
>> There is no point in letting any application to change such settings so 
>> it has intentionally been made pretty much impossible.
>>     
>
> If you think this applies to my situation you are 
> wrong on all accounts.
>
> 1. It not "made pretty much impossible" in ALSA, all
> it takes (on the command line) is an 'amixer sset'.
>
> 2. I am the system administrator. I may want to use
> an application to do part of my work.
>
> 3. The studio wiring can change at any time. There are
> four PCs, four ADI648s and MADI connections between them
> are made via an RME MADI switch. This is controlled by
> software as well. MADI wiring is in function of the
> current project or session.
>
> 4. If ALSA would allow me to set "Sample Clock Source"
> to "AutoSync", "Preferred Sync Reference" to "MADI"
> and "System Clock Mode" to "Slave" AND ENSURE THEY
> STAY SET LIKE THAT then I wouldn't have to touch them.
> But it will switch to "Internal 44.1 kHz" and  "Master"
> whenever there is no MADI signal on the input and it
> will *not* go back to the original settings when a
> signal is present again. Since the MADI links are
> switched, this can happen and it should not leave
> the system in an inconsistent state. Hence I do have 
> to monitor these settings permanently and take action
> when they are wrong.
>   
You missed the point. With OSS you can change the sync source any time 
you want by launching the control panel (ossxmix) and by changing the 
control exposed by the driver. If you do the change incorrectly it's all 
your fault.

However it has been made almost impossible to make this kind of changes 
from your audio application (say media player). With OSS you may have up 
to 32 different applications playing audio at the same time with MADI. 
If some of them changes the sync source on fly it will break everything. 
Such uncontrolled changes might (for example) drop whole radio station 
off-air.

Application programmers seem to be very innovative when inventing wrong 
solutions to problems they encounter. I would not be surprised in some 
application has a comment like:

/*
 * There seems to be a bug in OSS. It doesn't permit changing the 
sampling rate if the sync source is set to
 * external sync. As a workaround we can try to switch the device to 
internal sync before setting the rate.
 */

By making this kind of changes pretty much impossible we can prevent 
programmers from doing stupid mistakes. Before ading this kind of stupid 
workarounds they will probably ask somebody to help them. In this way 
there is a chance that somebody with better knowledge can stop them.

Best regards,

Hannu



More information about the Linux-audio-dev mailing list