stream/inc/Stream.h
Stream
Header:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
🚀 QLI Version 2.1.1 is now live ! Switch to new version to check out the latest content
stream/inc/Stream.h
StreamconnectToDefaultDeviceint connectToDefaultDevice(Stream *streamHandle, uint32_t dir)
Stream Stream()
~Stream ~Stream()
isInitializedbool isInitialized() const
openint32_t open()=0
closeint32_t close()=0
startint32_t start()=0
start_lint32_t start_l()
stopint32_t stop()=0
prepareint32_t prepare()=0
drainint32_t drain(pal_drain_type_t type __unused)=0
setVolumeint32_t setVolume(struct pal_volume_data *volume)=0
muteint32_t mute(bool state)=0
mute_lint32_t mute_l(bool state)=0
getDeviceMuteint32_t getDeviceMute(pal_stream_direction_t dir, bool *state)
setDeviceMuteint32_t setDeviceMute(pal_stream_direction_t dir, bool state)
pauseint32_t pause()=0
pause_lint32_t pause_l()=0
resumeint32_t resume()=0
resume_lint32_t resume_l()=0
flushint32_t flush()=0
suspendint32_t suspend()=0
readint32_t read(struct pal_buffer *buf)=0
addRemoveEffectint32_t addRemoveEffect(pal_audio_effect_t effect, bool enable)=0
setParametersint32_t setParameters(uint32_t param_id, void *payload)=0
setParameters_lint32_t setParameters_l(uint32_t param_id, void *payload)
writeint32_t write(struct pal_buffer *buf)=0
registerCallBackint32_t registerCallBack(pal_stream_callback cb, uint64_t cookie)=0
getCallBackint32_t getCallBack(pal_stream_callback *cb)=0
getParametersint32_t getParameters(uint32_t param_id, void **payload)=0
setECRefint32_t setECRef(std::shared_ptr< Device > dev, bool is_enable)=0
setECRef_lint32_t setECRef_l(std::shared_ptr< Device > dev, bool is_enable)=0
ssrDownHandlerint32_t ssrDownHandler()=0
ssrUpHandlerint32_t ssrUpHandler()=0
isBitWidthSupportedint32_t isBitWidthSupported(uint32_t bitWidth)=0
isSampleRateSupportedint32_t isSampleRateSupported(uint32_t sampleRate)=0
isChannelSupportedint32_t isChannelSupported(uint32_t numChannels)=0
isStreamSupportedbool isStreamSupported()
createMmapBufferint32_t createMmapBuffer(int32_t min_size_frames __unused, struct pal_mmap_buffer *info __unused)
GetMmapPositionint32_t GetMmapPosition(struct pal_mmap_position *position __unused)
GetNumEventsuint32_t GetNumEvents()
GetOutputTokenuint32_t GetOutputToken()
GetPayloadSizeuint32_t GetPayloadSize()
GetSdzNumEventsuint32_t GetSdzNumEvents()
GetSdzOutputTokenuint32_t GetSdzOutputToken()
GetSdzPayloadSizeuint32_t GetSdzPayloadSize()
GetMMAModelTypeuint32_t GetMMAModelType()
setCustomParamint32_t setCustomParam(custom_payload_uc_info_t *uc_info, std::string param_str, void *param_payload, size_t payload_size)
getCustomParamint32_t getCustomParam(custom_payload_uc_info_t *uc_info, std::string param_str, void *param_payload, size_t *payload_size)
ConfigSupportLPIbool ConfigSupportLPI()
checkStreamMatchbool checkStreamMatch(Stream *ref)
IsStreamInBufferingbool IsStreamInBuffering()
getVoteTypevote_type_t getVoteType()
getStreamAttributesint32_t getStreamAttributes(struct pal_stream_attributes *sattr)
getStreamSelectorconst std::string & getStreamSelector() const
getDevicePPSelectorconst std::string & getDevicePPSelector() const
getStreamTypeint32_t getStreamType(pal_stream_type_t *streamType)
getStreamDirectionint32_t getStreamDirection(pal_stream_direction_t *dir)
getRenderLatencyuint32_t getRenderLatency()
getLatencyuint32_t getLatency()
getAssociatedDevicesint32_t getAssociatedDevices(std::vector< std::shared_ptr< Device > > &adevices)
getAssociatedOutDevicesint32_t getAssociatedOutDevices(std::vector< std::shared_ptr< Device > > &adevices)
getAssociatedInDevicesint32_t getAssociatedInDevices(std::vector< std::shared_ptr< Device > > &adevices)
getPalDevicesint32_t getPalDevices(std::vector< std::shared_ptr< Device > > &PalDevices)
removePalDevicevoid removePalDevice(Stream *streamHandle, int palDevId)
clearOutPalDevicesvoid clearOutPalDevices(Stream *streamHandle)
addPalDevicevoid addPalDevice(Stream *streamHandle, struct pal_device *dattr)
getSoundCardIdint32_t getSoundCardId()
getAssociatedSessionint32_t getAssociatedSession(Session **session)
setBufInfoint32_t setBufInfo(pal_buffer_config *in_buffer_config, pal_buffer_config *out_buffer_config)
getBufInfoint32_t getBufInfo(size_t *in_buf_size, size_t *in_buf_count, size_t *out_buf_size, size_t *out_buf_count)
getMaxMetadataSzint32_t getMaxMetadataSz(size_t *in_max_metadata_sz, size_t *out_max_metadata_sz)
getBufSizeint32_t getBufSize(size_t *in_buf_size, size_t *out_buf_size)
getVolumeDataint32_t getVolumeData(struct pal_volume_data *vData)
setGainLevelvoid setGainLevel(int level)
getGainLevelint getGainLevel()
setDutyCycleEnablevoid setDutyCycleEnable(bool enable)
getDutyCycleEnablebool getDutyCycleEnable()
setOrientationvoid setOrientation(int orientation)
getOrientationint getOrientation()
isStreamAudioOutFmtSupportedbool isStreamAudioOutFmtSupported(pal_audio_fmt_t format)
getTimestampint32_t getTimestamp(struct pal_session_time *stime)
disconnectStreamDeviceint disconnectStreamDevice(Stream *streamHandle, pal_device_id_t dev_id)
disconnectStreamDevice_lint disconnectStreamDevice_l(Stream *streamHandle, pal_device_id_t dev_id)
connectStreamDeviceint connectStreamDevice(Stream *streamHandle, struct pal_device *dattr)
connectStreamDevice_lint connectStreamDevice_l(Stream *streamHandle, struct pal_device *dattr)
switchDeviceint switchDevice(Stream *streamHandle, uint32_t no_of_devices, struct pal_device *deviceArray)
getEffectParametersint32_t getEffectParameters(void *effect_query, size_t *payload_size)
getInstanceIduint32_t getInstanceId()
setInstanceIdvoid setInstanceId(uint32_t sid)
initStreamSmphint initStreamSmph()
deinitStreamSmphint deinitStreamSmph()
postStreamSmphint postStreamSmph()
waitStreamSmphint waitStreamSmph()
checkStreamMatchbool checkStreamMatch(pal_device_id_t pal_device_id, pal_stream_type_t pal_stream_type)
checkStreamMatchbool checkStreamMatch(pal_device_id_t pal_device_id, pal_stream_type_t pal_stream_type, char *address)
isStreamSSRDownFeasibilebool isStreamSSRDownFeasibile()
getCurStatestream_state_t getCurState()
isActivebool isActive()
isAlivebool isAlive()
isA2dpMutedbool isA2dpMuted()
Resumeint32_t Resume(bool is_internal=false)
Pauseint32_t Pause(bool is_internal=false)
HandleConcurrentStreamint32_t HandleConcurrentStream(bool active)
DisconnectDeviceint32_t DisconnectDevice(pal_device_id_t device_id)
ConnectDeviceint32_t ConnectDevice(pal_device_id_t device_id)
getCallbackEventIduint32_t getCallbackEventId()
HandleCallbackvoid HandleCallback(uint64_t hdl, uint32_t event_id, void *data, uint32_t event_size)
lockStreamMutexvoid lockStreamMutex()
unlockStreamMutexvoid unlockStreamMutex()
isMutexLockedbyRmbool isMutexLockedbyRm()
lockGetParamMutexvoid lockGetParamMutex()
unlockGetParamMutexvoid unlockGetParamMutex()
setCachedStatevoid setCachedState(stream_state_t state)
clearmDevicesvoid clearmDevices()
removemDevicevoid removemDevice(int palDevId)
addmDevicevoid addmDevice(struct pal_device *dattr)
removeLastmDevicevoid removeLastmDevice()
GetCurrentCaptureProfilestd::shared_ptr< CaptureProfile > GetCurrentCaptureProfile()
createStream * create(struct pal_stream_attributes *sattr, struct pal_device *dattr, uint32_t no_of_devices, struct modifier_kv *modifiers, uint32_t no_of_modifiers)
destroyint32_t destroy(Stream *s)
handleStreamCreateFailurevoid handleStreamCreateFailure(struct pal_stream_attributes *attributes, pal_stream_callback cb, uint64_t cookie)
mixerEventCallbackEntryvoid mixerEventCallbackEntry(uint64_t cookie, uint32_t event_id, void *payload, uint32_t payload_size)
dataFlags| Name | Value | Description |
|---|---|---|
DATA_MODE_SHMEM | = 0 | |
DATA_MODE_BLOCKING | ||
DATA_MODE_NONBLOCKING |
stream_state_t| Name | Value | Description |
|---|---|---|
STREAM_IDLE | = 0 | |
STREAM_INIT | ||
STREAM_OPENED | ||
STREAM_STARTED | ||
STREAM_PAUSED | ||
STREAM_SUSPENDED | ||
STREAM_STOPPED |
BUF_SIZE_PLAYBACK#define BUF_SIZE_PLAYBACK 1024
BUF_SIZE_CAPTURE#define BUF_SIZE_CAPTURE 960
AUDIO_CAPTURE_PERIOD_DURATION_MSEC#define AUDIO_CAPTURE_PERIOD_DURATION_MSEC 20
DEEP_BUFFER_OUTPUT_PERIOD_DURATION#define DEEP_BUFFER_OUTPUT_PERIOD_DURATION 40
PCM_OFFLOAD_OUTPUT_PERIOD_DURATION#define PCM_OFFLOAD_OUTPUT_PERIOD_DURATION 80
COMPRESS_OFFLOAD_FRAGMENT_SIZE#define COMPRESS_OFFLOAD_FRAGMENT_SIZE (32 * 1024)
NO_OF_BUF#define NO_OF_BUF 4
SSR_RECOVERY#define SSR_RECOVERY 10000
VOLUME_RAMP_PERIOD#define VOLUME_RAMP_PERIOD (200*1000)
MUTE_RAMP_PERIOD#define MUTE_RAMP_PERIOD (40*1000)
DEFAULT_RAMP_PERIOD#define DEFAULT_RAMP_PERIOD 0x28
