Go to main content

man pages section 9: DDI and DKI Driver Entry Points

Exit Print View

Updated: Thursday, June 13, 2019
 
 

audio_engine_sync(9E)

Name

audio_engine_sync - synchronize DMA caches for an audio engine

Synopsis

#include <sys/audio/audio_driver.h>

void prefix_sync(void *state, unsigned nframes)

Parameters

state

pointer to driver supplied soft state

nframes

integer value indicating the number of frames that have been either sent or received and need to be synchronized in the cache since the last time audio_engine_sync() was called

Interface Level

Solaris DDI specific (Solaris DDI)

Description

The audio_engine_sync() function is used as a hook to request device drivers to perform DMA cache synchronization of the buffer.

Drivers should call ddi_dma_sync(9F) when this function is called. The direction used for the operation can be determined by the driver. Engines performing playback must use DDI_DMA_SYNC_FORDEV, and engines performing record must use DDI_DMA_SYNC_FORKERNEL.

Drivers are responsible for maintaining a running index to keep track of the offset where cache synchronization is needed, but the framework indicates how many frames need to be synchronized in the nframes parameter. Many drivers elect to synchronize the entire buffer for simplicity.

The index should be reset to 0 whenever audio_engine_start(9E) is called.

Context

This function may be called from user or interrupt context.

Attributes

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

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed

See Also

audio(4D), attributes(7), audio_engine_start(9E), ddi_dma_sync(9F), audio_engine_ops(9S)