Fills the status structure with data about the PCM channel run-time status 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_status {
int channel; /* channel information */
int mode; /* transfer mode */
int status; /* channel status - SND_PCM_STATUS_XXXX */
unsigned int scount; /* number of bytes processed from playback/capture start */
struct timeval stime; /* time when playback/capture was started */
long long ust_stime; /* UST time when playback/capture was started */
int frag; /* current fragment */
int count; /* number of bytes in queue/buffer */
int free; /* bytes in queue still free */
int underrun; /* count of underruns (playback) from last status */
int overrun; /* count of overruns (capture) from last status */
int overrange; /* count of ADC (capture) overrange detections from last status */
char reserved[64]; /* must be filled with zero */
} snd_pcm_channel_status_t;| Member | Description |
|---|---|
| channel | Specifies channel (direction). Can be SND_PCM_CHANNEL_PLAYBACK or SND_PCM_CHANNEL_CAPTURE. |
| mode | Shows channel mode. Can be SND_PCM_MODE_STREAM or SND_PCM_MODE_BLOCK. |
| status | Shows channel status. See to SND_PCM_STATUS_* constants. |
| scount | Shows the count of processed bytes from start of transfer. This value is clipped when reaches the SND_PCM_BOUNDARY value. |
| stime | Shows the start time in gettimeofday format. This member is valid only when the time flags was active in the snd_pcm_channel_params_t structure. |
| ust_stime | Shows the start time in UST format. This member is valid only when the ust_time flags was active in the snd_pcm_channel_params_t structure. |
| frag | Shows the current fragment number (available only in the block mode). |
| count | Count of bytes in queue. |
| free | Bytes in queue still free. |
| underrun | Count of playback underruns from last status. |
| overrun | Count of capture overruns from last status. |
| overrange | Count of capture overrange detections from last status. |