MT2523 API Reference  LinkIt SDK v4
Enum

Overview

Enumerations

enum  hal_audio_status_t {
  HAL_AUDIO_STATUS_INVALID_PARAMETER = -2,
  HAL_AUDIO_STATUS_ERROR = -1,
  HAL_AUDIO_STATUS_OK = 0
}
 Audio status. More...
 
enum  hal_audio_event_t {
  HAL_AUDIO_EVENT_ERROR = -1,
  HAL_AUDIO_EVENT_NONE = 0,
  HAL_AUDIO_EVENT_UNDERFLOW = 1,
  HAL_AUDIO_EVENT_DATA_REQUEST = 2,
  HAL_AUDIO_EVENT_DATA_NOTIFICATION = 3
}
 Audio event. More...
 
enum  hal_audio_device_t {
  HAL_AUDIO_DEVICE_NONE = 0x0000,
  HAL_AUDIO_DEVICE_MAIN_MIC = 0x0001,
  HAL_AUDIO_DEVICE_HEADSET_MIC = 0x0002,
  HAL_AUDIO_DEVICE_HANDSET = 0x0004,
  HAL_AUDIO_DEVICE_HANDS_FREE_MONO = 0x0008,
  HAL_AUDIO_DEVICE_HANDS_FREE_STEREO = 0x0010,
  HAL_AUDIO_DEVICE_HEADSET = 0x0020,
  HAL_AUDIO_DEVICE_HEADSET_MONO = 0x0040,
  HAL_AUDIO_DEVICE_LINE_IN = 0x0080,
  HAL_AUDIO_DEVICE_DUAL_DIGITAL_MIC = 0x0100,
  HAL_AUDIO_DEVICE_SINGLE_DIGITAL_MIC = 0x0200
}
 Audio device. More...
 
enum  hal_audio_mute_t {
  HAL_AUDIO_MUTE_MAIN_MIC = 0x0001,
  HAL_AUDIO_MUTE_EAR_MIC = 0x0002,
  HAL_AUDIO_MUTE_HANDSET = 0x0004,
  HAL_AUDIO_MUTE_HANDS_FREE = 0x0008,
  HAL_AUDIO_MUTE_HEADSET = 0x0010,
  HAL_AUDIO_MUTE_LINE_IN = 0x0020
}
 Define the audio mute function. More...
 
enum  hal_audio_mute_function_t {
  HAL_AUDIO_MUTE_FUNCTION_NONE = 0,
  HAL_AUDIO_MUTE_FUNCTION_PCM = 1
}
 Define the audio mute function. More...
 
enum  hal_audio_sampling_rate_t {
  HAL_AUDIO_SAMPLING_RATE_8KHZ = 0,
  HAL_AUDIO_SAMPLING_RATE_11_025KHZ = 1,
  HAL_AUDIO_SAMPLING_RATE_12KHZ = 2,
  HAL_AUDIO_SAMPLING_RATE_16KHZ = 3,
  HAL_AUDIO_SAMPLING_RATE_22_05KHZ = 4,
  HAL_AUDIO_SAMPLING_RATE_24KHZ = 5,
  HAL_AUDIO_SAMPLING_RATE_32KHZ = 6,
  HAL_AUDIO_SAMPLING_RATE_44_1KHZ = 7,
  HAL_AUDIO_SAMPLING_RATE_48KHZ = 8,
  HAL_AUDIO_SAMPLING_RATE_96KHZ = 9
}
 Define audio sampling rate. More...
 
enum  hal_audio_bits_per_sample_t {
  HAL_AUDIO_BITS_PER_SAMPLING_16 = 0,
  HAL_AUDIO_BITS_PER_SAMPLING_24 = 1
}
 Define the number of bits per second (bps) to stream audio data. More...
 
enum  hal_audio_channel_number_t {
  HAL_AUDIO_MONO = 0,
  HAL_AUDIO_STEREO = 1,
  HAL_AUDIO_STEREO_BOTH_L_CHANNEL = 2,
  HAL_AUDIO_STEREO_BOTH_R_CHANNEL = 3
}
 audio channel number define More...
 
enum  hal_audio_active_type_t {
  HAL_AUDIO_PLAYBACK_MUSIC = 0,
  HAL_AUDIO_PLAYBACK_VOICE = 1,
  HAL_AUDIO_RECORD_VOICE = 2,
  HAL_AUDIO_TWO_WAY_VOICE = 3,
  HAL_AUDIO_PLAYBACK_MUSIC_RECORD_VOICE = 4
}
 audio function define More...
 

Enumeration Type Documentation

audio function define

Enumerator
HAL_AUDIO_PLAYBACK_MUSIC 

Audio playback: music.

HAL_AUDIO_PLAYBACK_VOICE 

Voice playback: voice.

HAL_AUDIO_RECORD_VOICE 

Record voice.

HAL_AUDIO_TWO_WAY_VOICE 

Turn on both voice stream in and out.

HAL_AUDIO_PLAYBACK_MUSIC_RECORD_VOICE 

Audio playback: music and Record voice.

Define the number of bits per second (bps) to stream audio data.

Enumerator
HAL_AUDIO_BITS_PER_SAMPLING_16 

16 bps

HAL_AUDIO_BITS_PER_SAMPLING_24 

24 bps

audio channel number define

Enumerator
HAL_AUDIO_MONO 

A single channel.

HAL_AUDIO_STEREO 

Two channels.

HAL_AUDIO_STEREO_BOTH_L_CHANNEL 

Two channels but only output L channel.

That is (L, R) -> (L, L).

HAL_AUDIO_STEREO_BOTH_R_CHANNEL 

Two channels but only output R channel.

That is (L, R) -> (R, R).

Audio device.

Enumerator
HAL_AUDIO_DEVICE_NONE 

No audio device is on.

HAL_AUDIO_DEVICE_MAIN_MIC 

Stream in: main mic.

HAL_AUDIO_DEVICE_HEADSET_MIC 

Stream in: earphone mic.

HAL_AUDIO_DEVICE_HANDSET 

Stream out:receiver.

HAL_AUDIO_DEVICE_HANDS_FREE_MONO 

Stream out:loudspeaker, mono.

HAL_AUDIO_DEVICE_HANDS_FREE_STEREO 

Stream out:loudspeaker, stereo to mono L=R=(R+L)/2.

HAL_AUDIO_DEVICE_HEADSET 

Stream out:earphone, stereo.

HAL_AUDIO_DEVICE_HEADSET_MONO 

Stream out:earphone, mono to stereo.

L=R.

HAL_AUDIO_DEVICE_LINE_IN 

Stream in/out: line in.

HAL_AUDIO_DEVICE_DUAL_DIGITAL_MIC 

Stream in: dual digital mic.

HAL_AUDIO_DEVICE_SINGLE_DIGITAL_MIC 

Stream in: single digital mic.

Audio event.

Enumerator
HAL_AUDIO_EVENT_ERROR 

An error occured during the function call.

HAL_AUDIO_EVENT_NONE 

No error occurred during the function call.

HAL_AUDIO_EVENT_UNDERFLOW 

Transmit data underflow.

HAL_AUDIO_EVENT_DATA_REQUEST 

Send a user request to provide data.

HAL_AUDIO_EVENT_DATA_NOTIFICATION 

This value means notify user rx data is ready.

Define the audio mute function.

Enumerator
HAL_AUDIO_MUTE_FUNCTION_NONE 

No function is disabled.

HAL_AUDIO_MUTE_FUNCTION_PCM 

PCM playback path is disabled.

Define the audio mute function.

Enumerator
HAL_AUDIO_MUTE_MAIN_MIC 

Mute main mic.

HAL_AUDIO_MUTE_EAR_MIC 

Mute earphone mic.

HAL_AUDIO_MUTE_HANDSET 

Mute reciever.

HAL_AUDIO_MUTE_HANDS_FREE 

Mute loudspeaker.

HAL_AUDIO_MUTE_HEADSET 

Mute earphone.

HAL_AUDIO_MUTE_LINE_IN 

Mute line in path.

Define audio sampling rate.

Enumerator
HAL_AUDIO_SAMPLING_RATE_8KHZ 

8000Hz

HAL_AUDIO_SAMPLING_RATE_11_025KHZ 

11025Hz

HAL_AUDIO_SAMPLING_RATE_12KHZ 

12000Hz

HAL_AUDIO_SAMPLING_RATE_16KHZ 

16000Hz

HAL_AUDIO_SAMPLING_RATE_22_05KHZ 

22050Hz

HAL_AUDIO_SAMPLING_RATE_24KHZ 

24000Hz

HAL_AUDIO_SAMPLING_RATE_32KHZ 

32000Hz

HAL_AUDIO_SAMPLING_RATE_44_1KHZ 

44100Hz

HAL_AUDIO_SAMPLING_RATE_48KHZ 

48000Hz

HAL_AUDIO_SAMPLING_RATE_96KHZ 

96000Hz

Audio status.

Enumerator
HAL_AUDIO_STATUS_INVALID_PARAMETER 

A wrong parameter is given.

HAL_AUDIO_STATUS_ERROR 

An error occured during the function call.

HAL_AUDIO_STATUS_OK 

No error occurred during the function call.