Data structure that describes the configuration of a PCM subchannel


struct  ado_pcm_config  {
    snd_pcm_format_t            format;
            int32_t         frag_size;
            int32_t         frags_min;
            int32_t         frags_max;
            int32_t         frags_total;
            ado_pcm_mmap_t  mmap;
        } block;
    } mode;
    ado_pcm_dmabuf_t        dmabuf;
    int32_t                 mixer_device;   /* mixer device */
    snd_mixer_eid_t         mixer_eid;      /* pcm subchn source element */
    snd_mixer_gid_t         mixer_gid;      /* lowest-level mixer group
                                               subchn specific */


This structure is passed to the aquire, prepare, and trigger device PCM callback functions, and defines how the PCM subchannel is to be configured. For more information about these callbacks, see ado_pcm_hw_t.

The members are:

The format that the subchannel must support, including the rate, bits, endianness, and channels. The snd_pcm_format_t is defined as:
typedef struct snd_pcm_format
    int32_t     interleave:1;
    int32_t     format;
    int32_t     rate;
    int32_t     voices;
    int32_t     special;
    uint8_t     reserved[124];
} snd_pcm_format_t;
This union has parameters for block and stream mode, but stream mode is deprecated. The block structure includes:

In most cases, the DMA buffer allocated in the aquire callback is frags_total × frag_size in length. But if the hardware has special requirements such that frag_size must be changed, the other members are there to help you select the best buffer size.

A structure the defines the DMA buffer's virtual address, physical address, size, and name if it's to be shared. The ado_pcm_dmabuf structure is defined as:
struct  ado_pcm_dmabuf  {
        uint8_t         *addr;
        off64_t         phys_addr;
        size_t          size;
        int8_t          name[QNX_SHM_NAME_LEN];
mixer_device, mixer_eid, mixer_gid
The mixer members give the best associated mixer, element and group to do with this PCM device.


QNX Neutrino

See also: