[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: echo



Le Wednesday 29 June 2005 17:50, eric math(eric math 
<tarass.houba@laposte.net>) disait:
> Bonjour
Salut,

> echo "doom.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss
> Quelqu'un saurait-il me dire à quoi sert cette commande, ce
> qu'elle fait 

<Extrait 
de /usr/src/linux/Documentation/sound/alsa/OSS-Emulation.txt>

PCM Mode
========

As default, ALSA emulates the OSS PCM with so-called plugin layer,
i.e. tries to convert the sample format, rate or channels
automatically when the card doesn't support it natively.
This will lead to some problems for some applications like quake or
wine, especially if they use the card only in the MMAP mode.

In such a case, you can change the behavior of PCM per application by
writing a command to the proc file.  There is a proc file for each 
PCM
stream, /proc/asound/cardX/pcmY[cp]/oss, where X is the card number
(zero-based), Y the PCM device number (zero-based), and 'p' is for
playback and 'c' for capture, respectively.  Note that this proc file
exists only after snd-pcm-oss module is loaded.

The command sequence has the following syntax:

        app_name fragments fragment_size [options]

app_name is the name of application with (higher priority) or without
path.
fragments specifies the number of fragments or zero if no specific
number is given.
fragment_size is the size of fragment in bytes or zero if not given.
options is the optional parameters.  The following options are
available:

        disable         the application tries to open a pcm device 
for
                        this channel but does not want to use it.
        direct          don't use plugins
        block           force block open mode
        non-block       force non-block open mode
        partial-frag    write also partial fragments (affects 
playback only)
        no-silence      do not fill silence ahead to avoid clicks

The disable option is useful when one stream direction (playback or
capture) is not handled correctly by the application although the
hardware itself does support both directions.
The direct option is used, as mentioned above, to bypass the 
automatic
conversion and useful for MMAP-applications.

</Extrait 
de /usr/src/linux/Documentation/sound/alsa/OSS-Emulation.txt>

> comment éviter de la taper après chaque 
> redémarrage ?

Ajouter 'asound.card0.pcm0p.oss=doom.x86 0 0 direct' 
dans /etc/sysctl.conf (je suis pas sûr de la syntaxe).
Voir man sysctl.conf plus d'infos !
A+
-- 
Glennie
"L'ambition est le dernier refuge de l'échec"

Attachment: pgph5WtKoCK1n.pgp
Description: PGP signature


Reply to: