snd_pcm_channel_setup

Name

snd_pcm_channel_setup -- obtain current PCM setup

Synopsis

int snd_pcm_channel_setup(snd_pcm_t *handle, snd_pcm_channel_setup_t *setup);

Description

Fills the setup structure with data about the PCM channel settings selected by handle. The channel member specifies the direction. Other members are read-only. Function returns zero if successful, otherwise it returns an error code.

typedef struct snd_pcm_channel_setup {
        int channel;
        int mode;
        snd_pcm_format_t format;
        snd_pcm_digital_t digital;
        union {
                struct {
                        int queue_size;
                } stream;
                struct {
                        int frag_size;
                        int frags;
                        int frags_min;
                        int frags_max;
                } block;
        } buf;
        short msbits_per_sample;
        short pad1;
        char reserved[60];
} snd_pcm_channel_setup_t;

MemberDescription
channelSpecifies channel (direction). Can be SND_PCM_CHANNEL_PLAYBACK or SND_PCM_CHANNEL_CAPTURE.
modeShows channel mode. Can be SND_PCM_MODE_STREAM or SND_PCM_MODE_BLOCK.
formatShows the used format. Especially rate member may differ from requested one.
digitalShows the used digital settings.
queue_sizeShows the real queue size (may differ from requested one).
frag_sizeShows the real fragment size (may differ from requested one).
fragsShows the count of fragments.
frags_minCapture: Shows the minimum filled fragments to allow wakeup. Playback: Shows the minimum free fragments to allow wakeup.
frags_maxPlayback: Specifies the maximum filled fragments to allow wakeup. Value also specifies the maximum used fragments plus one.
msbits_per_sampleShows how many most significant bits are physically used.