| ![[Previous]](../image-lib/prev.gif) | ![[Contents]](../image-lib/contents.gif) | ![[Next]](../image-lib/next.gif) | 
Get information about the PCM direction
#include <sys/asoundlib.h>
int snd_pcm_channel_info( snd_pcm_t * handle, 
                          snd_pcm_channel_info_t * info );
libasound.so
The snd_pcm_channel_info() function fills the info structure with data about the PCM channel selected by handle. The channel member specifies the direction. Other members are read-only.
typedef union snd_pcm_sync
{
    uint8_t     id[16];
    uint16_t    id16[8];
    uint32_t    id32[4];
    uint64_t    id64[2];
}       snd_pcm_sync_t;
typedef struct snd_pcm_digital
{
    uint8_t     dig_status[24];         /* AES/EBU/IEC958 channel status bits */
    uint8_t     dig_subcode[147];       /* AES/EBU/IEC958 subcode bits */
    uint8_t     dig_valid:1;            /* must be non-zero to accept these values */
    uint8_t     dig_subframe[4];        /* AES/EBU/IEC958 subframe bits */
    uint8_t     reserved[128];          /* must be filled with zero */
}       snd_pcm_digital_t;
where:
typedef struct snd_pcm_channel_info
{
    int32_t     subdevice;              
    int8_t      subname[36];            
    int32_t     channel;                
    int32_t     zero1;                  
    int32_t     zero2[4];               
    uint32_t    flags;                  
    uint32_t    formats;                
    uint32_t    rates;                  
    int32_t     min_rate;               
    int32_t     max_rate;               
    int32_t     min_voices;             
    int32_t     max_voices;             
    int32_t     max_buffer_size;        
    int32_t     min_fragment_size;      
    int32_t     max_fragment_size;      
    int32_t     fragment_align;         
    int32_t     fifo_size;              
    int32_t     transfer_block_size;    
    uint8_t     zero3[4];               
    snd_pcm_digital_t dig_mask;         
    uint32_t    zero4;                  
    int32_t     mixer_device;           
    snd_mixer_eid_t mixer_eid;          
    snd_mixer_gid_t mixer_gid;          
    uint8_t     reserved[128];          
}       snd_pcm_channel_info_t;
where:
Zero on success, or an error code.
See the example in Configuring the Audio channel in the Playing Audio Data chapter. This call is identical to the snd_pcm_plugin_info() call.
| Safety: | |
|---|---|
| Cancellation point | No | 
| Interrupt handler | No | 
| Signal handler | Yes | 
| Thread | Yes | 
| ![[Previous]](../image-lib/prev.gif) | ![[Contents]](../image-lib/contents.gif) | ![[Next]](../image-lib/next.gif) |