audio_engine_chinfo - return channel layout information for an audio engine
#include <sys/audio/audio_driver.h> void prefix_chinfo(void *state, int chan, unsigned *offsetp, unsigned *incrementp);
pointer to driver supplied soft state
a channel number
pointer to an unsigned integer where the driver stores the offset of the channel within the first sample
pointer to an unsigned integer where the driver stores the increment for the channel between samples
Solaris DDI specific (Solaris DDI)
The audio_engine_chinfo() function is used by the framework to determine the layout of channel data within the audio stream.
The offset indicates the index to the channel's sample data within an audio frame.
The increment is the number of samples separating the channel between adjacent frames.
Both offset and increment are in units of the individual sample size. For example, for signed 16-bit linear PCM, the units are given as int16_t. This is true regardless of whether the engine is monophonic, stereophonic, or in some other configuration.
For engines with typical interleaved samples, the offset value is the same as the channel number, and the increment value is the number of channels for which the engine is configured. If NULL is provided for this entry point, then this simple interleaved layout is assumed.
Other layouts can be used to reorder the channels (by changing the offset value) or interleave data from separate buffers together (by changing the increment value.) This can be used to achieve a functionality similar to the “remux” feature of other audio systems.
This entry point is only supported for playback.
An audio engine may not change the layout of its buffers while it is open
This function may be called from user or kernel context.
See attributes(5) for descriptions of the following attributes: