summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-03-13 01:48:53 +0900
committerJinkun Jang <jinkun.jang@samsung.com>2013-03-13 01:48:53 +0900
commit785814c493c819a9f94a083a69ad42a63f221386 (patch)
tree92f024acac4b80e82a1bfe33ce0ec6778ae1a7bb /include
parentb8e758c1624a163a988aa868fbf3da19e2612f6c (diff)
downloadavsystem-785814c493c819a9f94a083a69ad42a63f221386.tar.gz
avsystem-785814c493c819a9f94a083a69ad42a63f221386.tar.bz2
avsystem-785814c493c819a9f94a083a69ad42a63f221386.zip
Tizen 2.1 base
Diffstat (limited to 'include')
-rw-r--r--include/avsys-audio-alsa.h26
-rw-r--r--include/avsys-audio-ascenario.h6
-rw-r--r--include/avsys-audio-handle.h4
-rw-r--r--include/avsys-audio-logical-volume.h62
-rw-r--r--include/avsys-audio-pasimple.h3
-rw-r--r--include/avsys-audio-path.h92
-rw-r--r--include/avsys-audio-sync.h2
-rw-r--r--include/avsys-audio.h72
-rw-r--r--include/avsys-debug.h22
9 files changed, 140 insertions, 149 deletions
diff --git a/include/avsys-audio-alsa.h b/include/avsys-audio-alsa.h
index 1711f84..7e2dea0 100644
--- a/include/avsys-audio-alsa.h
+++ b/include/avsys-audio-alsa.h
@@ -27,22 +27,30 @@
#endif
#include <avsys-audio-handle.h>
-enum AIF_device_type_t {
- AIF2_CAPTURE,
- AIF2_PLAYBACK,
- AIF3_CAPTURE,
- AIF3_PLAYBACK,
+typedef enum {
+ AIF_CP_CAPTURE,
+ AIF_CP_PLAYBACK,
+ AIF_BT_CAPTURE,
+ AIF_BT_PLAYBACK,
+ AIF_RADIO_PLAYBACK,
AIF_DEVICE_MAX,
-};
+} aif_device_type_t;
+
+typedef enum {
+ AIF_CONF_RATE = 0,
+ AIF_NB_RATE = 8000,
+ AIF_WB_RATE = 16000,
+} aif_rate_t;
typedef struct {
void *alsa_handle;
int type;
-} avsys_audio_alsa_aif_handle_t;;
+ int rate;
+} avsys_audio_alsa_aif_handle_t;
-int avsys_audio_alsa_open_AIF_device(const int AIF_type, avsys_audio_alsa_aif_handle_t *handle);
+int avsys_audio_alsa_open_AIF_device(aif_device_type_t aif_type, avsys_audio_alsa_aif_handle_t *handle);
int avsys_audio_alsa_close_AIF_device(avsys_audio_alsa_aif_handle_t* handle);
-int avsys_audio_alsa_set_AIF_params(avsys_audio_alsa_aif_handle_t *handle);
+int avsys_audio_alsa_set_AIF_params(avsys_audio_alsa_aif_handle_t *handle, aif_rate_t rate);
#ifdef __cplusplus
}
diff --git a/include/avsys-audio-ascenario.h b/include/avsys-audio-ascenario.h
index a5f8c24..3e01df7 100644
--- a/include/avsys-audio-ascenario.h
+++ b/include/avsys-audio-ascenario.h
@@ -62,8 +62,8 @@ typedef enum {
#define OUTPUT_CH_8 ((1 << (8 + OUT))) /* Gain */
#define OUTPUT_CH_9 ((1 << (9 + OUT))) /* Video call gain */
#define OUTPUT_CH_10 ((1 << (10 + OUT))) /* Video call gain */
-#define OUTPUT_CH_11 ((1 << (11 + OUT))) /* Reserved */
-#define OUTPUT_CH_12 ((1 << (12 + OUT))) /* Reserved */
+#define OUTPUT_CH_11 ((1 << (11 + OUT))) /* HDMI */
+#define OUTPUT_CH_12 ((1 << (12 + OUT))) /* Dock */
#define OUTPUT_CH_13 ((1 << (13 + OUT))) /* Call alert Gain */
#define INPUT_MAIN_MIC (INPUT_CH_0)
@@ -83,6 +83,8 @@ typedef enum {
#define OUTPUT_BT_HEADSET (OUTPUT_CH_5)
#define OUTPUT_CP (OUTPUT_CH_6)
#define OUTPUT_AP (OUTPUT_CH_7)
+#define OUTPUT_HDMI (OUTPUT_CH_11)
+#define OUTPUT_DOCK (OUTPUT_CH_12)
#define GAIN_MODE (OUTPUT_CH_8)
#define GAIN_VIDEO_CALL (OUTPUT_CH_9)
diff --git a/include/avsys-audio-handle.h b/include/avsys-audio-handle.h
index b05c099..41db071 100644
--- a/include/avsys-audio-handle.h
+++ b/include/avsys-audio-handle.h
@@ -97,7 +97,7 @@ enum {
int avsys_audio_handle_init(void);
int avsys_audio_handle_fini(void);
-int avsys_audio_handle_reset(int *);
+int avsys_audio_handle_reset(int *volume_value);
int avsys_audio_handle_dump(void);
int avsys_audio_handle_rejuvenation(void);
int avsys_audio_handle_alloc(int *handle);
@@ -109,7 +109,7 @@ int avsys_audio_handle_ext_dev_set_mute(avsysaudio_ext_device_t device_type, int
int avsys_audio_handle_ext_dev_status(avsysaudio_ext_device_t device_type, int *onoff);
int avsys_audio_handle_ext_dev_status_update(avsysaudio_ext_device_t device_type, int onoff);
int avsys_audio_handle_current_playing_volume_type(int *type);
-int avsys_audio_handle_update_volume(avsys_audio_handle_t *p, const int vol_type);
+int avsys_audio_handle_update_volume(avsys_audio_handle_t *p, const int volume_config);
int avsys_audio_handle_update_volume_by_type(const int volume_type, const int volume_value);
int avsys_audio_handle_set_primary_volume_type(const int pid, const int type, const int command);
int avsys_audio_handle_update_priority(int handle, int priority, int handle_route, int cmd);
diff --git a/include/avsys-audio-logical-volume.h b/include/avsys-audio-logical-volume.h
index 1b4ad52..e20f896 100644
--- a/include/avsys-audio-logical-volume.h
+++ b/include/avsys-audio-logical-volume.h
@@ -31,22 +31,37 @@
#define FADE_UP_MULTIPLIER 1//2
#define FADE_DOWN_MULTIPLIER 1
-#define VOLUME_FILE_PATH "/opt/system/volume.txt"
+#define AVSYS_VOLUME_INI_DEFAULT_PATH "/usr/etc/mmfw_audio_volume.ini"
+#define AVSYS_VOLUME_INI_TEMP_PATH "/opt/system/mmfw_audio_volume.ini"
-enum
-{
+enum {
AVSYS_AUDIO_LVOL_GAIN_TYPE_0 = 0, /* system */
AVSYS_AUDIO_LVOL_GAIN_TYPE_1, /* notification */
AVSYS_AUDIO_LVOL_GAIN_TYPE_2, /* alarm */
AVSYS_AUDIO_LVOL_GAIN_TYPE_3, /* ringtone */
AVSYS_AUDIO_LVOL_GAIN_TYPE_4, /* media */
AVSYS_AUDIO_LVOL_GAIN_TYPE_5, /* call */
- AVSYS_AUDIO_LVOL_GAIN_TYPE_6, /* android */
- AVSYS_AUDIO_LVOL_GAIN_TYPE_7, /* java */
- AVSYS_AUDIO_LVOL_GAIN_TYPE_8, /* music (media2) */
+ AVSYS_AUDIO_LVOL_GAIN_TYPE_6, /* voip */
+ AVSYS_AUDIO_LVOL_GAIN_TYPE_7, /* android */
+ AVSYS_AUDIO_LVOL_GAIN_TYPE_8, /* java */
AVSYS_AUDIO_LVOL_GAIN_TYPE_MAX,
};
+enum {
+ AVSYS_AUDIO_LVOL_GAIN_EXT_DIALER = 1<<8,
+ AVSYS_AUDIO_LVOL_GAIN_EXT_TOUCH = 2<<8,
+ AVSYS_AUDIO_LVOL_GAIN_EXT_AF = 3<<8,
+ AVSYS_AUDIO_LVOL_GAIN_EXT_SHUTTER1 = 4<<8,
+ AVSYS_AUDIO_LVOL_GAIN_EXT_SHUTTER2 = 5<<8,
+ AVSYS_AUDIO_LVOL_GAIN_EXT_CAMCORDING = 6<<8,
+ AVSYS_AUDIO_LVOL_GAIN_EXT_MIDI = 7<<8,
+ AVSYS_AUDIO_LVOL_GAIN_EXT_BOOTING = 8<<8,
+ AVSYS_AUDIO_LVOL_GAIN_EXT_VIDEO = 9<<8,
+ AVSYS_AUDIO_LVOL_GAIN_EXT_VIDEO_HDMI = 10<<8,
+ AVSYS_AUDIO_LVOL_GAIN_EXT_TYPE_MAX,
+ AVSYS_AUDIO_LVOL_GAIN_EXT_TYPE_MAX_IDX = AVSYS_AUDIO_LVOL_GAIN_EXT_TYPE_MAX>>8
+};
+
enum
{
AVSYS_AUDIO_LVOL_DEV_TYPE_SPK,
@@ -55,33 +70,38 @@ enum
AVSYS_AUDIO_LVOL_DEV_TYPE_MAX,
};
-
typedef struct {
- int max_len;
- avsys_audio_volume_t gain[LVOLUME_MAX_MULTIMEDIA];
-} avsys_a_logical_volume_t;
+ struct {
+ int max_level;
+ avsys_audio_volume_t logical_values[LVOLUME_MAX_MULTIMEDIA];
+ } devices[AVSYS_AUDIO_LVOL_DEV_TYPE_MAX];
+} avsys_audio_lvol_volume_info_t;
+typedef struct {
+ float devices[AVSYS_AUDIO_LVOL_DEV_TYPE_MAX];
+} avsys_audio_lvol_gain_info_t;
typedef struct {
- int type;
- avsys_a_logical_volume_t devices[AVSYS_AUDIO_LVOL_DEV_TYPE_MAX];
-} avsys_logical_gain_t;
+ avsys_audio_lvol_volume_info_t volume_table[AVSYS_AUDIO_LVOL_GAIN_TYPE_MAX];
+ avsys_audio_lvol_gain_info_t gain_table[AVSYS_AUDIO_LVOL_GAIN_EXT_TYPE_MAX_IDX];
+} avsys_audio_lvol_info_t;
typedef struct {
- int vol_type;
+ int volume_config;
int dev_type;
- int max_len;
- avsys_audio_volume_t *table;
+ int max_level;
} avsys_audio_volume_setting_t;
-int avsys_audio_logical_volume_get_max(int vol_type, int dev_type, int *max);
-int avsys_audio_logical_volume_set_table(int vol_type, int dev_type, avsys_audio_volume_setting_t *setting);
+int avsys_audio_logical_volume_get_max(int volume_type, int dev_type, int *max_level);
+int avsys_audio_logical_volume_set_table(int volume_config, int dev_type, avsys_audio_volume_setting_t *setting);
int avsys_audio_logical_volume_update_table(int dev_type, avsys_audio_volume_setting_t *setting);
int avsys_audio_logical_volume_convert(avsys_audio_volume_t *level, avsys_audio_volume_t *converted, avsys_audio_volume_setting_t *setting);
/* Tuning */
int avsys_audio_logical_volume_init(void);
-int avsys_audio_logical_volume_set_to_table(int gain_type, int dev_type, int step, int lv, int rv);
-int avsys_audio_logical_volume_get_from_table(int gain_type, int dev_type, int step, int *lv, int *rv);
-int avsys_audio_load_volume_from_file(void);
+int avsys_audio_logical_volume_set_to_table(int volume_type, int dev_type, int step, int lv, int rv);
+int avsys_audio_logical_volume_get_from_table(int volume_type, int dev_type, int step, int *lv, int *rv);
+int avsys_audio_logical_volume_set_gain_to_table(int volume_gain, int dev_type, float lv, float rv);
+int avsys_audio_logical_volume_get_gain_from_table(int volume_gain, int dev_type, float*lv, float *rv);
+int avsys_audio_load_volume_from_ini(void);
#endif /* __AVSYS_AUDIO_LOGICAL_VOLUME_H__ */
diff --git a/include/avsys-audio-pasimple.h b/include/avsys-audio-pasimple.h
index 06fec34..53e1525 100644
--- a/include/avsys-audio-pasimple.h
+++ b/include/avsys-audio-pasimple.h
@@ -30,6 +30,7 @@
#include <pulse/error.h>
#include <pulse/gccmacro.h>
#include <pulse/proplist.h>
+#include <pulse/channelmap.h>
typedef struct {
void *pasimple_handle;
@@ -49,6 +50,8 @@ int avsys_audio_pasimple_drain(avsys_audio_handle_t *handle);
int avsys_audio_pasimple_delay(avsys_audio_handle_t *handle, int *delay_frames);
int avsys_audio_pasimple_set_volume(avsys_audio_handle_t *handle, int volume);
int avsys_audio_pasimple_get_period_buffer_time(avsys_audio_handle_t *handle, unsigned int *period_time, unsigned int *buffer_time);
+int avsys_audio_pasimple_cork(avsys_audio_handle_t *handle, int cork);
+int avsys_audio_pasimple_is_corked(avsys_audio_handle_t *handle, int *is_corked);
#ifdef __cplusplus
}
diff --git a/include/avsys-audio-path.h b/include/avsys-audio-path.h
index 2f20b46..cf99e66 100644
--- a/include/avsys-audio-path.h
+++ b/include/avsys-audio-path.h
@@ -53,82 +53,10 @@ enum avsys_audio_capture_gain{
};
enum avsys_audio_ear_ctrl {
- AVSYS_AUDIO_EAR_SWITCH_MANUAL,
- AVSYS_AUDIO_EAR_SWITCH_AUTO_WITH_MUTE,
+ AVSYS_AUDIO_EAR_SWITCH_AUTO_WITH_MUTE = 1,
AVSYS_AUDIO_EAR_SWITCH_AUTO_WITHOUT_MUTE,
};
-struct avsys_audio_jack_event {
- struct timeval time;
- unsigned short type;
- unsigned short code;
- int value;
-};
-
-#define PATH_MASK_MAX 23
-#define GAIN_MASK_MAX 30
-/* sound path status bit */
-#define PS_PATH_NONE (0)
-#define PS_AP_TO_SPK (1 << 0)
-#define PS_AP_TO_HEADSET (1 << 1)
-#define PS_AP_TO_RECV (1 << 2)
-#define PS_AP_TO_HDMI (1 << 3)
-#define PS_AP_TO_BT (1 << 4)
-#define PS_AP_TO_MODEM (1 << 5)
-#define PS_MODEM_TO_SPK (1 << 6)
-#define PS_MODEM_TO_HEADSET (1 << 7)
-#define PS_MODEM_TO_RECV (1 << 8)
-#define PS_MODEM_TO_BT (1 << 9)
-#define PS_MODEM_TO_AP (1 << 10)
-#define PS_FMRADIO_TO_SPK (1 << 11)
-#define PS_FMRADIO_TO_HEADSET (1 << 12)
-#define PS_MAINMIC_TO_AP (1 << 13)
-#define PS_MAINMIC_TO_MODEM (1 << 14)
-#define PS_SUBMIC_TO_AP (1 << 15)
-#define PS_SUBMIC_TO_MODEM (1 << 16)
-#define PS_STEREOMIC_TO_AP (1 << 17)
-#define PS_EARMIC_TO_AP (1 << 18)
-#define PS_EARMIC_TO_MODEM (1 << 19)
-#define PS_BTMIC_TO_AP (1 << 20)
-#define PS_BTMIC_TO_MODEM (1 << 21)
-#define PS_FMRADIO_TO_AP (1 << 22)
-#define PS_CODEC_DISABLE_ON_SUSPEND (1 << 23)
-#define PS_CP_TO_AP (1 << PATH_MASK_MAX)
-
-
-/* hw gain status enum */
-#define GS_GAIN_NONE (0)
-#define GS_AP_TO_SPK (1 << 0)
-#define GS_AP_TO_SPK_CALLALERT (1 << 1)
-#define GS_AP_TO_HEADSET (1 << 2)
-#define GS_AP_TO_HEADSET_CALLALERT (1 << 3)
-#define GS_AP_TO_RECV (1 << 4)
-#define GS_AP_TO_HDMI (1 << 5)
-#define GS_AP_TO_BT (1 << 6)
-#define GS_AP_TO_MODEM (1 << 7)
-#define GS_MODEM_TO_SPK_VOICE (1 << 8)
-#define GS_MODEM_TO_HEADSET_VOICE (1 << 9)
-#define GS_MODEM_TO_RECV_VOICE (1 << 10)
-#define GS_MODEM_TO_BT_VOICE (1 << 11)
-#define GS_MODEM_TO_AP_VOICE (1 << 12)
-#define GS_MODEM_TO_SPK_VIDEO (1 << 13)
-#define GS_MODEM_TO_HEADSET_VIDEO (1 << 14)
-#define GS_MODEM_TO_RECV_VIDEO (1 << 15)
-#define GS_MODEM_TO_BT_VIDEO (1 << 16)
-#define GS_MODEM_TO_AP_VIDEO (1 << 17)
-#define GS_FMRADIO_TO_SPK (1 << 18)
-#define GS_FMRADIO_TO_HEADSET (1 << 19)
-#define GS_MAINMIC_TO_AP (1 << 20)
-#define GS_MAINMIC_TO_MODEM_VOICE (1 << 21)
-#define GS_SUBMIC_TO_AP (1 << 22)
-#define GS_SUBMIC_TO_MODEM_VOICE (1 << 23)
-#define GS_STEREOMIC_TO_AP (1 << 24)
-#define GS_EARMIC_TO_AP (1 << 25)
-#define GS_EARMIC_TO_MODEM_VOICE (1 << 26)
-#define GS_BTMIC_TO_AP (1 << 27)
-#define GS_BTMIC_TO_MODEM_VOICE (1 << 28)
-#define GS_FMRADIO_TO_AP (1 << 29)
-#define GS_CP_TO_AP (1 << GAIN_MASK_MAX)
#define TYPE_EVENT_SWITCH 0x05
#define CODE_HEADPHONE_INSERT 0x02
@@ -137,7 +65,6 @@ struct avsys_audio_jack_event {
#define CODE_JACK_PHYSICAL_INSERT 0x07
#define PATH_FIXED_NONE (0x00000000)
-#define PATH_FIXED_WITH_FMRADIO (1 << PATH_FIXED_TYPE_FMRADIO) /* 0x00000001 */
#define PATH_FIXED_WITH_CALL (1 << PATH_FIXED_TYPE_CALL) /* 0x00000002 */
enum avsys_audio_amp_t {
@@ -186,23 +113,13 @@ typedef struct {
int inserted;
int ear_auto;
- /* for alsa scenario, aquila */
- gain_status_t gain_status;
- path_status_t path_status;
-
- gain_status_t p_gain_status;
- path_status_t p_path_status;
-
int lvol_dev_type;
- int gain_debug_mode;
+ bool control_aif_before_path_set;
+ bool wb_enabled;
+ bool gain_debug_mode;
/* For Lock debugging */
pid_t pathlock_pid[AVSYS_AUDIO_LOCK_SLOT_MAX];
-
- /* system route policy */
- avsys_audio_route_policy_t route_policy;
- int a2dp_status;
- int earpiece_on;
} avsys_audio_path_ex_info_t;
int avsys_audio_path_ex_init(void);
@@ -225,7 +142,6 @@ int avsys_audio_path_earjack_unlock(void);
int avsys_audio_path_set_route_policy(avsys_audio_route_policy_t route);
int avsys_audio_path_get_route_policy(avsys_audio_route_policy_t *route);
-int avsys_audio_path_check_loud(bool *loud);
int avsys_audio_path_check_cp_audio(bool *cpaudio, bool *btpath);
int avsys_audio_path_set_single_ascn(char *str);
diff --git a/include/avsys-audio-sync.h b/include/avsys-audio-sync.h
index d55d5a1..cab7221 100644
--- a/include/avsys-audio-sync.h
+++ b/include/avsys-audio-sync.h
@@ -29,8 +29,6 @@
typedef enum {
AVSYS_AUDIO_SYNC_IDEN_HANDLE,
AVSYS_AUDIO_SYNC_IDEN_PATH,
- AVSYS_AUDIO_SYNC_IDEN_SOUNDPATH,
- AVSYS_AUDIO_SYNC_IDEN_VOLUME,
AVSYS_AUDIO_SYNC_IDEN_CNT
} avsys_audio_sync_iden_t;
diff --git a/include/avsys-audio.h b/include/avsys-audio.h
index 3853f46..51b151c 100644
--- a/include/avsys-audio.h
+++ b/include/avsys-audio.h
@@ -41,6 +41,13 @@
#define AVSYS_AUDIO_VOLUME_MAX_BASIC 8
#define AVSYS_AUDIO_VOLUME_MAX_SINGLE 1
+#define AVSYS_AUDIO_VOLUME_CONFIG_TYPE(vol) (vol & 0x00FF)
+#define AVSYS_AUDIO_VOLUME_CONFIG_GAIN(vol) (vol & 0xFF00)
+#define AVSYS_AUDIO_VOLUME_GAIN_IDX(gain) ((gain >> 8) - 1)
+
+#define AVSYS_CHANNEL_MIN 1
+#define AVSYS_CHANNEL_MAX 6
+
/**
* Enumerations for audio mode
*/
@@ -81,14 +88,28 @@ enum avsys_audio_volume_type_t {
AVSYS_AUDIO_VOLUME_TYPE_RINGTONE,
AVSYS_AUDIO_VOLUME_TYPE_MEDIA,
AVSYS_AUDIO_VOLUME_TYPE_CALL,
+ AVSYS_AUDIO_VOLUME_TYPE_VOIP,
AVSYS_AUDIO_VOLUME_TYPE_FIXED,
AVSYS_AUDIO_VOLUME_TYPE_EXT_SYSTEM_JAVA,
- AVSYS_AUDIO_VOLUME_TYPE_MEDIA_HL,
AVSYS_AUDIO_VOLUME_TYPE_NUM,
AVSYS_AUDIO_VOLUME_TYPE_MAX = AVSYS_AUDIO_VOLUME_TYPE_NUM,
AVSYS_AUDIO_VOLUME_TYPE_EXT_SYSTEM_ANDROID = AVSYS_AUDIO_VOLUME_TYPE_FIXED,
};
+enum avsys_audio_volume_gain_t {
+ AVSYS_AUDIO_VOLUME_GAIN_DIALER = 1<<8,
+ AVSYS_AUDIO_VOLUME_GAIN_TOUCH = 2<<8,
+ AVSYS_AUDIO_VOLUME_GAIN_AF = 3<<8,
+ AVSYS_AUDIO_VOLUME_GAIN_SHUTTER1 = 4<<8,
+ AVSYS_AUDIO_VOLUME_GAIN_SHUTTER2 = 5<<8,
+ AVSYS_AUDIO_VOLUME_GAIN_CAMCORDING = 6<<8,
+ AVSYS_AUDIO_VOLUME_GAIN_MIDI = 7<<8,
+ AVSYS_AUDIO_VOLUME_GAIN_BOOTING = 8<<8,
+ AVSYS_AUDIO_VOLUME_GAIN_VIDEO = 9<<8,
+ AVSYS_AUDIO_VOLUME_GAIN_VIDEO_HDMI = 10<<8,
+ AVSYS_AUDIO_VOLUME_GAIN_TYPE_MAX,
+};
+
enum avsys_audio_priority_t {
AVSYS_AUDIO_PRIORITY_0 = 0, /*< deprecated. use AVSYS_AUDIO_PRIORITY_NORMAL or AVSYS_AUDIO_PRIORITY_SOLO instead */
AVSYS_AUDIO_PRIORITY_NORMAL = AVSYS_AUDIO_PRIORITY_0,
@@ -143,7 +164,7 @@ typedef struct {
int channels; /**< Number of channels */
int samplerate; /**< Sampling rate */
int format; /**< Sampling format */
- int bluetooth; /**< Handle route information. refer. avsys_audio_handle_route_t */
+ int handle_route; /**< Handle route information. refer. avsys_audio_handle_route_t */
int vol_type; /**< volume type */
int allow_mix;
} avsys_audio_param_t;
@@ -169,6 +190,8 @@ enum avsys_audio_path_ex {
AVSYS_AUDIO_PATH_EX_A2DP,
AVSYS_AUDIO_PATH_EX_HANDSFREE,
AVSYS_AUDIO_PATH_EX_HDMI,
+ AVSYS_AUDIO_PATH_EX_DOCK,
+ AVSYS_AUDIO_PATH_EX_USBAUDIO,
AVSYS_AUDIO_PATH_EX_OUTMAX,
AVSYS_AUDIO_PATH_EX_MIC = 1,
AVSYS_AUDIO_PATH_EX_HEADSETMIC,
@@ -224,15 +247,11 @@ typedef enum {
/* path option */
#define AVSYS_AUDIO_PATH_OPTION_NONE 0x00000000 /*!< Sound path option none */
-#define AVSYS_AUDIO_PATH_OPTION_JACK_AUTO 0x00000001 /*!< Sound path auto change between SPK/Recv and headset */
#define AVSYS_AUDIO_PATH_OPTION_DUAL_OUT 0x00000002 /*!< SPK or Recv with headset sound path. used for Ringtone or Alarm */
-#define AVSYS_AUDIO_PATH_OPTION_LEFT_SPK_ONLY 0x00000004 /*!< AP playback left speaker only */
-#define AVSYS_AUDIO_PATH_OPTION_RIGHT_SPK_ONLY 0x00000008 /*!< AP playback right speaker only */
#define AVSYS_AUDIO_PATH_OPTION_VOICECALL_REC 0x00000010 /*!< Voice call recording path option */
#define AVSYS_AUDIO_PATH_OPTION_USE_SUBMIC 0x00000020 /*!< Use sub-mic when call or recording */
#define AVSYS_AUDIO_PATH_OPTION_USE_STEREOMIC 0x00000040 /*!< Use stereo mic when recording */
#define AVSYS_AUDIO_PATH_OPTION_FORCED 0x01000000 /*!< Forced sound path setting. only for booting animation */
-#define AVSYS_AUDIO_PATH_OPTION_LEGACY_MODE 0x10000000 /*!< Now Plus Style */
/**
@@ -263,6 +282,18 @@ int avsys_audio_open(avsys_audio_param_t *param, avsys_handle_t *phandle, int *s
int avsys_audio_close(avsys_handle_t handle);
/**
+ * This function is to update volume type & volume gain.
+ *
+ * @param handle [in] Handle of audio system
+ *
+ * @return This function returns AVSYS_STATE_SUCCESS on success, or negative
+ * value with error code.
+ * @remark
+ * @see
+ */
+int avsys_audio_update_volume_config(avsys_handle_t handle, int volume_config);
+
+/**
* This function is to stop playback stream immediately. this drops all buffer remaining data.
*
* @param handle [in] Playback handle of audio system
@@ -335,8 +366,10 @@ int avsys_audio_read(avsys_handle_t handle, void *buf, int size);
*/
int avsys_audio_write(avsys_handle_t handle, void *buf, int size);
-int avsys_audio_set_volume_table(int gain_type, int dev_type, int step, int lv, int rv);
-int avsys_audio_get_volume_table(int gain_type, int dev_type, int step, int *lv, int *rv);
+int avsys_audio_set_volume_table(int volume_type, int dev_type, int step, int lv, int rv);
+int avsys_audio_get_volume_table(int volume_type, int dev_type, int step, int *lv, int *rv);
+int avsys_audio_set_volume_gain_table(int volume_gain_idx, int dev_type, float lv, float rv);
+int avsys_audio_get_volume_gain_table(int volume_gain_idx, int dev_type, float *lv, float *rv);
int avsys_audio_set_volume_fadeup(avsys_handle_t handle);
@@ -551,16 +584,30 @@ int avsys_audio_reset(avsys_handle_t handle);
int avsys_audio_get_period_buffer_time(avsys_handle_t handle, unsigned int *period_time, unsigned int *buffer_time);
/**
- * This function is to get playback audio device information of system.
+ * This function is to cork stream.
+ *
+ * @param handle [in] handle to cork
+ * @param cork [in] cork=1, uncork=0
+ *
+ * @return This function returns AVSYS_STATE_SUCCESS on success, or negative
+ * value with error code.
+ * @remark
+ * @see
+ */
+int avsys_audio_cork (avsys_handle_t handle, int cork);
+
+/**
+ * This function is to check whether stream is corked or not.
*
- * @param dev [out] current playback device type
+ * @param handle [in] handle to cork
+ * @param is_corked [out] corked is 1, otherwise 0
*
* @return This function returns AVSYS_STATE_SUCCESS on success, or negative
* value with error code.
* @remark
- * @see avsys_audio_playing_devcie_t
+ * @see
*/
-int avsys_audio_get_playing_device_info(avsys_audio_playing_devcie_t *dev);
+int avsys_audio_is_corked (avsys_handle_t handle, int *is_corked);
/**
* This function is to get audio capturing status of system.
@@ -580,6 +627,7 @@ int avsys_audio_earjack_manager_init(int *earjack_type, int *waitfd);
int avsys_audio_earjack_manager_wait(int waitfd, int *current_earjack_type, int *new_earjack_type, int *need_mute);
int avsys_audio_earjack_manager_process(int new_earjack_type);
int avsys_audio_earjack_manager_deinit(int waitfd);
+int avsys_audio_earjack_manager_get_type(void);
int avsys_audio_earjack_manager_unlock(void);
int avsys_audio_set_route_policy(avsys_audio_route_policy_t route);
diff --git a/include/avsys-debug.h b/include/avsys-debug.h
index 6f19daa..d7ded66 100644
--- a/include/avsys-debug.h
+++ b/include/avsys-debug.h
@@ -32,28 +32,24 @@
#ifdef __USE_LOGMANAGER__
#include <stdio.h>
#include <mm_log.h>
-#define AVAUDIO LOG_AVAUDIO
-#define AVVIDEO LOG_AVVIDEO
-#define AVCAMERA LOG_AVCAMERA
+#define AVAUDIO LOG_AVSYSTEM
#else
#define AVAUDIO
-#define AVVIDEO
-#define AVCAMERA
#endif
#ifdef __DEBUG_MODE__
#ifdef __USE_LOGMANAGER__
-#define avsys_info_r(owner, msg, args...) log_print_rel( owner, LOG_CLASS_INFO, "[%05d:%s] "msg, __LINE__, __func__, ##args )
-#define avsys_warning_r(owner, msg, args...) log_print_rel( owner, LOG_CLASS_WARNING, "[%05d:%s] "msg, __LINE__, __func__, ##args )
-#define avsys_error_r(owner, msg, args...) log_print_rel( owner, LOG_CLASS_ERR, "[%05d:%s] "msg, __LINE__, __func__, ##args )
-#define avsys_critical_r(owner, msg, args...) log_print_rel( owner, LOG_CLASS_CRITICAL, "[%05d:%s] "msg, __LINE__, __func__, ##args )
+#define avsys_info_r(owner, msg, args...) log_print_rel( owner, LOG_CLASS_INFO, msg, ##args )
+#define avsys_warning_r(owner, msg, args...) log_print_rel( owner, LOG_CLASS_WARNING, msg, ##args )
+#define avsys_error_r(owner, msg, args...) log_print_rel( owner, LOG_CLASS_ERR, msg, ##args )
+#define avsys_critical_r(owner, msg, args...) log_print_rel( owner, LOG_CLASS_CRITICAL, msg, ##args )
#define avsys_assert_r(condition) log_assert_rel(( condition ))
-#define avsys_info(owner, msg, args...) log_print_dbg( owner, LOG_CLASS_INFO, "[%05d:%s] "msg, __LINE__, __func__, ##args )
-#define avsys_warning(owner, msg, args...) log_print_dbg( owner, LOG_CLASS_WARNING, "[%05d:%s] "msg, __LINE__, __func__, ##args )
-#define avsys_error(owner, msg, args...) log_print_dbg( owner, LOG_CLASS_ERR, "[%05d:%s] "msg, __LINE__, __func__, ##args )
-#define avsys_critical(owner, msg, args...) log_print_dbg( owner, LOG_CLASS_CRITICAL, "[%05d:%s] "msg, __LINE__, __func__, ##args )
+#define avsys_info(owner, msg, args...) log_print_dbg( owner, LOG_CLASS_INFO, msg, ##args )
+#define avsys_warning(owner, msg, args...) log_print_dbg( owner, LOG_CLASS_WARNING, msg, ##args )
+#define avsys_error(owner, msg, args...) log_print_dbg( owner, LOG_CLASS_ERR, msg, ##args )
+#define avsys_critical(owner, msg, args...) log_print_dbg( owner, LOG_CLASS_CRITICAL, msg, ##args )
#define avsys_assert(condition) log_assert_dbg( (condition) )
#else /* __USE_LOGMANAGER__ */