Fills the info structure with data about the PCM channel 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 union snd_pcm_sync { char id[16]; short id16[8]; int id32[4]; } snd_pcm_sync_t; typedef struct snd_pcm_digital { unsigned char dig_status[24]; /* AES/EBU/IEC958 channel status bits */ unsigned char dig_subcode[147]; /* AES/EBU/IEC958 subcode bits */ unsigned char dig_valid: 1; /* must be non-zero to accept these values */ unsigned char dig_subframe[4]; /* AES/EBU/IEC958 subframe bits */ char reserved[16]; /* must be filled with zero */ } snd_pcm_digital_t; typedef struct snd_pcm_channel_info { int subdevice; /* subdevice number */ char subname[32]; /* subdevice name */ int channel; /* channel information */ int mode; /* transfer mode */ snd_pcm_sync_t sync; /* hardware synchronization ID */ unsigned int flags; /* see to SND_PCM_CHNINFO_XXXX */ unsigned int formats; /* supported formats */ unsigned int rates; /* hardware rates */ int min_rate; /* min rate (in Hz) */ int max_rate; /* max rate (in Hz) */ int min_voices; /* min voices */ int max_voices; /* max voices */ int buffer_size; /* max buffer size in bytes */ int min_fragment_size; /* min fragment size in bytes */ int max_fragment_size; /* max fragment size in bytes */ int fragment_align; /* align fragment value */ int fifo_size; /* stream FIFO size in bytes */ int transfer_block_size; /* bus transfer block size in bytes */ snd_pcm_digital_t dig_mask; /* AES/EBU/IEC958 supported bits */ long mmap_size; /* mmap data size */ int mixer_device; /* mixer device */ snd_mixer_eid_t mixer_eid; /* mixer element identification */ char reserved[64]; /* reserved for future... */ } snd_pcm_channel_info_t;
Flag | Description |
---|---|
SND_PCM_CHNINFO_MMAP | Hardware supports mmap access. |
SND_PCM_CHNINFO_STREAM | Hardware supports stream mode. |
SND_PCM_CHNINFO_BLOCK | Hardware supports block mode. |
SND_PCM_CHNINFO_BATCH | Hardware does double buffering. |
SND_PCM_CHNINFO_INTERLEAVE | Hardware accepts interleaved stream samples. |
SND_PCM_CHNINFO_NONINTERLEAVE | Hardware accepts non-interleaved stream samples. |
SND_PCM_CHNINFO_BLOCK_TRANSFER | Hardware transfers samples by chunks (for example PCI burst transfers). |
SND_PCM_CHNINFO_OVERRANGE | Hardware supports ADC (capture) overrange detection. |
SND_PCM_CHNINFO_MMAP_VALID | Fragment samples are valid during transfer. It means that the fragment samples may be used when the io member from the mmap control structure snd_pcm_mmap_control_t is set (the fragment is being transferred). |
SND_PCM_CHNINFO_PAUSE | Hardware supports pause (playback only). |