Go to main content

man pages section 9: DDI and DKI Driver Entry Points

Exit Print View

Updated: July 2017
 
 

audio_engine_chinfo(9E)

Name

audio_engine_chinfo - return channel layout information for an audio engine

Synopsis

#include <sys/audio/audio_driver.h>

void prefix_chinfo(void *state, int chan, unsigned *offsetp,
     unsigned *incrementp);

Parameters

state

pointer to driver supplied soft state

chan

a channel number

offsetp

pointer to an unsigned integer where the driver stores the offset of the channel within the first sample

incrementp

pointer to an unsigned integer where the driver stores the increment for the channel between samples

Interface Level

Solaris DDI specific (Solaris DDI)

Description

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

Context

This function may be called from user or kernel context.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed

See Also

attributes(5), audio(7D), audio_engine_ops(9S)