From 8c2e3d469d85389bd172aacd93a00166d98051e9 Mon Sep 17 00:00:00 2001 From: Seungbae Shin Date: Tue, 21 Aug 2012 17:49:29 +0900 Subject: [PATCH] 2.0 init --- Makefile.am | 4 +- audiotest/avsys-audio-test.c | 4 +- avsys-audio-alsa.c | 10 + avsys-audio-ascenario.c | 74 +- avsys-audio-handle.c | 25 +- avsys-audio-logical-volume.c | 38 +- avsys-audio-pasimple.c | 37 + avsys-audio-path.c | 804 ++++--------- avsys-audio-sync.c | 2 - avsys-audio.c | 107 +- configure.ac | 4 + debian/changelog | 1985 +++++++++++++++++++++++++++++++- debian/rules | 6 +- include/avsys-audio-alsa.h | 1 + include/avsys-audio-pasimple.h | 2 + include/avsys-audio-path.h | 91 +- include/avsys-audio-sync.h | 2 - include/avsys-audio.h | 29 +- packaging/avsystem.spec | 38 +- 19 files changed, 2456 insertions(+), 807 deletions(-) diff --git a/Makefile.am b/Makefile.am index 1fba2b0..b41e175 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,8 +49,8 @@ libavsysaudio_la_CFLAGS += $(MMLOG_CFLAGS) \ -D__USE_LOGMANAGER__ \ -DMM_DEBUG_FLAG -libavsysaudio_la_LIBADD += $(MMLOG_LIBS) - +libavsysaudio_la_LIBADD += $(MMLOG_LIBS) \ + $(INIPARSER_LIBS) bin_PROGRAMS = sound_initializer sound_initializer_SOURCES = avsys-audio-initializer.c diff --git a/audiotest/avsys-audio-test.c b/audiotest/avsys-audio-test.c index c6a53d5..eb8b3d4 100644 --- a/audiotest/avsys-audio-test.c +++ b/audiotest/avsys-audio-test.c @@ -76,7 +76,7 @@ int __make_param(int op, int mode, int routing, avsys_audio_param_t *param) param->priority = AVSYS_AUDIO_PRIORITY_NORMAL; param->vol_type = AVSYS_AUDIO_VOLUME_TYPE_SYSTEM; - param->bluetooth = routing; + param->handle_route = routing; switch (mode) { case 0: @@ -196,7 +196,7 @@ int _capture(int mode, int routing, char *filename) goto FAIL; } - fd = open(namebuffer, O_WRONLY | O_CREAT); + fd = open(namebuffer, O_WRONLY | O_CREAT, 0644); if (fd == -1) { printf("Can not open file %s, %s\n", namebuffer, strerror(errno)); goto FAIL; diff --git a/avsys-audio-alsa.c b/avsys-audio-alsa.c index 7e7916a..fa299bd 100644 --- a/avsys-audio-alsa.c +++ b/avsys-audio-alsa.c @@ -29,9 +29,11 @@ #if defined(_MMFW_I386_ALL_SIMULATOR) #define AIF2_DEVICE_NAME "default" #define AIF3_DEVICE_NAME "default" +#define AIF4_DEVICE_NAME "default" #else #define AIF2_DEVICE_NAME "AIF2" #define AIF3_DEVICE_NAME "AIF3" +#define AIF4_DEVICE_NAME "AIF4" #endif int avsys_audio_alsa_open_AIF_device(const int AIF_type, avsys_audio_alsa_aif_handle_t *handle) @@ -63,6 +65,10 @@ int avsys_audio_alsa_open_AIF_device(const int AIF_type, avsys_audio_alsa_aif_ha strncpy(dev_name, AIF3_DEVICE_NAME, sizeof(dev_name) - 1); stream = SND_PCM_STREAM_PLAYBACK; break; + case AIF4_PLAYBACK: + strncpy(dev_name, AIF4_DEVICE_NAME, sizeof(dev_name) - 1); + stream = SND_PCM_STREAM_PLAYBACK; + break; default: avsys_critical_r(AVAUDIO, "Invalid AIF device %d\n", AIF_type); return AVSYS_STATE_ERR_INVALID_MODE; @@ -135,6 +141,10 @@ int avsys_audio_alsa_set_AIF_params(avsys_audio_alsa_aif_handle_t *handle) if (!ahandle) return AVSYS_STATE_ERR_NULL_POINTER; + /* Skip parameter setting to null device. */ + if (snd_pcm_type(ahandle) == SND_PCM_TYPE_NULL) + return AVSYS_STATE_SUCCESS; + /* Allocate a hardware parameters object. */ snd_pcm_hw_params_alloca(¶ms); /* Fill it in with default values. */ diff --git a/avsys-audio-ascenario.c b/avsys-audio-ascenario.c index c78f155..8e691df 100644 --- a/avsys-audio-ascenario.c +++ b/avsys-audio-ascenario.c @@ -36,6 +36,8 @@ #define STR_BUFF_MAX 128 #define P_STR_MAX 42 #define O_STR_MAX 44 +#define CARD_NUMBER 0 /* ALSA card number */ + static int __avsys_audio_ascn_make_scenario_str(int input, char *buf, int buf_len) { char fromStr[P_STR_MAX] = { 0, }; @@ -118,7 +120,8 @@ static int __avsys_audio_ascn_make_scenario_str(int input, char *buf, int buf_le int avsys_audio_ascn_bulk_set(int * bulk, int bulk_cnt, AscnResetType clear) { struct snd_scenario *scn = NULL; - char card_name[STR_BUFF_MAX] = { 0, }; + int card = CARD_NUMBER; + char *name = NULL; char str_buf[STR_BUFF_MAX] = { 0, }; char reset_str[STR_BUFF_MAX] = { 0, }; int err = AVSYS_STATE_SUCCESS; @@ -144,12 +147,31 @@ int avsys_audio_ascn_bulk_set(int * bulk, int bulk_cnt, AscnResetType clear) return AVSYS_STATE_ERR_RANGE_OVER; } - snprintf(card_name, sizeof(card_name) - 1, "default"); + /* Try to get card name from CARD_NUMBER. */ + snd_card_get_name(card, &name); #if defined(TIME_CHECK) gettimeofday(&t_start, NULL); #endif - //avsys_info(AVAUDIO, "snd_scenario_open() with [%s]\n", card_name); - scn = snd_scenario_open(card_name); + if (name == NULL) { + scn = snd_scenario_open("default"); + if (scn == NULL) + { + avsys_error(AVAUDIO, "snd_scenario_open() failed to open with default\n"); + return AVSYS_STATE_ERR_INTERNAL; + } + } else { + scn = snd_scenario_open(name); + free(name); + if (scn == NULL) + { + scn = snd_scenario_open("default"); + if (scn == NULL) + { + avsys_error(AVAUDIO, "snd_scenario_open() failed to open with default\n"); + return AVSYS_STATE_ERR_INTERNAL; + } + } + } #if defined(TIME_CHECK) gettimeofday(&t_stop, NULL); if (t_stop.tv_sec == t_start.tv_sec) @@ -158,12 +180,6 @@ int avsys_audio_ascn_bulk_set(int * bulk, int bulk_cnt, AscnResetType clear) check = (t_stop.tv_sec - t_start.tv_sec) * 1000 + (t_stop.tv_usec - t_start.tv_usec) / 1000; avsys_warning(AVAUDIO, "[snd_scenario_open()] takes %u msec\n", check); #endif - if (scn == NULL) { - avsys_error_r(AVAUDIO, "alsa scenario open failed %s\n", card_name); - return AVSYS_STATE_ERR_INTERNAL; - } - //avsys_info(AVAUDIO, "snd_scenario_open() success\n"); - if (clear != ASCN_RESET_NONE) { switch (clear) { case ASCN_RESET_ALL: @@ -241,7 +257,8 @@ bulk_error: int avsys_audio_ascn_single_set(char * str) { struct snd_scenario *scn = NULL; - char card_name[STR_BUFF_MAX] = { 0, }; + int card = CARD_NUMBER; + char *name = NULL; char cmd_str[STR_BUFF_MAX] = { 0, }; int err = AVSYS_STATE_SUCCESS; @@ -250,23 +267,40 @@ int avsys_audio_ascn_single_set(char * str) return AVSYS_STATE_ERR_NULL_POINTER; } - snprintf(card_name, sizeof(card_name) - 1, "default"); -// avsys_info(AVAUDIO, "snd_scenario_open() with [%s]\n", card_name); - scn = snd_scenario_open(card_name); - if (scn == NULL) { - avsys_error_r(AVAUDIO, "alsa scenario open failed %s\n", card_name); - return AVSYS_STATE_ERR_INTERNAL; + /* Try to get card name from CARD_NUMBER. */ + snd_card_get_name(card, &name); + + if (name == NULL) { + scn = snd_scenario_open("default"); + if (scn == NULL) + { + avsys_error(AVAUDIO, "snd_scenario_open() failed to open with default\n"); + return AVSYS_STATE_ERR_INTERNAL; + } + } else { + scn = snd_scenario_open(name); + free(name); + if (scn == NULL) + { + scn = snd_scenario_open("default"); + if (scn == NULL) + { + avsys_error(AVAUDIO, "snd_scenario_open() failed to open with default\n"); + return AVSYS_STATE_ERR_INTERNAL; + } + } } -// avsys_info(AVAUDIO, "snd_scenario_open() success\n"); + /* Set scenario */ strncpy(cmd_str, str, sizeof(cmd_str) - 1); err = snd_scenario_set_scn(scn, str); - avsys_warning(AVAUDIO, "alsa scenario set [%s]\n", str); + avsys_info(AVAUDIO, "alsa scenario set [%s]\n", str); if (err < 0) { - avsys_error_r(AVAUDIO, "snd_scenario_set(%s) failed\n", str); + avsys_error(AVAUDIO, "snd_scenario_set(%s) failed\n", str); } + /* Close scenario manager core */ snd_scenario_close(scn); return err; diff --git a/avsys-audio-handle.c b/avsys-audio-handle.c index fbfa441..2e08ea7 100644 --- a/avsys-audio-handle.c +++ b/avsys-audio-handle.c @@ -146,7 +146,7 @@ int avsys_audio_handle_reset(int *volume_value) long long int flag = 0x01; avsys_audio_handle_info_t *control = NULL; avsys_audio_handle_info_t **temp = NULL; - int *lvolume = NULL; + int lvolume[AVSYS_AUDIO_VOLUME_TYPE_MAX] = { 0, }; int default_volume[] = { DEFAULT_VOLUME_SYSTEM, DEFAULT_VOLUME_NOTIFICATION, DEFAULT_VOLUME_ALARM, DEFAULT_VOLUME_RINGTONE, DEFAULT_VOLUME_MEDIA, DEFAULT_VOLUME_CALL, @@ -166,9 +166,23 @@ int avsys_audio_handle_reset(int *volume_value) } if (volume_value == NULL) { - lvolume = default_volume; + for (i = 0; i < AVSYS_AUDIO_VOLUME_TYPE_MAX; i++) { + lvolume[i] = default_volume[i]; + } } else { - lvolume = volume_value; + avsys_audio_path_ex_info_t *path_control = NULL; + + if (AVSYS_FAIL(avsys_audio_get_shm(AVSYS_AUDIO_SHM_IDEN_PATH, (void **)&path_control))) { + avsys_error(AVAUDIO, "avsys_audio_get_shm() failed in %s\n", __func__); + return AVSYS_STATE_ERR_INTERNAL; + } + if (path_control == NULL) { + avsys_error(AVAUDIO, "control is null in %s\n", __func__); + return AVSYS_STATE_ERR_NULL_POINTER; + } + for (i = 0; i < AVSYS_AUDIO_VOLUME_TYPE_MAX; i++) { + lvolume[i] = volume_value[i]; + } } for (i = 0; i < AVSYS_AUDIO_HANDLE_MAX; i++) { @@ -204,6 +218,7 @@ int avsys_audio_handle_reset(int *volume_value) control->volume_value[AVSYS_AUDIO_LVOL_GAIN_TYPE_6] = lvolume[6]; /* DEFAULT_VOLUME_FIXED */ control->volume_value[AVSYS_AUDIO_LVOL_GAIN_TYPE_7] = lvolume[7]; /* DEFAULT_VOLUME_JAVA */ control->volume_value[AVSYS_AUDIO_LVOL_GAIN_TYPE_8] = lvolume[4]; /* DEFAULT_VOLUME_MEDIA */ + avsys_error(AVAUDIO, "[zeud] avsys_audio_handle_reset lvolume[0][%d]", lvolume[0]); control->ext_device_amp = AVSYS_AUDIO_HANDLE_EXT_DEV_NONE; control->primary_volume_pid = 0; control->primary_volume_type = -1; @@ -830,7 +845,7 @@ int avsys_audio_handle_current_playing_volume_type(int *type) if (control->primary_volume_pid > 2 && AVSYS_FAIL(avsys_check_process(control->primary_volume_pid))) { avsys_warning(AVAUDIO, "Primary volume set pid does not exist anymore. clean primary volume\n"); - control->primary_volume_type = 1; + control->primary_volume_type = -1; control->primary_volume_pid = 0; } @@ -907,6 +922,7 @@ int avsys_audio_handle_update_volume_by_type(const int volume_type, const int vo AVSYS_LOCK_SYNC(); control->volume_value[volume_type] = volume_value; + avsys_error(AVAUDIO, "[zeud] avsys_audio_handle_update_volume_by_type volume_value[%d]", volume_value); for (i = 0; i < AVSYS_AUDIO_HANDLE_MAX; i++) { int mode; @@ -936,6 +952,7 @@ int avsys_audio_handle_update_volume_by_type(const int volume_type, const int vo set_volume = &(control->handles[i].setting_vol); set_volume->level[AVSYS_AUDIO_CHANNEL_LEFT] = control->volume_value[volume_type]; set_volume->level[AVSYS_AUDIO_CHANNEL_RIGHT] = control->volume_value[volume_type]; + avsys_error(AVAUDIO, "[zeud] avsys_audio_handle_update_volume_by_type control->volume_value[volume_type][%d]", control->volume_value[volume_type]); result = avsys_audio_logical_volume_convert(set_volume, &(control->handles[i].working_vol), &(control->handles[i].gain_setting)); if (AVSYS_FAIL(result)) { avsys_error(AVAUDIO, "Can not set volume for handle %d. Error 0x%x\n", i, result); diff --git a/avsys-audio-logical-volume.c b/avsys-audio-logical-volume.c index 47765e0..fdba610 100644 --- a/avsys-audio-logical-volume.c +++ b/avsys-audio-logical-volume.c @@ -33,11 +33,11 @@ static const avsys_logical_gain_t g_volume_table[AVSYS_AUDIO_LVOL_GAIN_TYPE_MAX] { /* FNT DEFAULT */ #if defined(_MMFW_I386_ALL_SIMULATOR) {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{2340,2340}}, {{4680,4680}}, {{7020,7020}}, {{9360,9360}}, {{11700,11700}}, {{14040,14040}}, {{16380,16380}}, {{18720,18720}}, {{21060,21060}}, {{23400,23400}}, {{25740,25740}}, {{28080,28080}}, {{30420,30420}}, {{32760,32760}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_SPK */ - {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET0 */ + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET */ {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET */ #else {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{19000,19000}}, {{22323,22323}}, {{25647,25647}}, {{28971,28971}}, {{32295,32295}}, {{35619,35619}}, {{38943,38943}}, {{42267,42267}}, {{45591,45591}}, {{48915,48915}}, {{52239,52239}}, {{55563,55563}}, {{58887,58887}}, {{62211,62211}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_SPK */ - {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET0 */ + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET */ {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET */ #endif }, @@ -46,31 +46,37 @@ static const avsys_logical_gain_t g_volume_table[AVSYS_AUDIO_LVOL_GAIN_TYPE_MAX] { /* FNT DEFAULT */ #if defined(_MMFW_I386_ALL_SIMULATOR) {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{2340,2340}}, {{4680,4680}}, {{7020,7020}}, {{9360,9360}}, {{11700,11700}}, {{14040,14040}}, {{16380,16380}}, {{18720,18720}}, {{21060,21060}}, {{23400,23400}}, {{25740,25740}}, {{28080,28080}}, {{30420,30420}}, {{32760,32760}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_SPK */ - {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET0 */ + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET */ {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET */ #else {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{19000,19000}}, {{22323,22323}}, {{25647,25647}}, {{28971,28971}}, {{32295,32295}}, {{35619,35619}}, {{38943,38943}}, {{42267,42267}}, {{45591,45591}}, {{48915,48915}}, {{52239,52239}}, {{55563,55563}}, {{58887,58887}}, {{62211,62211}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_SPK */ - {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET0 */ + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET */ {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET */ #endif }, }, - { AVSYS_AUDIO_LVOL_GAIN_TYPE_2, /* alarm */ + { AVSYS_AUDIO_LVOL_GAIN_TYPE_2, /* alarm : 0~15, default : 7 */ { /* FNT DEFAULT */ - {LVOLUME_MAX_BASIC, {{{0,0}}, {{19000,19000}}, {{25991,25991}}, {{32982,32982}}, {{39973,39973}}, {{46964,46964}}, {{53955,53955}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_SPK */ - {LVOLUME_MAX_BASIC, {{{0,0}}, {{20480,20480}}, {{27225,27225}}, {{33969,33969}}, {{40714,40714}}, {{47458,47458}}, {{54203,54203}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET0 */ - {LVOLUME_MAX_BASIC, {{{0,0}}, {{20480,20480}}, {{27225,27225}}, {{33969,33969}}, {{40714,40714}}, {{47458,47458}}, {{54203,54203}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET */ +#if defined(_MMFW_I386_ALL_SIMULATOR) + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{2340,2340}}, {{4680,4680}}, {{7020,7020}}, {{9360,9360}}, {{11700,11700}}, {{14040,14040}}, {{16380,16380}}, {{18720,18720}}, {{21060,21060}}, {{23400,23400}}, {{25740,25740}}, {{28080,28080}}, {{30420,30420}}, {{32760,32760}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_SPK */ + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET */ + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET */ +#else + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{19000,19000}}, {{22323,22323}}, {{25647,25647}}, {{28971,28971}}, {{32295,32295}}, {{35619,35619}}, {{38943,38943}}, {{42267,42267}}, {{45591,45591}}, {{48915,48915}}, {{52239,52239}}, {{55563,55563}}, {{58887,58887}}, {{62211,62211}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_SPK */ + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET */ + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET */ +#endif }, }, { AVSYS_AUDIO_LVOL_GAIN_TYPE_3, /* ringtone : 0~15, default : 13 */ { /* FNT DEFAULT */ #if defined(_MMFW_I386_ALL_SIMULATOR) {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{2340,2340}}, {{4680,4680}}, {{7020,7020}}, {{9360,9360}}, {{11700,11700}}, {{14040,14040}}, {{16380,16380}}, {{18720,18720}}, {{21060,21060}}, {{23400,23400}}, {{25740,25740}}, {{28080,28080}}, {{30420,30420}}, {{32760,32760}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_SPK */ - {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET0 */ + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET */ {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET */ #else {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{19000,19000}}, {{22323,22323}}, {{25647,25647}}, {{28971,28971}}, {{32295,32295}}, {{35619,35619}}, {{38943,38943}}, {{42267,42267}}, {{45591,45591}}, {{48915,48915}}, {{52239,52239}}, {{55563,55563}}, {{58887,58887}}, {{62211,62211}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_SPK */ - {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET0 */ + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET */ {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET */ #endif }, @@ -79,11 +85,11 @@ static const avsys_logical_gain_t g_volume_table[AVSYS_AUDIO_LVOL_GAIN_TYPE_MAX] { /* FNT DEFAULT */ #if defined(_MMFW_I386_ALL_SIMULATOR) {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{2340,2340}}, {{4680,4680}}, {{7020,7020}}, {{9360,9360}}, {{11700,11700}}, {{14040,14040}}, {{16380,16380}}, {{18720,18720}}, {{21060,21060}}, {{23400,23400}}, {{25740,25740}}, {{28080,28080}}, {{30420,30420}}, {{32760,32760}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_SPK */ - {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET0 */ + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET */ {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET */ #else {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{19000,19000}}, {{22323,22323}}, {{25647,25647}}, {{28971,28971}}, {{32295,32295}}, {{35619,35619}}, {{38943,38943}}, {{42267,42267}}, {{45591,45591}}, {{48915,48915}}, {{52239,52239}}, {{55563,55563}}, {{58887,58887}}, {{62211,62211}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_SPK */ - {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET0 */ + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET */ {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET */ #endif }, @@ -91,28 +97,28 @@ static const avsys_logical_gain_t g_volume_table[AVSYS_AUDIO_LVOL_GAIN_TYPE_MAX] { AVSYS_AUDIO_LVOL_GAIN_TYPE_5, /* call */ { /* FNT DEFAULT */ {LVOLUME_MAX_BASIC, {{{0,0}}, {{19000,19000}}, {{25991,25991}}, {{32982,32982}}, {{39973,39973}}, {{46964,46964}}, {{53955,53955}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_SPK */ - {LVOLUME_MAX_BASIC, {{{0,0}}, {{20480,20480}}, {{27225,27225}}, {{33969,33969}}, {{40714,40714}}, {{47458,47458}}, {{54203,54203}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET0 */ + {LVOLUME_MAX_BASIC, {{{0,0}}, {{20480,20480}}, {{27225,27225}}, {{33969,33969}}, {{40714,40714}}, {{47458,47458}}, {{54203,54203}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET */ {LVOLUME_MAX_BASIC, {{{0,0}}, {{20480,20480}}, {{27225,27225}}, {{33969,33969}}, {{40714,40714}}, {{47458,47458}}, {{54203,54203}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}, {{60947,60947}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET */ }, }, { AVSYS_AUDIO_LVOL_GAIN_TYPE_6, /* fixed */ { /* FNT DEFAULT */ {LVOLUME_MAX_SINGLE, {{{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_SPK */ - {LVOLUME_MAX_SINGLE, {{{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET0 */ + {LVOLUME_MAX_SINGLE, {{{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET */ {LVOLUME_MAX_SINGLE, {{{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET */ }, }, { AVSYS_AUDIO_LVOL_GAIN_TYPE_7, /* java */ { /* FNT DEFAULT */ {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{19000,19000}}, {{22323,22323}}, {{25647,25647}}, {{28971,28971}}, {{32295,32295}}, {{35619,35619}}, {{38943,38943}}, {{42267,42267}}, {{45591,45591}}, {{48915,48915}}, {{52239,52239}}, {{55563,55563}}, {{58887,58887}}, {{62211,62211}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_SPK */ - {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET0 */ + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET */ {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET */ }, }, { AVSYS_AUDIO_LVOL_GAIN_TYPE_8, /* music only (max level) */ { /* FNT DEFAULT */ {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{19000,19000}}, {{22323,22323}}, {{25647,25647}}, {{28971,28971}}, {{32295,32295}}, {{35619,35619}}, {{38943,38943}}, {{42267,42267}}, {{45591,45591}}, {{48915,48915}}, {{52239,52239}}, {{55563,55563}}, {{58887,58887}}, {{62211,62211}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_SPK */ - {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET0 */ + {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET */ {LVOLUME_MAX_MULTIMEDIA, {{{0,0}}, {{20480,20480}}, {{23698,23698}}, {{26916,26916}}, {{30135,30135}}, {{33353,33353}}, {{36571,36571}}, {{39789,39789}}, {{43008,43008}}, {{46226,46226}}, {{49444,49444}}, {{52662,52662}}, {{55880,55880}}, {{59099,59099}}, {{62317,62317}}, {{65535,65535}}}}, /* AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET */ }, }, diff --git a/avsys-audio-pasimple.c b/avsys-audio-pasimple.c index 29c4593..99c91c8 100644 --- a/avsys-audio-pasimple.c +++ b/avsys-audio-pasimple.c @@ -473,3 +473,40 @@ int avsys_audio_pasimple_get_period_buffer_time(avsys_audio_handle_t *handle, un return AVSYS_STATE_SUCCESS; } +int avsys_audio_pasimple_cork(avsys_audio_handle_t *handle, int cork) +{ + pa_simple *s = NULL; + avsys_audio_pasimple_handle_t *device = NULL; + int err = 0; + + CHECK_VALID_HANDLE(handle); + + s = (pa_simple *)device->pasimple_handle; + + if (0 > pa_simple_cork(s, cork, &err)) { + avsys_error(AVAUDIO, "pa_simple_cork() failed with %s\n", pa_strerror(err)); + return AVSYS_STATE_ERR_INTERNAL; + } + + return AVSYS_STATE_SUCCESS; +} + +int avsys_audio_pasimple_is_corked(avsys_audio_handle_t *handle, int *is_corked) +{ + pa_simple *s = NULL; + avsys_audio_pasimple_handle_t *device = NULL; + int err = 0; + + if (is_corked == NULL) + return AVSYS_STATE_ERR_INTERNAL; + + CHECK_VALID_HANDLE(handle); + + s = (pa_simple *)device->pasimple_handle; + + *is_corked = pa_simple_is_corked(s); + + return AVSYS_STATE_SUCCESS; +} + + diff --git a/avsys-audio-path.c b/avsys-audio-path.c index 7967842..6692c63 100644 --- a/avsys-audio-path.c +++ b/avsys-audio-path.c @@ -27,6 +27,8 @@ #include #include #include +#include +#include #include "avsys-audio-shm.h" #include "avsys-audio-sync.h" @@ -46,8 +48,6 @@ return AVSYS_STATE_ERR_IO_CONTROL; \ } } -#define OPEN_AIF_BEFORE_SCENARIO_SET - static int g_playback_path_select_data[AVSYS_AUDIO_PLAYBACK_GAIN_MAX][AVSYS_AUDIO_PATH_EX_OUTMAX] = { { /* AVSYS_AUDIO_PLAYBACK_GAIN_AP */ /* NONE SPK RECV HEADSET BTHEADSET A2DP HANDSFREE HDMI */ @@ -55,7 +55,7 @@ static int g_playback_path_select_data[AVSYS_AUDIO_PLAYBACK_GAIN_MAX][AVSYS_AUDI }, { /* AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO */ /* NONE SPK RECV HEADSET BTHEADSET A2DP HANDSFREE HDMI */ - 1, 1, 0, 1, 0, 0, 0, 0 + 1, 1, 0, 1, 0, 1, 0, 0 }, { /* AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL */ /* NONE SPK RECV HEADSET BTHEADSET A2DP HANDSFREE HDMI */ @@ -161,32 +161,19 @@ static int __avsys_audio_path_set_ascn_voicecall(avsys_audio_path_ex_info_t *con static int __avsys_audio_path_set_ascn_videocall(avsys_audio_path_ex_info_t *control); static int __avsys_audio_path_set_ascn_fmradio(avsys_audio_path_ex_info_t *control); static int __avsys_audio_path_set_ascn_ap_capture(avsys_audio_path_ex_info_t *control); - - -typedef int (*_internal_gain_func)(avsys_audio_path_ex_info_t *control); -static _internal_gain_func playback_gain_func_table[AVSYS_AUDIO_PLAYBACK_GAIN_MAX] = -{ - __avsys_audio_path_set_ascn_ap_playback, - __avsys_audio_path_set_ascn_fmradio, - __avsys_audio_path_set_ascn_voicecall, - __avsys_audio_path_set_ascn_videocall, - __avsys_audio_path_set_ascn_ap_playback, -}; - -static _internal_gain_func capture_gain_func_table[AVSYS_AUDIO_CAPTURE_GAIN_MAX] = -{ - __avsys_audio_path_set_ascn_ap_capture, - __avsys_audio_path_set_ascn_fmradio, - __avsys_audio_path_set_ascn_voicecall, - __avsys_audio_path_set_ascn_videocall, -}; - static int __avsys_audio_path_set_hw_controls(avsys_audio_path_ex_info_t *control); static int __avsys_audio_path_get_earjack_type(void); #define AUDIOSYSTEM_CONF "/opt/etc/audio_system.conf" #define CONF_ITEM_COUNT 2 #define INPUT_DEV_MAX 20 + +#define EARJACK_EVENT_PATH "/dev/input/event" + +#define AVSYS_AUDIO_INI_DEFAULT_PATH "/usr/etc/mmfw_avsystem.ini" +#define AVSYS_AUDIO_DEFAULT_CONTROL_AIF_BEFORE_PATH_SET 0 +#define AVSYS_AUDIO_DEFAULT_GAIN_DEBUG_MODE 0 + static char *conf_string[] = { "headset_detection", "headset_node", @@ -195,10 +182,14 @@ static char *conf_string[] = { typedef struct { char headset_detection; char headset_node_number; -} AudioSystemConf; + bool control_aif_before_path_set; + bool gain_debug_mode; +} avsys_audio_conf; -static int __load_conf(AudioSystemConf *data) +static int __load_conf(avsys_audio_conf *data) { + dictionary *dict = NULL; + #if defined(_MMFW_I386_ALL_SIMULATOR) if (data == NULL) return AVSYS_STATE_ERR_NULL_POINTER; @@ -279,6 +270,20 @@ static int __load_conf(AudioSystemConf *data) data->headset_detection = conf_data[0]; data->headset_node_number = conf_data[1]; #endif + + /* first, try to load existing ini file */ + dict = iniparser_load(AVSYS_AUDIO_INI_DEFAULT_PATH); + if (dict) { /* if dict is available */ + data->control_aif_before_path_set = iniparser_getboolean(dict, "aif:control aif before path set", AVSYS_AUDIO_DEFAULT_CONTROL_AIF_BEFORE_PATH_SET); + data->gain_debug_mode = iniparser_getboolean(dict, "debug:gain debug mode", AVSYS_AUDIO_DEFAULT_GAIN_DEBUG_MODE); + + /* free dict as we got our own structure */ + iniparser_freedict (dict); + } else { /* if no file exists. create one with set of default values */ + data->control_aif_before_path_set = AVSYS_AUDIO_DEFAULT_CONTROL_AIF_BEFORE_PATH_SET; + data->gain_debug_mode = AVSYS_AUDIO_DEFAULT_GAIN_DEBUG_MODE; + } + return AVSYS_STATE_SUCCESS; } @@ -289,12 +294,10 @@ int avsys_audio_path_ex_init(void) avsys_audio_path_ex_info_t **temp = NULL; gain_info_t default_gain = { AVSYS_AUDIO_PLAYBACK_GAIN_AP, AVSYS_AUDIO_CAPTURE_GAIN_AP }; path_info_t default_path = { AVSYS_AUDIO_PATH_EX_SPK, AVSYS_AUDIO_PATH_EX_MIC }; - gain_status_t clean_gain_status = { GS_GAIN_NONE, GS_GAIN_NONE }; - path_status_t clean_path_status = { PS_PATH_NONE, PS_PATH_NONE }; - option_info_t default_option = { AVSYS_AUDIO_PATH_OPTION_JACK_AUTO, AVSYS_AUDIO_PATH_OPTION_JACK_AUTO }; + option_info_t default_option = { AVSYS_AUDIO_PATH_OPTION_NONE, AVSYS_AUDIO_PATH_OPTION_NONE }; int index = 0; int err = AVSYS_STATE_SUCCESS; - AudioSystemConf conf = { 1, 4 }; + avsys_audio_conf conf = { 0, }; /* Check root user */ err = avsys_check_root_privilege(); @@ -304,7 +307,6 @@ int avsys_audio_path_ex_init(void) temp = &control; avsys_assert(AVSYS_SUCCESS(avsys_audio_create_sync(AVSYS_AUDIO_SYNC_IDEN_PATH))); - avsys_assert(AVSYS_SUCCESS(avsys_audio_create_sync(AVSYS_AUDIO_SYNC_IDEN_SOUNDPATH))); /* for audio route policy */ avsys_assert(AVSYS_SUCCESS(avsys_audio_create_shm(AVSYS_AUDIO_SHM_IDEN_PATH))); avsys_assert(AVSYS_SUCCESS(avsys_audio_get_shm(AVSYS_AUDIO_SHM_IDEN_PATH, (void **)temp))); @@ -319,14 +321,10 @@ int avsys_audio_path_ex_init(void) control->backup_gain = default_gain; control->backup_path = default_path; control->option = default_option; - control->gain_status = clean_gain_status; - control->path_status = clean_path_status; - control->p_gain_status = clean_gain_status; - control->p_path_status = clean_path_status; control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; control->inserted = AVSYS_AUDIO_INSERTED_NONE; - control->route_policy = AVSYS_AUDIO_ROUTE_POLICY_DEFAULT; + if (AVSYS_FAIL(__load_conf(&conf))) avsys_error_r(AVAUDIO, "Can not load audio system configuration file\n"); @@ -344,29 +342,9 @@ int avsys_audio_path_ex_init(void) avsys_error_r(AVAUDIO, "Earjack init value is %d\n", control->inserted); - { - /* Gain tunning Debug mode */ - FILE *gainTunningFp = NULL; - if (NULL != (gainTunningFp = fopen("/opt/etc/gain_tuner.ini", "r"))) { - char buffer[32] = ""; - avsys_warning(AVAUDIO, "GAIN TUNNING DEBUG MODE...This degrade sound path performance\n"); - memset(buffer, '\0', sizeof(buffer)); - if (NULL == fgets(buffer, sizeof(buffer) - 1, gainTunningFp)) { - fclose(gainTunningFp); - control->gain_debug_mode = 0; - } else { - fclose(gainTunningFp); - if (0 == strncmp("debug=1", buffer, 7)) { - control->gain_debug_mode = 1; - } else { - control->gain_debug_mode = 0; - } - } - } else { - control->gain_debug_mode = 0; - } - } - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_MANUAL; + control->control_aif_before_path_set = conf.control_aif_before_path_set; + control->gain_debug_mode = conf.gain_debug_mode; + control->mute = AVSYS_AUDIO_UNMUTE; control->path_fixed = PATH_FIXED_NONE; @@ -414,13 +392,11 @@ int avsys_audio_path_ex_reset(int forced) avsys_audio_path_ex_info_t **temp = NULL; gain_info_t default_gain = { AVSYS_AUDIO_PLAYBACK_GAIN_AP, AVSYS_AUDIO_CAPTURE_GAIN_AP }; path_info_t default_path = { AVSYS_AUDIO_PATH_EX_SPK, AVSYS_AUDIO_PATH_EX_MIC }; - gain_status_t clean_gain_status = { GS_GAIN_NONE, GS_GAIN_NONE }; - path_status_t clean_path_status = { PS_PATH_NONE, PS_PATH_NONE }; - option_info_t default_option = { AVSYS_AUDIO_PATH_OPTION_JACK_AUTO, AVSYS_AUDIO_PATH_OPTION_JACK_AUTO }; + option_info_t default_option = { AVSYS_AUDIO_PATH_OPTION_NONE, AVSYS_AUDIO_PATH_OPTION_NONE }; int index = 0; int err = AVSYS_STATE_SUCCESS; int backup_debug = 0; - AudioSystemConf conf = { 1, 4 }; + avsys_audio_conf conf = { 0, }; /* Check root user */ err = avsys_check_root_privilege(); @@ -449,14 +425,10 @@ int avsys_audio_path_ex_reset(int forced) control->backup_gain = default_gain; control->backup_path = default_path; control->option = default_option; - control->gain_status = clean_gain_status; - control->path_status = clean_path_status; - control->p_gain_status = clean_gain_status; - control->p_path_status = clean_path_status; control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; control->inserted = AVSYS_AUDIO_INSERTED_NONE; - control->route_policy = AVSYS_AUDIO_ROUTE_POLICY_DEFAULT; + if (AVSYS_FAIL(__load_conf(&conf))) avsys_error_r(AVAUDIO, "Can not load audio system configuration file\n"); @@ -464,8 +436,13 @@ int avsys_audio_path_ex_reset(int forced) control->inserted = __avsys_audio_path_get_earjack_type(); if (control->inserted == AVSYS_AUDIO_INSERTED_NONE) control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; - else + else { control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET; + control->path.playback = AVSYS_AUDIO_PATH_EX_HEADSET; + + if (control->inserted == AVSYS_AUDIO_INSERTED_4) + control->path.capture = AVSYS_AUDIO_PATH_EX_HEADSETMIC; + } } else { avsys_warning(AVAUDIO, "Ignore headset detection. Use speaker device\n"); control->inserted = AVSYS_AUDIO_INSERTED_NONE; @@ -474,29 +451,9 @@ int avsys_audio_path_ex_reset(int forced) avsys_error_r(AVAUDIO, "Earjack init value is %d\n", control->inserted); - { - /* Gain tunning Debug mode */ - FILE *gainTunningFp = NULL; - if (NULL != (gainTunningFp = fopen("/opt/etc/gain_tuner.ini", "r"))) { - char buffer[32] = ""; - avsys_warning(AVAUDIO, "GAIN TUNNING DEBUG MODE...This degrade sound path performance\n"); - memset(buffer, '\0', sizeof(buffer)); - if (NULL == fgets(buffer, sizeof(buffer) - 1, gainTunningFp)) { - fclose(gainTunningFp); - control->gain_debug_mode = 0; - } else { - fclose(gainTunningFp); - if (0 == strncmp("debug=1", buffer, 7)) { - control->gain_debug_mode = 1; - } else { - control->gain_debug_mode = 0; - } - } - } else { - control->gain_debug_mode = 0; - } - } - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_MANUAL; + control->control_aif_before_path_set = conf.control_aif_before_path_set; + control->gain_debug_mode = conf.gain_debug_mode; + control->mute = AVSYS_AUDIO_UNMUTE; control->path_fixed = PATH_FIXED_NONE; @@ -589,10 +546,7 @@ int avsys_audio_path_ex_dump(void) str_playback_gain[control->gain.playback], str_capture_gain[control->gain.capture]); fprintf(stdout, " Current Out / In : %-s / %-s\n", str_out[control->path.playback], str_in[control->path.capture] ); fprintf(stdout, " Gain debug mode : 0x%-x\n", control->gain_debug_mode); - fprintf(stdout, " Gain status : 0x%x 0x%x\n", control->gain_status.playback, control->gain_status.capture); - fprintf(stdout, " Path status : 0x%x 0x%x\n", control->path_status.playback, control->path_status.capture); fprintf(stdout, " Auto EarJack Control : %-s\n", str_ear[control->ear_auto]); - fprintf(stdout, " Audio Route Policy : %-s\n", str_route[control->route_policy]); fprintf(stdout, " Physical Earjack? [type] : %-s [%-s]\n", str_yn[control->inserted != AVSYS_AUDIO_INSERTED_NONE], str_earType[control->inserted]); fprintf(stdout, " Path Fixed State : 0x%-x\n", control->path_fixed); fprintf(stdout, " Mute status : %d\n", control->mute); @@ -607,9 +561,6 @@ int avsys_audio_path_ex_dump(void) fprintf(stdout, " Path sync lock required PIDs : %d\n", control->pathlock_pid[index]); index++; } while (index < AVSYS_AUDIO_LOCK_SLOT_MAX); - fprintf(stdout, " Option Lagacy : %-s\n", str_yn[(control->option.playback & AVSYS_AUDIO_PATH_OPTION_LEGACY_MODE) ? 1 : 0]); - fprintf(stdout, " Option Jack Playback : %-s\n", str_yn[(control->option.playback & AVSYS_AUDIO_PATH_OPTION_JACK_AUTO) ? 1 : 0]); - fprintf(stdout, " Option Jack Capture : %-s\n", str_yn[(control->option.capture & AVSYS_AUDIO_PATH_OPTION_JACK_AUTO) ? 1 : 0]); fprintf(stdout, " Option Dual out : %-s\n", str_yn[(control->option.playback & AVSYS_AUDIO_PATH_OPTION_DUAL_OUT) ? 1 : 0]); fprintf(stdout, " Option Forced : %-s\n", str_yn[(control->option.playback & AVSYS_AUDIO_PATH_OPTION_FORCED) ? 1 : 0]); @@ -668,7 +619,7 @@ int avsys_audio_path_earjack_init(int *init_type, int *outfd) #if !defined(_MMFW_I386_ALL_SIMULATOR) char eventnode_filename[32] = { 0, }; int fd = 0; - AudioSystemConf conf = { 1, 4 }; + avsys_audio_conf conf = { 0, }; if (outfd == NULL || init_type == NULL) { avsys_error(AVAUDIO, "input parameter is null\n"); @@ -681,10 +632,10 @@ int avsys_audio_path_earjack_init(int *init_type, int *outfd) if (!conf.headset_detection) { avsys_error(AVAUDIO, "Earjack control daemon will be closed by user option...\n"); - return AVSYS_STATE_SUCCESS; + return AVSYS_STATE_ERR_DEVICE_NOT_SUPPORT; } - snprintf(eventnode_filename, sizeof(eventnode_filename), "/dev/event%01d", conf.headset_node_number); + snprintf(eventnode_filename, sizeof(eventnode_filename), "%s%01d", EARJACK_EVENT_PATH, conf.headset_node_number); fd = open(eventnode_filename, O_RDONLY); if (fd == -1) { @@ -725,9 +676,8 @@ int avsys_audio_path_earjack_wait(int fd, int *current_type, int *new_type, int fd_set set; int readtemp; int select_ret = 0; - struct avsys_audio_jack_event jevent; + struct input_event jevent; int res = AVSYS_STATE_SUCCESS; - int set_flag = 0; int cur_type = -1; if (new_type == NULL || is_auto_mute == NULL) @@ -774,8 +724,6 @@ int avsys_audio_path_earjack_wait(int fd, int *current_type, int *new_type, int } else { readtemp = 0; } - - set_flag = 1; /* need change earphone status */ break; default: readtemp = cur_type; /* same value */ @@ -802,17 +750,10 @@ int avsys_audio_path_earjack_wait(int fd, int *current_type, int *new_type, int *current_type = control->inserted; *is_auto_mute = 0; res = AVSYS_STATE_SUCCESS; - } else if (control->ear_auto == AVSYS_AUDIO_EAR_SWITCH_MANUAL) { - *is_auto_mute = 0; - /* return warning */ - if (set_flag) { - control->inserted = *new_type; - set_flag = 0; - } - res = AVSYS_STATE_WAR_INTERNAL; } return res; + #else return AVSYS_STATE_ERR_DEVICE_NOT_SUPPORT; #endif @@ -834,27 +775,6 @@ int avsys_audio_path_earjack_process(int new_type) control->inserted = new_type; - if (control->ear_auto == AVSYS_AUDIO_EAR_SWITCH_MANUAL) { - return AVSYS_STATE_SUCCESS; - } - - /* Capture/Playback Gain Control */ - avsys_warning(AVAUDIO, "Gain C(%d), P(%d)\n", control->gain.capture, control->gain.playback); - err = capture_gain_func_table[control->gain.capture] (control); - if (AVSYS_FAIL(err)) { - avsys_error_r(AVAUDIO, "earjack change failed for %d gain : error 0x%x\n", control->gain.capture, err); - } - - err = playback_gain_func_table[control->gain.playback] (control); - if (AVSYS_SUCCESS(err)) { - /* H/W Control */ - err = __avsys_audio_path_set_hw_controls(control); - if (AVSYS_FAIL(err)) { - avsys_error_r(AVAUDIO, "__avsys_audio_path_set_hw_controls() failed in %s\n", __func__); - } - } else - avsys_error_r(AVAUDIO, "earjack change failed for %d gain : error 0x%x\n", control->gain.playback, err); - return err; #else return AVSYS_STATE_ERR_DEVICE_NOT_SUPPORT; @@ -893,8 +813,8 @@ enum { CMD_DEVICE_MAX }; -avsys_audio_alsa_aif_handle_t *g_hAIF[AIF_DEVICE_MAX] = { NULL, NULL, NULL, NULL }; -char *strAIF[AIF_DEVICE_MAX] = { "AIF2 Capture", "AIF2 Playback", "AIF3 Capture", "AIF3 Playback" }; +avsys_audio_alsa_aif_handle_t *g_hAIF[AIF_DEVICE_MAX] = { NULL, NULL, NULL, NULL, NULL }; +char *strAIF[AIF_DEVICE_MAX] = { "AIF2 Capture", "AIF2 Playback", "AIF3 Capture", "AIF3 Playback", "AIF4 Playback" }; #define SET_AIF(index) \ do { \ @@ -970,6 +890,7 @@ static int __avsys_audio_release_path (gain_info_t local_gain, avsys_audio_path_ { int err = AVSYS_STATE_SUCCESS; int iAIF = 0; + bool close_aif_later = false; avsys_warning(AVAUDIO, "Release path for %d %d\n", local_gain.playback, local_gain.capture); @@ -977,14 +898,15 @@ static int __avsys_audio_release_path (gain_info_t local_gain, avsys_audio_path_ case AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL: case AVSYS_AUDIO_PLAYBACK_GAIN_VIDEOCALL: if (getpid() == control->path_fixed_pid[PATH_FIXED_TYPE_CALL]) { -#ifndef OPEN_AIF_BEFORE_SCENARIO_SET /* FIXME : disable here, close after scenario set */ - __avsys_close_aif(); -#endif + if (!control->control_aif_before_path_set) { + __avsys_close_aif(); + } else { + close_aif_later = true; + } if (AVSYS_FAIL(avsys_audio_ascn_single_set(ASCN_CODEC_DISABLE_ON_SUSPEND))) { avsys_error_r(AVAUDIO, "[%s] failed to set codec_disable_on_suspend\n", __func__); } - control->p_path_status.playback |= PS_CODEC_DISABLE_ON_SUSPEND; } else { if (control->path_fixed_pid[PATH_FIXED_TYPE_CALL] < 0) { avsys_warning(AVAUDIO, "Sound path for call released already\n"); @@ -1007,20 +929,11 @@ static int __avsys_audio_release_path (gain_info_t local_gain, avsys_audio_path_ if (AVSYS_FAIL(avsys_audio_ascn_single_set(ASCN_CODEC_DISABLE_ON_SUSPEND))) { avsys_error_r(AVAUDIO, "[%s] failed to set codec_disable_on_suspend\n", __func__); } - control->p_path_status.playback |= PS_CODEC_DISABLE_ON_SUSPEND; - if (AVSYS_FAIL(avsys_audio_ascn_single_set(ASCN_STR_RESET))) { + if (AVSYS_FAIL(avsys_audio_ascn_single_set(ASCN_STR_RESET_CAPTURE))) { avsys_error_r(AVAUDIO, "[%s] failed to set reset\n", __func__); - } else { - control->p_path_status.playback = PS_PATH_NONE; } - /* TODO: Path fixed clear (path_fixed, path_fixed_pid) */ - if ((control->path_fixed & PATH_FIXED_WITH_FMRADIO) == 0) { - avsys_error(AVAUDIO, "FM-Radio path release without radio path request\n"); - } - control->path_fixed &= ~PATH_FIXED_WITH_FMRADIO; - control->path_fixed_pid[PATH_FIXED_TYPE_FMRADIO] = -1; break; default: @@ -1037,31 +950,12 @@ static int __avsys_audio_release_path (gain_info_t local_gain, avsys_audio_path_ control->gain.capture = AVSYS_AUDIO_CAPTURE_GAIN_AP; control->path.playback = AVSYS_AUDIO_PATH_EX_SPK; control->path.capture = AVSYS_AUDIO_PATH_EX_MIC; - - switch(control->route_policy) - { - case AVSYS_AUDIO_ROUTE_POLICY_DEFAULT: - case AVSYS_AUDIO_ROUTE_POLICY_IGNORE_A2DP: - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_AUTO_WITH_MUTE; - control->option.playback = AVSYS_AUDIO_PATH_OPTION_JACK_AUTO; - control->option.capture = AVSYS_AUDIO_PATH_OPTION_JACK_AUTO; - break; - - case AVSYS_AUDIO_ROUTE_POLICY_HANDSET_ONLY: - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_AUTO_WITHOUT_MUTE; - control->option.playback = AVSYS_AUDIO_PATH_OPTION_NONE; - control->option.capture = AVSYS_AUDIO_PATH_OPTION_NONE; - break; - - default: - break; + if (control->inserted != AVSYS_AUDIO_INSERTED_NONE) { + control->path.playback = AVSYS_AUDIO_PATH_EX_HEADSET; + if (control->inserted == AVSYS_AUDIO_INSERTED_4) + control->path.capture = AVSYS_AUDIO_PATH_EX_HEADSETMIC; } - control->p_path_status.playback = PS_PATH_NONE; - control->p_path_status.capture = PS_PATH_NONE; - control->p_gain_status.playback = GS_GAIN_NONE; - control->p_gain_status.capture = GS_GAIN_NONE; - /* Playback */ err = __avsys_audio_path_set_ascn_ap_playback(control); if (AVSYS_SUCCESS(err)) { @@ -1080,17 +974,43 @@ static int __avsys_audio_release_path (gain_info_t local_gain, avsys_audio_path_ } } - /* FIXME : Close AIF, this will be moved before scneario set */ -#ifdef OPEN_AIF_BEFORE_SCENARIO_SET - if ((local_gain.playback == AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL || local_gain.playback == AVSYS_AUDIO_PLAYBACK_GAIN_VIDEOCALL) && - getpid() == control->path_fixed_pid[PATH_FIXED_TYPE_CALL]) { - __avsys_close_aif(); + if (close_aif_later == true) { + __avsys_close_aif(); } -#endif return err; } +int avsys_audio_path_earjack_get_type() +{ + avsys_audio_path_ex_info_t *control = NULL; + avsys_audio_path_ex_info_t **temp = NULL; + int err = AVSYS_STATE_SUCCESS; + int ret = 0; + + temp = &control; + if (AVSYS_FAIL(avsys_audio_get_shm(AVSYS_AUDIO_SHM_IDEN_PATH, (void **)temp))) { + avsys_error_r(AVAUDIO, "avsys_audio_get_shm() failed in %s\n", __func__); + return AVSYS_STATE_ERR_INTERNAL; + } + if (control == NULL) + return AVSYS_STATE_ERR_NULL_POINTER; + + if (AVSYS_FAIL(avsys_audio_lock_sync(AVSYS_AUDIO_SYNC_IDEN_PATH))) { + avsys_error_r(AVAUDIO, "avsys_audio_lock_sync() failed in %s\n", __func__); + return AVSYS_STATE_ERR_INTERNAL; + } + + ret = control->inserted; + + if (AVSYS_FAIL(avsys_audio_unlock_sync(AVSYS_AUDIO_SYNC_IDEN_PATH))) { + avsys_error_r(AVAUDIO, "avsys_audio_unlock_sync() failed in %s\n", __func__); + return AVSYS_STATE_ERR_INTERNAL; + } + + return ret; +} + int avsys_audio_path_ex_set_path(int gain, int out, int in, int option) { avsys_audio_path_ex_info_t *control = NULL; @@ -1100,7 +1020,7 @@ int avsys_audio_path_ex_set_path(int gain, int out, int in, int option) pid_t current_pid; int err = AVSYS_STATE_SUCCESS; char req_release_path = 0; - char AIF_control[AIF_DEVICE_MAX] = { CMD_DEVICE_NONE, CMD_DEVICE_NONE, CMD_DEVICE_NONE, CMD_DEVICE_NONE }; + char AIF_control[AIF_DEVICE_MAX] = { CMD_DEVICE_NONE, CMD_DEVICE_NONE, CMD_DEVICE_NONE, CMD_DEVICE_NONE, CMD_DEVICE_NONE }; int iAIF = 0; avsys_warning(AVAUDIO, "=================== [Input Param] gain %d, out %d, in %d, opt 0x%x ====================\n", gain, out, in, option); @@ -1114,6 +1034,7 @@ int avsys_audio_path_ex_set_path(int gain, int out, int in, int option) case AVSYS_AUDIO_GAIN_EX_CAMERA: case AVSYS_AUDIO_GAIN_EX_GAME: req_gain.playback = AVSYS_AUDIO_PLAYBACK_GAIN_AP; + req_gain.capture = AVSYS_AUDIO_CAPTURE_GAIN_AP; break; case AVSYS_AUDIO_GAIN_EX_RINGTONE: @@ -1179,11 +1100,6 @@ int avsys_audio_path_ex_set_path(int gain, int out, int in, int option) control->path_fixed &= ~PATH_FIXED_WITH_CALL; } } - if (control->path_fixed & PATH_FIXED_WITH_FMRADIO) { - if (AVSYS_FAIL(avsys_check_process(control->path_fixed_pid[PATH_FIXED_TYPE_FMRADIO]))) { - control->path_fixed &= ~PATH_FIXED_WITH_FMRADIO; - } - } if (control->path_fixed == PATH_FIXED_NONE) { /* forced gain setting when path fixed by dead process */ if (req_gain.playback != local_gain.playback) { @@ -1266,6 +1182,7 @@ int avsys_audio_path_ex_set_path(int gain, int out, int in, int option) case AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO: control->path_fixed_pid[PATH_FIXED_TYPE_FMRADIO] = current_pid; + SET_AIF(AIF4_PLAYBACK); break; } } @@ -1309,10 +1226,9 @@ int avsys_audio_path_ex_set_path(int gain, int out, int in, int option) } /* Open AIFs */ - /* FIXME: this will be moved to after alsa scenraio set */ -#ifdef OPEN_AIF_BEFORE_SCENARIO_SET - err = __avsys_open_aif(AIF_control); -#endif + if (control->control_aif_before_path_set) { + err = __avsys_open_aif(AIF_control); + } /* Do ALSA scenario control based on gain */ /* Playback */ @@ -1346,9 +1262,10 @@ int avsys_audio_path_ex_set_path(int gain, int out, int in, int option) avsys_warning(AVAUDIO, "capture gain : ap\n"); err = __avsys_audio_path_set_ascn_ap_capture(control); } -#ifndef OPEN_AIF_BEFORE_SCENARIO_SET - err = __avsys_open_aif(AIF_control); -#endif + + if (!control->control_aif_before_path_set) { + err = __avsys_open_aif(AIF_control); + } FINISHED: /* UnLOCK */ @@ -1566,116 +1483,45 @@ static int __avsys_audio_path_set_ascn_ap_playback(avsys_audio_path_ex_info_t *c switch (control->path.playback) { case AVSYS_AUDIO_PATH_EX_SPK: - if (control->option.playback & AVSYS_AUDIO_PATH_OPTION_LEGACY_MODE) { - avsys_warning(AVAUDIO, "Does not support legacy mode anymore\n"); - } - if (control->option.playback & AVSYS_AUDIO_PATH_OPTION_DUAL_OUT) { if (callalert_mode) { - control->gain_status.playback = GS_AP_TO_SPK_CALLALERT; cmd_gain[0] = INPUT_AP | OUTPUT_STEREO_SPK | GAIN_CALLALERT; } else { - control->gain_status.playback = GS_AP_TO_SPK; cmd_gain[0] = INPUT_AP | OUTPUT_STEREO_SPK | GAIN_MODE; } if (control->inserted == AVSYS_AUDIO_INSERTED_NONE) { - control->path_status.playback = PS_AP_TO_SPK; cmd_path[0] = INPUT_AP | OUTPUT_STEREO_SPK; } else { - control->path_status.playback = PS_AP_TO_SPK | PS_AP_TO_HEADSET; cmd_path[0] = INPUT_AP | OUTPUT_STEREO_SPK; cmd_path[1] = INPUT_AP | OUTPUT_HEADSET; } control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; } else { - if (control->option.playback & AVSYS_AUDIO_PATH_OPTION_JACK_AUTO) { - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_AUTO_WITH_MUTE; - if (control->inserted == AVSYS_AUDIO_INSERTED_NONE) { - if (callalert_mode) { - control->gain_status.playback = GS_AP_TO_SPK_CALLALERT; - cmd_gain[0] = INPUT_AP | OUTPUT_STEREO_SPK | GAIN_CALLALERT; - } else { - control->gain_status.playback = GS_AP_TO_SPK; - cmd_gain[0] = INPUT_AP | OUTPUT_STEREO_SPK | GAIN_MODE; - } - control->path_status.playback = PS_AP_TO_SPK; - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; - cmd_path[0] = INPUT_AP | OUTPUT_STEREO_SPK; - } else { - if (callalert_mode) { - control->gain_status.playback = GS_AP_TO_HEADSET_CALLALERT; - cmd_gain[0] = INPUT_AP | OUTPUT_HEADSET | GAIN_CALLALERT; - } else { - control->gain_status.playback = GS_AP_TO_HEADSET; - cmd_gain[0] = INPUT_AP | OUTPUT_HEADSET | GAIN_MODE; - } - control->path_status.playback = PS_AP_TO_HEADSET; - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET; - cmd_path[0] = INPUT_AP | OUTPUT_HEADSET; - } + if (callalert_mode) { + cmd_gain[0] = INPUT_AP | OUTPUT_STEREO_SPK | GAIN_CALLALERT; } else { - if (callalert_mode) { - control->gain_status.playback = GS_AP_TO_SPK_CALLALERT; - cmd_gain[0] = INPUT_AP | OUTPUT_STEREO_SPK | GAIN_CALLALERT; - } else { - control->gain_status.playback = GS_AP_TO_SPK; - cmd_gain[0] = INPUT_AP | OUTPUT_STEREO_SPK | GAIN_MODE; - } - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_AUTO_WITHOUT_MUTE; - control->path_status.playback = PS_AP_TO_SPK; - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; - - cmd_path[0] = INPUT_AP | OUTPUT_STEREO_SPK; + cmd_gain[0] = INPUT_AP | OUTPUT_STEREO_SPK | GAIN_MODE; } + control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_AUTO_WITHOUT_MUTE; + control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; + + cmd_path[0] = INPUT_AP | OUTPUT_STEREO_SPK; } break; case AVSYS_AUDIO_PATH_EX_RECV: - if (control->option.playback & AVSYS_AUDIO_PATH_OPTION_LEGACY_MODE) { - avsys_warning(AVAUDIO, "Does not support legacy mode anymore\n"); - } - - if (control->option.playback & AVSYS_AUDIO_PATH_OPTION_JACK_AUTO) { - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_AUTO_WITH_MUTE; - if (control->inserted == AVSYS_AUDIO_INSERTED_NONE) { - control->gain_status.playback = GS_AP_TO_RECV; - control->path_status.playback = PS_AP_TO_RECV; - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; - cmd_gain[0] = INPUT_AP | OUTPUT_RECV | GAIN_MODE; - cmd_path[0] = INPUT_AP | OUTPUT_RECV; - } else { - if (callalert_mode) { - control->gain_status.playback = GS_AP_TO_HEADSET_CALLALERT; - cmd_gain[0] = INPUT_AP | OUTPUT_HEADSET | GAIN_CALLALERT; - } else { - control->gain_status.playback = GS_AP_TO_HEADSET; - cmd_gain[0] = INPUT_AP | OUTPUT_HEADSET | GAIN_MODE; - } - control->path_status.playback = PS_AP_TO_HEADSET; - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET; - cmd_path[0] = INPUT_AP | OUTPUT_HEADSET; - } - } else { - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_MANUAL; - control->gain_status.playback = GS_AP_TO_RECV; - control->path_status.playback = PS_AP_TO_RECV; - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; - cmd_gain[0] = INPUT_AP | OUTPUT_RECV | GAIN_MODE; - cmd_path[0] = INPUT_AP | OUTPUT_RECV; - } + control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; + cmd_gain[0] = INPUT_AP | OUTPUT_RECV | GAIN_MODE; + cmd_path[0] = INPUT_AP | OUTPUT_RECV; break; case AVSYS_AUDIO_PATH_EX_HEADSET: - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_MANUAL; if (callalert_mode) { - control->gain_status.playback = GS_AP_TO_HEADSET_CALLALERT; cmd_gain[0] = INPUT_AP | OUTPUT_HEADSET | GAIN_CALLALERT; } else { - control->gain_status.playback = GS_AP_TO_HEADSET; cmd_gain[0] = INPUT_AP | OUTPUT_HEADSET | GAIN_MODE; } - control->path_status.playback = PS_AP_TO_HEADSET; control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET; cmd_path[0] = INPUT_AP | OUTPUT_HEADSET; break; @@ -1686,9 +1532,6 @@ static int __avsys_audio_path_set_ascn_ap_playback(avsys_audio_path_ex_info_t *c break; case AVSYS_AUDIO_PATH_EX_BTHEADSET: - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_MANUAL; - control->gain_status.playback = GS_AP_TO_BT; - control->path_status.playback = PS_AP_TO_BT; control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET; cmd_gain[0] = INPUT_AP | OUTPUT_BT_HEADSET | GAIN_MODE; cmd_path[0] = INPUT_AP | OUTPUT_BT_HEADSET; @@ -1699,14 +1542,9 @@ static int __avsys_audio_path_set_ascn_ap_playback(avsys_audio_path_ex_info_t *c break; } - //avsys_warning(AVAUDIO,"pg(0x%X), g(0x%X), pp(0x%X), p(0x%X)\n", control->p_gain_status, control->gain_status, control->p_path_status, control->path_status); - if ((control->p_path_status.playback != control->path_status.playback) || control->gain_debug_mode == 1) { - avsys_warning(AVAUDIO, "Run Alsa Scenario Script\n"); - RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_gain, 1, ASCN_RESET_PLAYBACK)) - control->p_gain_status.playback = control->gain_status.playback; - RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_path, 2, ASCN_RESET_NONE)) - control->p_path_status.playback = control->path_status.playback; - } + avsys_warning(AVAUDIO, "Run Alsa Scenario Script\n"); + RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_gain, 1, ASCN_RESET_PLAYBACK)) + RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_path, 2, ASCN_RESET_NONE)) avsys_info(AVAUDIO, ">> leave"); return AVSYS_STATE_SUCCESS; @@ -1721,90 +1559,39 @@ static int __avsys_audio_path_set_ascn_videocall(avsys_audio_path_ex_info_t *con { int cmd_gain[2] = { 0, 0 }; int cmd_path[3] = { 0, 0, 0 }; - int skip_clear = 0; + int gain_idx = 0; + int path_idx = 0; + control->path_fixed = PATH_FIXED_WITH_CALL; switch (control->path.playback) { case AVSYS_AUDIO_PATH_EX_NONE: - if (control->option.playback & AVSYS_AUDIO_PATH_OPTION_LEGACY_MODE) { - /* Legacy mode does not effect here... */ - avsys_warning(AVAUDIO, "legacy mode option %s\n", __func__); - } - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_MANUAL; - if (control->reqgain.playback == control->gain.playback) { - avsys_warning(AVAUDIO, "Output block on videocall"); - } else { - avsys_warning(AVAUDIO, "Ignore another path setting request during voicecall"); - } - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; + avsys_warning(AVAUDIO, "[SZ] playback AVSYS_AUDIO_PATH_EX_NONE\n"); break; case AVSYS_AUDIO_PATH_EX_SPK: if (control->reqgain.playback == control->gain.playback) { - if (control->option.playback & AVSYS_AUDIO_PATH_OPTION_JACK_AUTO) { - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_AUTO_WITH_MUTE; - if (control->inserted != AVSYS_AUDIO_INSERTED_NONE) { - control->gain_status.playback = GS_AP_TO_HEADSET; - control->path_status.playback = PS_AP_TO_HEADSET; - cmd_gain[0] = INPUT_AP | OUTPUT_HEADSET | GAIN_MODE; - cmd_path[0] = INPUT_AP | OUTPUT_HEADSET; - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET; - } else { - control->gain_status.playback = GS_AP_TO_SPK; - control->path_status.playback = PS_AP_TO_SPK; - cmd_gain[0] = INPUT_AP | OUTPUT_STEREO_SPK | GAIN_MODE; - cmd_path[0] = INPUT_AP | OUTPUT_STEREO_SPK; - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; - } - } else { /* ear jack manual */ - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_MANUAL; - control->gain_status.playback = GS_AP_TO_SPK; - control->path_status.playback = PS_AP_TO_SPK; - cmd_gain[0] = INPUT_AP | OUTPUT_STEREO_SPK | GAIN_MODE; - cmd_path[0] = INPUT_AP | OUTPUT_STEREO_SPK; - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; - } - } else { /* changed by priority */ + cmd_gain[gain_idx++] = INPUT_AP | OUTPUT_STEREO_SPK | GAIN_MODE; + cmd_path[path_idx++] = INPUT_AP | OUTPUT_STEREO_SPK; + control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; + } else { avsys_warning(AVAUDIO, "Sound Path request during VT call ignored."); } break; case AVSYS_AUDIO_PATH_EX_RECV: if (control->gain.playback == control->reqgain.playback) { - if (control->option.playback & AVSYS_AUDIO_PATH_OPTION_JACK_AUTO) { - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_AUTO_WITH_MUTE; - if (control->inserted != AVSYS_AUDIO_INSERTED_NONE) { - control->gain_status.playback = GS_AP_TO_HEADSET; - control->path_status.playback = PS_AP_TO_HEADSET; - cmd_gain[0] = INPUT_AP | OUTPUT_HEADSET | GAIN_MODE; - cmd_path[0] = INPUT_AP | OUTPUT_HEADSET; - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET; - } else { - control->gain_status.playback = GS_AP_TO_RECV; - control->path_status.playback = PS_AP_TO_RECV; - cmd_gain[0] = INPUT_AP | OUTPUT_RECV | GAIN_MODE; - cmd_path[0] = INPUT_AP | OUTPUT_RECV; - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; - } - } else { /* ear jack manual */ - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_MANUAL; - control->gain_status.playback = GS_AP_TO_RECV; - control->path_status.playback = PS_AP_TO_RECV; - cmd_gain[0] = INPUT_AP | OUTPUT_RECV | GAIN_MODE; - cmd_path[0] = INPUT_AP | OUTPUT_RECV; - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; - } - } else { /* changed by priority */ + cmd_gain[gain_idx++] = INPUT_AP | OUTPUT_RECV | GAIN_MODE; + cmd_path[path_idx++] = INPUT_AP | OUTPUT_RECV; + control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; + } else { avsys_warning(AVAUDIO, "Sound Path request during VT call ignored."); - } /* reqgain, gain */ + } break; case AVSYS_AUDIO_PATH_EX_HEADSET: if (control->reqgain.playback == control->gain.playback) { - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_MANUAL; - control->gain_status.playback = GS_AP_TO_HEADSET; - control->path_status.playback = PS_AP_TO_HEADSET; - cmd_gain[0] = INPUT_AP | OUTPUT_HEADSET | GAIN_MODE; - cmd_path[0] = INPUT_AP | OUTPUT_HEADSET; + cmd_gain[gain_idx++] = INPUT_AP | OUTPUT_HEADSET | GAIN_MODE; + cmd_path[path_idx++] = INPUT_AP | OUTPUT_HEADSET; control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET; } else { avsys_warning(AVAUDIO, "Sound Path request during VT call ignored."); @@ -1813,11 +1600,8 @@ static int __avsys_audio_path_set_ascn_videocall(avsys_audio_path_ex_info_t *con case AVSYS_AUDIO_PATH_EX_BTHEADSET: if (control->reqgain.playback == control->gain.playback) { - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_MANUAL; - control->gain_status.playback = GS_AP_TO_BT; - control->path_status.playback = PS_AP_TO_BT; - cmd_gain[0] = INPUT_AP | OUTPUT_BT_HEADSET | GAIN_MODE; - cmd_path[0] = INPUT_AP | OUTPUT_BT_HEADSET; + cmd_gain[gain_idx++] = INPUT_AP | OUTPUT_BT_HEADSET | GAIN_MODE; + cmd_path[path_idx++] = INPUT_AP | OUTPUT_BT_HEADSET; control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET; } else { avsys_warning(AVAUDIO, "Sound Path request during VT call ignored."); @@ -1834,61 +1618,27 @@ static int __avsys_audio_path_set_ascn_videocall(avsys_audio_path_ex_info_t *con switch (control->path.capture) { case AVSYS_AUDIO_PATH_EX_NONE: - if (control->reqgain.capture == control->gain.capture) { - /* Clear modem input */ - control->path_status.capture &= ~(PS_MAINMIC_TO_AP | PS_SUBMIC_TO_AP | PS_EARMIC_TO_AP | PS_BTMIC_TO_AP); - } else { - avsys_warning(AVAUDIO, "Ignore another path setting request during VT call (input)\n"); - } + avsys_warning(AVAUDIO, "[SZ] capture AVSYS_AUDIO_PATH_EX_NONE\n"); break; case AVSYS_AUDIO_PATH_EX_MIC: - if (control->option.capture & AVSYS_AUDIO_PATH_OPTION_JACK_AUTO) { - if ((control->inserted == AVSYS_AUDIO_INSERTED_4) && (control->path_status.playback & PS_AP_TO_HEADSET)) { - control->gain_status.capture |= GS_EARMIC_TO_AP; - control->path_status.capture |= PS_EARMIC_TO_AP; - cmd_gain[1] = INPUT_EAR_MIC | OUTPUT_AP | GAIN_MODE; - cmd_path[1] = INPUT_EAR_MIC | OUTPUT_AP; - } else { - if (control->option.capture & AVSYS_AUDIO_PATH_OPTION_USE_SUBMIC) { - control->gain_status.capture |= GS_SUBMIC_TO_AP; - control->path_status.capture |= PS_SUBMIC_TO_AP; - cmd_gain[1] = INPUT_SUB_MIC | OUTPUT_AP | GAIN_MODE; - cmd_path[1] = INPUT_SUB_MIC | OUTPUT_AP; - } else { - control->gain_status.capture |= GS_MAINMIC_TO_AP; - control->path_status.capture |= PS_MAINMIC_TO_AP; - cmd_gain[1] = INPUT_MAIN_MIC | OUTPUT_AP | GAIN_MODE; - cmd_path[1] = INPUT_MAIN_MIC | OUTPUT_AP; - } - } + if (control->option.capture & AVSYS_AUDIO_PATH_OPTION_USE_SUBMIC) { + cmd_gain[gain_idx++] = INPUT_SUB_MIC | OUTPUT_AP | GAIN_MODE; + cmd_path[path_idx++] = INPUT_SUB_MIC | OUTPUT_AP; } else { - if (control->option.capture & AVSYS_AUDIO_PATH_OPTION_USE_SUBMIC) { - control->gain_status.capture |= GS_SUBMIC_TO_AP; - control->path_status.capture |= PS_SUBMIC_TO_AP; - cmd_gain[1] = INPUT_SUB_MIC | OUTPUT_AP | GAIN_MODE; - cmd_path[1] = INPUT_SUB_MIC | OUTPUT_AP; - } else { - control->gain_status.capture |= GS_MAINMIC_TO_AP; - control->path_status.capture |= PS_MAINMIC_TO_AP; - cmd_gain[1] = INPUT_MAIN_MIC | OUTPUT_AP | GAIN_MODE; - cmd_path[1] = INPUT_MAIN_MIC | OUTPUT_AP; - } + cmd_gain[gain_idx++] = INPUT_MAIN_MIC | OUTPUT_AP | GAIN_MODE; + cmd_path[path_idx++] = INPUT_MAIN_MIC | OUTPUT_AP; } break; case AVSYS_AUDIO_PATH_EX_HEADSETMIC: - control->gain_status.capture |= GS_EARMIC_TO_AP; - control->path_status.capture |= PS_EARMIC_TO_AP; - cmd_gain[1] = INPUT_EAR_MIC | OUTPUT_AP | GAIN_MODE; - cmd_path[1] = INPUT_EAR_MIC | OUTPUT_AP; + cmd_gain[gain_idx++] = INPUT_EAR_MIC | OUTPUT_AP | GAIN_MODE; + cmd_path[path_idx++] = INPUT_EAR_MIC | OUTPUT_AP; break; case AVSYS_AUDIO_PATH_EX_BTMIC: - control->gain_status.capture |= GS_BTMIC_TO_AP; - control->path_status.capture |= PS_BTMIC_TO_AP; - cmd_gain[1] = INPUT_BT_MIC | OUTPUT_AP | GAIN_MODE; - cmd_path[1] = INPUT_BT_MIC | OUTPUT_AP; + cmd_gain[gain_idx++] = INPUT_BT_MIC | OUTPUT_AP | GAIN_MODE; + cmd_path[path_idx++] = INPUT_BT_MIC | OUTPUT_AP; break; case AVSYS_AUDIO_PATH_EX_HANDSFREE: @@ -1896,16 +1646,9 @@ static int __avsys_audio_path_set_ascn_videocall(avsys_audio_path_ex_info_t *con break; } - if((control->p_path_status.playback != control->path_status.playback) - || ((control->p_path_status.capture != control->path_status.capture)) || control->gain_debug_mode == 1) { - if(!skip_clear) { - RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_single_set(ASCN_STR_RESET)) - } - RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_gain, 2, ASCN_RESET_NONE)) - control->p_gain_status = control->gain_status; /* both playback and capture */ - RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_path, 2, ASCN_RESET_NONE)) - control->p_path_status = control->path_status; /* both playback and capture */ - } + RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_single_set(ASCN_STR_RESET)); + RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_gain, 2, ASCN_RESET_NONE)); + RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_path, 2, ASCN_RESET_NONE)); return AVSYS_STATE_SUCCESS; } @@ -1919,82 +1662,56 @@ static int __avsys_audio_path_set_ascn_fmradio(avsys_audio_path_ex_info_t *contr int skip_clear_record = 0; int gain_idx = 0; int path_idx = 0; - control->path_fixed = PATH_FIXED_WITH_FMRADIO; + + avsys_warning(AVAUDIO, "req gain playback [%x], control gain playback [%x]\n", + control->reqgain.playback, control->gain.playback); + avsys_warning(AVAUDIO, "req gain capture [%x], control gain capture [%x]\n", + control->reqgain.capture, control->gain.capture); + switch (control->path.playback) { case AVSYS_AUDIO_PATH_EX_NONE: - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_MANUAL; - control->gain_status.playback = GS_FMRADIO_TO_SPK; - control->path_status.playback = PS_PATH_NONE; - cmd_gain[gain_idx++] = INPUT_FMRADIO | OUTPUT_STEREO_SPK | GAIN_MODE; + avsys_warning(AVAUDIO, "[SZ] playback AVSYS_AUDIO_PATH_EX_NONE\n"); break; case AVSYS_AUDIO_PATH_EX_SPK: - if (control->option.playback & AVSYS_AUDIO_PATH_OPTION_JACK_AUTO) { - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_AUTO_WITHOUT_MUTE; - if (control->reqgain.playback == control->gain.playback) { - if (control->inserted != AVSYS_AUDIO_INSERTED_NONE) { - control->gain_status.playback = GS_FMRADIO_TO_HEADSET; - control->path_status.playback = PS_FMRADIO_TO_HEADSET; - cmd_gain[gain_idx++] = INPUT_FMRADIO | OUTPUT_HEADSET | GAIN_MODE; - cmd_path[path_idx++] = INPUT_FMRADIO | OUTPUT_HEADSET; - cmd_path[path_idx++] = INPUT_AP | OUTPUT_HEADSET; - } else { - control->gain_status.playback = GS_FMRADIO_TO_SPK; - control->path_status.playback = PS_FMRADIO_TO_SPK; - cmd_gain[gain_idx++] = INPUT_FMRADIO | OUTPUT_STEREO_SPK | GAIN_MODE; - cmd_path[path_idx++] = INPUT_FMRADIO | OUTPUT_STEREO_SPK; - cmd_path[path_idx++] = INPUT_AP | OUTPUT_STEREO_SPK; - } - } else { - /* append ap playback sound path */ - control->path_status.playback = control->p_path_status.playback; - if (control->inserted != AVSYS_AUDIO_INSERTED_NONE) { - control->path_status.playback |= PS_AP_TO_HEADSET; - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET; - cmd_path[path_idx++] = INPUT_AP | OUTPUT_HEADSET; - } else { - control->path_status.playback |= PS_AP_TO_SPK; - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; - cmd_path[path_idx++] = INPUT_AP | OUTPUT_STEREO_SPK; - } - skip_clear = 1; - } - } else { /* ear jack manual */ - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_MANUAL; - if (control->reqgain.playback == control->gain.playback) { - control->gain_status.playback = GS_FMRADIO_TO_SPK; - control->path_status.playback = PS_FMRADIO_TO_SPK; - cmd_gain[gain_idx++] = INPUT_FMRADIO | OUTPUT_STEREO_SPK | GAIN_MODE; - cmd_path[path_idx++] = INPUT_FMRADIO | OUTPUT_STEREO_SPK; - cmd_path[path_idx++] = INPUT_AP | OUTPUT_STEREO_SPK; - } else { - /* append ap playback sound path */ - control->path_status.playback = control->p_path_status.playback; - control->path_status.playback |= PS_AP_TO_SPK; - control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; - cmd_path[path_idx++] = INPUT_AP | OUTPUT_STEREO_SPK; - skip_clear = 1; - } + if (control->reqgain.playback == control->gain.playback) { + avsys_warning(AVAUDIO, "req gain playback == control gain playback\n"); + cmd_gain[gain_idx++] = INPUT_AP | OUTPUT_STEREO_SPK | GAIN_MODE; + cmd_path[path_idx++] = INPUT_AP | OUTPUT_STEREO_SPK; + } else { + avsys_warning(AVAUDIO, "req gain playback != control gain playback\n"); + /* append ap playback sound path */ + control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; + cmd_path[path_idx++] = INPUT_AP | OUTPUT_STEREO_SPK; + skip_clear = 1; } break; case AVSYS_AUDIO_PATH_EX_HEADSET: - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_MANUAL; if (control->reqgain.playback == control->gain.playback) { - control->gain_status.playback = GS_FMRADIO_TO_HEADSET; - control->path_status.playback = PS_FMRADIO_TO_HEADSET; - cmd_gain[gain_idx++] = INPUT_FMRADIO | OUTPUT_HEADSET | GAIN_MODE; - cmd_path[path_idx++] = INPUT_FMRADIO | OUTPUT_HEADSET; + avsys_warning(AVAUDIO, "req gain playback == control gain playback\n"); + cmd_gain[gain_idx++] = INPUT_AP | OUTPUT_HEADSET | GAIN_MODE; cmd_path[path_idx++] = INPUT_AP | OUTPUT_HEADSET; } else { - /* append ap playback */ - control->path_status.playback = control->p_path_status.playback; - control->path_status.playback |= PS_AP_TO_HEADSET; + //append ap playback + avsys_warning(AVAUDIO, "req gain playback != control gain playback\n"); control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_HEADSET; cmd_path[path_idx++] = INPUT_AP | OUTPUT_HEADSET; skip_clear = 1; } break; + + case AVSYS_AUDIO_PATH_EX_A2DP: + if (control->reqgain.playback == control->gain.playback) { + avsys_warning(AVAUDIO, "req gain playback == control gain playback\n"); + //control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_MANUAL; + } else { + avsys_warning(AVAUDIO, "req gain playback != control gain playback\n"); + control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET; + skip_clear = 1; + } + break; + default: break; } @@ -2002,9 +1719,11 @@ static int __avsys_audio_path_set_ascn_fmradio(avsys_audio_path_ex_info_t *contr switch (control->path.capture) { case AVSYS_AUDIO_PATH_EX_FMINPUT: if (control->reqgain.capture == control->gain.capture) { - control->path_status.capture |= PS_FMRADIO_TO_AP; + avsys_warning(AVAUDIO, "req gain capture == control gain capture\n"); + cmd_path[path_idx++] = INPUT_FMRADIO | OUTPUT_AP | GAIN_MODE; cmd_path[path_idx++] = INPUT_FMRADIO | OUTPUT_AP; if (control->reqgain.capture == control->pregain.capture) { + avsys_warning(AVAUDIO, "req gain capture == control pregain capture\n"); skip_clear_record = 1; } } @@ -2013,18 +1732,13 @@ static int __avsys_audio_path_set_ascn_fmradio(avsys_audio_path_ex_info_t *contr break; } - if((control->p_path_status.playback != control->path_status.playback) - || (control->p_path_status.capture != control->path_status.capture) || control->gain_debug_mode == 1) { - if (skip_clear_record) { - RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_single_set(ASCN_STR_RESET_PLAYBACK)) - } else if (!skip_clear) { - RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_single_set(ASCN_STR_RESET)) - } - RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_gain, gain_idx, ASCN_RESET_NONE)) - control->p_gain_status = control->gain_status; /* both playback & capture */ - RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_path, path_idx, ASCN_RESET_NONE)) - control->p_path_status = control->path_status; /* both playback & capture */ + if (skip_clear_record) { + RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_single_set(ASCN_STR_RESET_PLAYBACK)) + } else if (!skip_clear) { + RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_single_set(ASCN_STR_RESET)) } + RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_gain, gain_idx, ASCN_RESET_NONE)) + RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_path, path_idx, ASCN_RESET_NONE)) return AVSYS_STATE_SUCCESS; } @@ -2038,56 +1752,20 @@ static int __avsys_audio_path_set_ascn_ap_capture(avsys_audio_path_ex_info_t *co control->path.capture, control->option.capture, control->gain.capture, control->inserted); switch(control->path.capture) { case AVSYS_AUDIO_PATH_EX_MIC: - if (control->option.capture & AVSYS_AUDIO_PATH_OPTION_JACK_AUTO) { - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_AUTO_WITH_MUTE; - if (control->inserted == AVSYS_AUDIO_INSERTED_4) { - control->gain_status.capture = GS_EARMIC_TO_AP; - control->path_status.capture = PS_EARMIC_TO_AP; - cmd_gain[0] = INPUT_EAR_MIC | OUTPUT_AP | GAIN_MODE; - cmd_path[0] = INPUT_EAR_MIC | OUTPUT_AP; - } else { - if (control->option.capture & AVSYS_AUDIO_PATH_OPTION_USE_SUBMIC) { - control->gain_status.capture = GS_SUBMIC_TO_AP; - control->path_status.capture = PS_SUBMIC_TO_AP; - cmd_gain[0] = INPUT_SUB_MIC | OUTPUT_AP | GAIN_MODE; - cmd_path[0] = INPUT_SUB_MIC | OUTPUT_AP; - } else if (control->option.capture & AVSYS_AUDIO_PATH_OPTION_USE_STEREOMIC) { - control->gain_status.capture = GS_STEREOMIC_TO_AP; - control->path_status.capture = PS_STEREOMIC_TO_AP; - cmd_gain[0] = INPUT_STEREO_MIC | OUTPUT_AP | GAIN_MODE; - cmd_path[0] = INPUT_STEREO_MIC | OUTPUT_AP; - } else { - control->gain_status.capture = GS_MAINMIC_TO_AP; - control->path_status.capture = PS_MAINMIC_TO_AP; - cmd_gain[0] = INPUT_MAIN_MIC | OUTPUT_AP | GAIN_MODE; - cmd_path[0] = INPUT_MAIN_MIC | OUTPUT_AP; - } - } + control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_AUTO_WITHOUT_MUTE; + if (control->option.capture & AVSYS_AUDIO_PATH_OPTION_USE_SUBMIC) { + cmd_gain[0] = INPUT_SUB_MIC | OUTPUT_AP | GAIN_MODE; + cmd_path[0] = INPUT_SUB_MIC | OUTPUT_AP; + } else if (control->option.capture & AVSYS_AUDIO_PATH_OPTION_USE_STEREOMIC) { + cmd_gain[0] = INPUT_STEREO_MIC | OUTPUT_AP | GAIN_MODE; + cmd_path[0] = INPUT_STEREO_MIC | OUTPUT_AP; } else { - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_AUTO_WITHOUT_MUTE; - if (control->option.capture & AVSYS_AUDIO_PATH_OPTION_USE_SUBMIC) { - control->gain_status.capture = GS_SUBMIC_TO_AP; - control->path_status.capture = PS_SUBMIC_TO_AP; - cmd_gain[0] = INPUT_SUB_MIC | OUTPUT_AP | GAIN_MODE; - cmd_path[0] = INPUT_SUB_MIC | OUTPUT_AP; - } else if (control->option.capture & AVSYS_AUDIO_PATH_OPTION_USE_STEREOMIC) { - control->gain_status.capture = GS_STEREOMIC_TO_AP; - control->path_status.capture = PS_STEREOMIC_TO_AP; - cmd_gain[0] = INPUT_STEREO_MIC | OUTPUT_AP | GAIN_MODE; - cmd_path[0] = INPUT_STEREO_MIC | OUTPUT_AP; - } else { - control->gain_status.capture = GS_MAINMIC_TO_AP; - control->path_status.capture = PS_MAINMIC_TO_AP; - cmd_gain[0] = INPUT_MAIN_MIC | OUTPUT_AP | GAIN_MODE; - cmd_path[0] = INPUT_MAIN_MIC | OUTPUT_AP; - } + cmd_gain[0] = INPUT_MAIN_MIC | OUTPUT_AP | GAIN_MODE; + cmd_path[0] = INPUT_MAIN_MIC | OUTPUT_AP; } break; case AVSYS_AUDIO_PATH_EX_HEADSETMIC: - control->ear_auto = AVSYS_AUDIO_EAR_SWITCH_MANUAL; - control->gain_status.capture = GS_EARMIC_TO_AP; - control->path_status.capture = PS_EARMIC_TO_AP; cmd_gain[0] = INPUT_EAR_MIC | OUTPUT_AP | GAIN_MODE; cmd_path[0] = INPUT_EAR_MIC | OUTPUT_AP; break; @@ -2096,12 +1774,8 @@ static int __avsys_audio_path_set_ascn_ap_capture(avsys_audio_path_ex_info_t *co break; } - if ((control->p_path_status.capture != control->path_status.capture) || control->gain_debug_mode == 1) { - RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_gain, 2, ASCN_RESET_CAPTURE)) - control->p_gain_status.capture = control->gain_status.capture; - RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_path, 2, ASCN_RESET_NONE)) - control->p_path_status.capture = control->path_status.capture; - } + RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_gain, 2, ASCN_RESET_CAPTURE)) + RET_IO_CTL_ERR_IF_FAIL(avsys_audio_ascn_bulk_set(cmd_path, 2, ASCN_RESET_NONE)) avsys_info (AVAUDIO, ">> leave"); @@ -2149,11 +1823,6 @@ static int __avsys_audio_path_set_hw_controls(avsys_audio_path_ex_info_t *contro } ptr->path_off = 0; out_device = control->lvol_dev_type; - if (control->path_status.playback == PS_PATH_NONE) { - ptr->path_off = 1; - avsys_warning(AVAUDIO, "Path off status...set logical volume device type to speaker\n"); - out_device = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; - } avsys_audio_logical_volume_update_table(out_device, &ptr->gain_setting); avsys_audio_logical_volume_convert(&ptr->setting_vol, &ptr->working_vol, &ptr->gain_setting); } @@ -2204,11 +1873,6 @@ int avsys_audio_path_set_volume(int handle) gain_type = ptr->gain_setting.vol_type; out_device = control->lvol_dev_type; - if (control->path_status.playback == PS_PATH_NONE) { - ptr->path_off = 1; - avsys_warning(AVAUDIO, "Path off status...set logical volume device type to speaker\n"); - out_device = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; - } avsys_assert(AVSYS_SUCCESS(avsys_audio_unlock_sync(AVSYS_AUDIO_SYNC_IDEN_PATH))); avsys_warning(AVAUDIO, "set path volume : gain(%d), out_dev(%d)\n", gain_type, out_device); err = avsys_audio_logical_volume_set_table(gain_type, out_device, &ptr->gain_setting); @@ -2218,66 +1882,14 @@ int avsys_audio_path_set_volume(int handle) int avsys_audio_path_set_route_policy(avsys_audio_route_policy_t route) { - avsys_audio_path_ex_info_t *control = NULL; - avsys_audio_path_ex_info_t **temp = NULL; - int err = AVSYS_STATE_SUCCESS; - - temp = &control; - avsys_assert(AVSYS_SUCCESS(avsys_audio_get_shm(AVSYS_AUDIO_SHM_IDEN_PATH, (void **)temp))); - avsys_assert(control != NULL); - avsys_assert(AVSYS_SUCCESS(avsys_audio_lock_sync(AVSYS_AUDIO_SYNC_IDEN_PATH))); - - control->route_policy = route; - - avsys_assert(AVSYS_SUCCESS(avsys_audio_unlock_sync(AVSYS_AUDIO_SYNC_IDEN_PATH))); - return err; + /* Deprecated */ + return 0; } int avsys_audio_path_get_route_policy(avsys_audio_route_policy_t *route) { - avsys_audio_path_ex_info_t *control = NULL; - avsys_audio_path_ex_info_t **temp = NULL; - int err = AVSYS_STATE_SUCCESS; - - if (!route) - return AVSYS_STATE_ERR_INVALID_PARAMETER; - - temp = &control; - avsys_assert(AVSYS_SUCCESS(avsys_audio_get_shm(AVSYS_AUDIO_SHM_IDEN_PATH, (void **)temp))); - avsys_assert(control != NULL); - avsys_assert(AVSYS_SUCCESS(avsys_audio_lock_sync(AVSYS_AUDIO_SYNC_IDEN_PATH))); - - *route = control->route_policy; - - avsys_assert(AVSYS_SUCCESS(avsys_audio_unlock_sync(AVSYS_AUDIO_SYNC_IDEN_PATH))); - return err; -} - -int avsys_audio_path_check_loud(bool *loud) -{ - avsys_audio_path_ex_info_t *control = NULL; - avsys_audio_path_ex_info_t **temp = NULL; - int err = AVSYS_STATE_SUCCESS; - - if (!loud) - return AVSYS_STATE_ERR_INVALID_PARAMETER; - - temp = &control; - avsys_assert(AVSYS_SUCCESS(avsys_audio_get_shm(AVSYS_AUDIO_SHM_IDEN_PATH, (void **)temp))); - avsys_assert(control != NULL); - avsys_assert(AVSYS_SUCCESS(avsys_audio_lock_sync(AVSYS_AUDIO_SYNC_IDEN_PATH))); - - if ((control->path_status.playback & PS_AP_TO_SPK) || - (control->path_status.playback & PS_AP_TO_RECV) || - (control->path_status.playback & PS_FMRADIO_TO_SPK)) { - *loud = true; - } else { - avsys_info(AVAUDIO, "playback path status 0x%x\n", control->path_status.playback); - *loud = false; - } - - avsys_assert(AVSYS_SUCCESS(avsys_audio_unlock_sync(AVSYS_AUDIO_SYNC_IDEN_PATH))); - return err; + /* Deprecated */ + return 0; } int avsys_audio_path_check_cp_audio(bool *cpaudio, bool *btpath) diff --git a/avsys-audio-sync.c b/avsys-audio-sync.c index dac16db..f0db338 100644 --- a/avsys-audio-sync.c +++ b/avsys-audio-sync.c @@ -35,8 +35,6 @@ static avsys_sync_param_t g_presettings[AVSYS_AUDIO_SYNC_IDEN_CNT] = { {"audio_handle_lock", AVSYS_KEY_PREFIX_GEN(AVSYS_KEY_PREFIX_AUDIO, AVSYS_AUDIO_SYNC_IDEN_HANDLE)}, {"audio_path_lock", AVSYS_KEY_PREFIX_GEN(AVSYS_KEY_PREFIX_AUDIO, AVSYS_AUDIO_SYNC_IDEN_PATH)}, - {"audio_route_policy_lock", AVSYS_KEY_PREFIX_GEN(AVSYS_KEY_PREFIX_AUDIO, AVSYS_AUDIO_SYNC_IDEN_SOUNDPATH)}, - {"av_volume_sem", AVSYS_KEY_PREFIX_GEN(AVSYS_KEY_PREFIX_AUDIO, AVSYS_AUDIO_SYNC_IDEN_VOLUME)}, }; int avsys_audio_create_sync(const avsys_audio_sync_iden_t iden) diff --git a/avsys-audio.c b/avsys-audio.c index 8ce7538..083190a 100644 --- a/avsys-audio.c +++ b/avsys-audio.c @@ -68,9 +68,21 @@ void __fini_module(void); } \ } while (0) +#define AVSYS_STREAM_LOCK() do { \ + pthread_mutex_lock(&gmutex);\ + avsys_info(AVAUDIO, "(+) LOCKED\n"); \ +} while (0) + +#define AVSYS_STREAM_UNLOCK() do { \ + pthread_mutex_unlock(&gmutex);\ + avsys_info(AVAUDIO, "(-) UNLOCKED\n"); \ +} while (0) + /** * Internal global variable */ +static pthread_mutex_t gmutex = PTHREAD_MUTEX_INITIALIZER; + /**************************************************************************** * @@ -103,6 +115,8 @@ int avsys_audio_open(avsys_audio_param_t *param, avsys_handle_t *phandle, int *s return AVSYS_STATE_ERR_INVALID_FORMAT; } + AVSYS_STREAM_LOCK(); + err = avsys_audio_handle_rejuvenation(); if (AVSYS_FAIL(err)) { avsys_error(AVAUDIO, "Unused handle cleanup before handle allocation failed in %s\n", __func__); @@ -151,14 +165,14 @@ int avsys_audio_open(avsys_audio_param_t *param, avsys_handle_t *phandle, int *s if (AVSYS_FAIL(err)) { goto error; } - err = avsys_audio_handle_update_priority(handle, param->priority, param->bluetooth, AVSYS_AUDIO_SET_PRIORITY); + err = avsys_audio_handle_update_priority(handle, param->priority, param->handle_route, AVSYS_AUDIO_SET_PRIORITY); if (AVSYS_FAIL(err)) { goto error; } } /* open device */ - err = avsys_audio_pasimple_open_device(p->mode, p->format, p->channels, p->samplerate, p, param->bluetooth); + err = avsys_audio_pasimple_open_device(p->mode, p->format, p->channels, p->samplerate, p, param->handle_route); if (AVSYS_FAIL(err)) { goto error; } @@ -187,7 +201,7 @@ int avsys_audio_open(avsys_audio_param_t *param, avsys_handle_t *phandle, int *s if (AVSYS_FAIL(err)) { goto error; } - + AVSYS_STREAM_UNLOCK(); return AVSYS_STATE_SUCCESS; error: @@ -204,7 +218,7 @@ error: avsys_error(AVAUDIO, "failed to open : RESION %x\n", err); *phandle = (avsys_handle_t)-1; - + AVSYS_STREAM_UNLOCK(); return err; } @@ -216,9 +230,14 @@ int avsys_audio_close(avsys_handle_t handle) bool cp_audio = false; bool bt_path = false; + AVSYS_STREAM_LOCK(); avsys_info(AVAUDIO, "%s, handle=[%d]\n", __func__, (int)handle); - AVSYS_GET_HANDLE_PTR(HANDLE_PTR_MODE_NORMAL); + err = avsys_audio_handle_get_ptr((int)handle, &p, HANDLE_PTR_MODE_NORMAL); + if (AVSYS_FAIL(err)) { + AVSYS_STREAM_UNLOCK(); + return err; + } if (AVSYS_FAIL(avsys_audio_handle_update_priority((int)handle, p->priority, AVSYS_AUDIO_HANDLE_ROUTE_FOLLOWING_POLICY, AVSYS_AUDIO_UNSET_PRIORITY))) { avsys_error(AVAUDIO, "unset priority of handle %d error: %x\n", handle, err); @@ -238,10 +257,16 @@ int avsys_audio_close(avsys_handle_t handle) avsys_audio_path_set_single_ascn("cp_to_bt"); } - AVSYS_RELEASE_HANDLE_PTR(HANDLE_PTR_MODE_NORMAL); + if (AVSYS_FAIL(avsys_audio_handle_release_ptr((int)handle, HANDLE_PTR_MODE_NORMAL))) { + avsys_error(AVAUDIO, "audio handle release failed\n"); + AVSYS_STREAM_UNLOCK(); + return AVSYS_STATE_ERR_INTERNAL; + } avsys_audio_handle_free((int)handle); + AVSYS_STREAM_UNLOCK(); + return err; } @@ -640,7 +665,7 @@ static int __avsys_audio_set_info(avsys_audio_handle_t *p, avsys_audio_param_t * avsys_info(AVAUDIO, " format = %d (0: 8bits, 1:16bits, 2:32bits)\n", param->format); avsys_info(AVAUDIO, " channel = %d\n", param->channels); avsys_info(AVAUDIO, " samplerate = %d\n", param->samplerate); - avsys_info(AVAUDIO, " route = %d (0: default, 1: handset)\n", param->bluetooth); + avsys_info(AVAUDIO, " route = %d (0: default, 1: handset)\n", param->handle_route); avsys_info(AVAUDIO, " Vol type = %d\n", param->vol_type); avsys_info(AVAUDIO, "=============================================\n"); @@ -691,6 +716,12 @@ int avsys_audio_earjack_manager_deinit(int waitfd) return avsys_audio_path_earjack_deinit(waitfd); } +EXPORT_API +int avsys_audio_earjack_manager_get_type(void) +{ + return avsys_audio_path_earjack_get_type(); +} + EXPORT_API int avsys_audio_earjack_manager_unlock(void) { @@ -700,15 +731,15 @@ int avsys_audio_earjack_manager_unlock(void) EXPORT_API int avsys_audio_set_route_policy(avsys_audio_route_policy_t route) { - return avsys_audio_path_set_route_policy(route); + /* Deprecated */ + return 0; } EXPORT_API int avsys_audio_get_route_policy(avsys_audio_route_policy_t *route) { - if (route == NULL) - return AVSYS_STATE_ERR_NULL_POINTER; - return avsys_audio_path_get_route_policy(route); + /* Deprecated */ + return 0; } EXPORT_API @@ -856,38 +887,42 @@ int avsys_audio_get_period_buffer_time(avsys_handle_t handle, unsigned int *peri } EXPORT_API -int avsys_audio_get_playing_device_info(avsys_audio_playing_devcie_t *dev) +int avsys_audio_cork (avsys_handle_t handle, int cork) { int err = AVSYS_STATE_SUCCESS; - int sink_info = 0; - bool alsa_loud = false; + avsys_audio_handle_t *p = NULL; - if (!dev) - return AVSYS_STATE_ERR_INVALID_PARAMETER; + AVSYS_GET_HANDLE_PTR(HANDLE_PTR_MODE_NORMAL); - err = avsys_audio_pa_ctrl_get_default_sink(&sink_info); - if (AVSYS_FAIL(err)) - return err; + err = avsys_audio_pasimple_cork(p, cork); + if(AVSYS_FAIL(err)) { + avsys_error(AVAUDIO, "avsys_audio_pasimple_cork() failed, 0x%X\n",err); + } - switch (sink_info) { - case AVSYS_AUDIO_PA_CTL_SINK_UNKNOWN: - avsys_error_r(AVAUDIO, "Unexpected sink information\n"); - err = AVSYS_STATE_ERR_UNAVAILABLE_DEVICE; - break; - case AVSYS_AUDIO_PA_CTL_SINK_ALSA: - err = avsys_audio_path_check_loud(&alsa_loud); - if (AVSYS_FAIL(err)) - break; - if (alsa_loud == true) - *dev = AVSYS_AUDIO_ROUTE_DEVICE_HANDSET; - else - *dev = AVSYS_AUDIO_ROUTE_DEVICE_EARPHONE; - break; - case AVSYS_AUDIO_PA_CTL_SINK_BLUEZ: - *dev = AVSYS_AUDIO_ROUTE_DEVICE_BLUETOOTH; - break; + AVSYS_RELEASE_HANDLE_PTR(HANDLE_PTR_MODE_NORMAL); + + return err; +} + +EXPORT_API +int avsys_audio_is_corked (avsys_handle_t handle, int *is_corked) +{ + int err = AVSYS_STATE_SUCCESS; + avsys_audio_handle_t *p = NULL; + + if (is_corked == NULL) { + return AVSYS_STATE_ERR_NULL_POINTER; + } + + AVSYS_GET_HANDLE_PTR(HANDLE_PTR_MODE_NORMAL); + + err = avsys_audio_pasimple_is_corked(p, is_corked); + if(AVSYS_FAIL(err)) { + avsys_error(AVAUDIO, "avsys_audio_pasimple_cork() failed, 0x%X\n",err); } + AVSYS_RELEASE_HANDLE_PTR(HANDLE_PTR_MODE_NORMAL); + return err; } diff --git a/configure.ac b/configure.ac index cd205b4..0b681de 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,10 @@ PKG_CHECK_MODULES(ASCN, libascenario) AC_SUBST(ASCN_CFLAGS) AC_SUBST(ASCN_LIBS) +PKG_CHECK_MODULES(INIPARSER, iniparser) +AC_SUBST(INIPARSER_CFLAGS) +AC_SUBST(INIPARSER_LIBS) + # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h memory.h stdlib.h string.h sys/time.h unistd.h errno.h sys/types.h sys/stat.h]) diff --git a/debian/changelog b/debian/changelog index 27b1d9c..0975d24 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,31 +1,1990 @@ -avsystem (0.4.13-4) unstable; urgency=low +avsystem (0.5.0-8) unstable; urgency=low - * ringtone type volume adjustment for emualtor + * Fix mute problem when boot up if earphone inserted * Git: slp/pkgs/a/avsystem - * Tag: avsystem_0.4.13-4 + * Tag: avsystem_0.5.0-7 - -- Seungbae Shin Thu, 19 Apr 2012 18:00:03 +0900 + -- Hyunseok Lee Thu, 05 Jul 2012 12:44:35 +0900 -avsystem (0.4.13-3) unstable; urgency=low +avsystem (0.5.0-7) unstable; urgency=low - * system/notification type volume adjustment for emulator + * Fix AIF close control for certain case * Git: slp/pkgs/a/avsystem - * Tag: avsystem_0.4.13-3 + * Tag: avsystem_0.5.0-7 - -- Seungbae Shin Wed, 04 Apr 2012 14:53:30 +0900 + -- Seungbae Shin Sun, 17 Jun 2012 18:47:04 +0900 -avsystem (0.4.13-2) unstable; urgency=low +avsystem (0.5.0-6) unstable; urgency=low - * volume adjustment for emulator + * Fix earmic path setting when earphone with mic is inserted in media session * Git: slp/pkgs/a/avsystem - * Tag: avsystem_0.4.13-2 + * Tag: avsystem_0.5.0-6 - -- Seungbae Shin Tue, 03 Apr 2012 14:29:06 +0900 + -- Seungbae Shin Thu, 31 May 2012 22:07:13 +0900 + +avsystem (0.5.0-5) unstable; urgency=low + + * Change earjack event path from /dev/eventN to /dev/input/eventN + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.5.0-5 + + -- Seungbae Shin Wed, 30 May 2012 13:22:27 +0900 + +avsystem (0.5.0-4) unstable; urgency=low + + * Fix wrong pointer access + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.5.0-4 + + -- Hyunseok Lee Thu, 17 May 2012 11:27:56 +0900 + +avsystem (0.5.0-3) unstable; urgency=low + + * Fix primary volume reset when set process doen't exists + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.5.0-3 + + -- Seungbae Shin Fri, 11 May 2012 18:07:47 +0900 + +avsystem (0.5.0-2) unstable; urgency=low + + * Separate AIF control routine + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.5.0-2 + + -- Hyunseok Lee Mon, 07 May 2012 17:17:25 +0900 + +avsystem (0.5.0-1) unstable; urgency=low + + * Remove duplicated path setting when earjack plug/unplug + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.5.0-1 + + -- Hyunseok Lee Fri, 27 Apr 2012 12:02:58 +0900 + +avsystem (0.5.0-0) unstable; urgency=low + + * [AudioRoute] cleanup unused/not supported variables + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.5.0-0 + + -- Seungbae Shin Mon, 23 Apr 2012 19:48:11 +0900 + +avsystem (0.4.17-0) unstable; urgency=low + + * change booting priority script (S30->S15) + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.4.17-0 + + -- Seungbae Shin Mon, 16 Apr 2012 12:02:33 +0900 + +avsystem (0.4.16-0) unstable; urgency=low + + * Check card name when set ALSA scenario + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.4.16-0 + + -- Seongho Jeong Thu, 05 Apr 2012 16:41:12 +0900 + +avsystem (0.4.15-1) unstable; urgency=low + + * sync with obs + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.4.15-1 + + -- Seungbae Shin Sun, 25 Mar 2012 15:13:30 +0900 + +avsystem (0.4.15-0) unstable; urgency=low + + * Update packaging/avsystem.spec + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.4.15-0 + + -- Seongho Jeong Mon, 12 Mar 2012 20:23:25 +0900 + +avsystem (0.4.14-0) unstable; urgency=low + + * remove unused volume semaphore + * enable test suites + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.4.14-0 + + -- Seungbae Shin Fri, 17 Feb 2012 15:17:33 +0900 avsystem (0.4.13-1) unstable; urgency=low - * Initial release + * Disable OPEN_AIF_BEFORE_SCENARIO_SET * Git: slp/pkgs/a/avsystem * Tag: avsystem_0.4.13-1 -- Hyunseok Lee Wed, 08 Feb 2012 09:56:41 +0900 + +avsystem (0.4.13-0) unstable; urgency=low + + * Set CP AIF param from asound.conf + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.4.13-0 + + -- Seungbae Shin Fri, 03 Feb 2012 12:43:37 +0900 + +avsystem (0.4.12-0) unstable; urgency=low + + * Code cleanup + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.4.12-0 + + -- Seungbae Shin Tue, 31 Jan 2012 13:54:54 +0900 + +avsystem (0.4.11-0) unstable; urgency=low + + * change shm path from "/" to "/tmp" (requested by bada) + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.4.11-0 + + -- Seungbae Shin Mon, 30 Jan 2012 14:52:34 +0900 + +avsystem (0.4.10-0) unstable; urgency=low + + * fix fade in/out + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.4.10-0 + + -- Seungbae Shin Tue, 10 Jan 2012 21:01:01 +0900 + +avsystem (0.4.9-0) unstable; urgency=low + + * Removed unused code in sound path setting + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.4.9-0 + + -- Seongho Jeong Fri, 06 Jan 2012 13:25:31 +0900 + +avsystem (0.4.8-0) unstable; urgency=low + + * Fix check loud for fmradio case + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.4.8-0 + + -- Seungbae Shin Tue, 20 Dec 2011 20:24:41 +0900 + +avsystem (0.4.7-1) unstable; urgency=low + + * Recover some deleted codes & Remove avsys-cam related codes + * Git: slp/pkgs/a/avsystem + * Tag: avsystem_0.4.7-1 + + -- Hyunseok Lee Fri, 16 Dec 2011 19:28:54 +0900 + +avsystem (0.4.6-2) unstable; urgency=low + + * Code clean up + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.4.6-2 + + -- Hyunseok Lee Tue, 06 Dec 2011 21:33:31 +0900 + +avsystem (0.4.6-1) unstable; urgency=low + + * Modified to mix FM radio stream with other audio streams. + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.4.6-1 + + -- Hyunseok Lee Fri, 11 Nov 2011 15:32:11 +0900 + +avsystem (0.4.6-0) unstable; urgency=low + + * open AIF before scenario set + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.4.6-0 + + -- Seungbae Shin Mon, 07 Nov 2011 14:42:49 +0900 + +avsystem (0.4.5-0) unstable; urgency=low + + * 1. Set max handle as 64 + * 2. change allocated size from 'int' to 'long long int' + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.4.5-0 + + -- Seungbae Shin Fri, 21 Oct 2011 13:31:42 +0900 + +avsystem (0.4.4-0) unstable; urgency=low + + * Implement virtual sink routing feature + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.4.4-0 + + -- Seungbae Shin Thu, 20 Oct 2011 13:32:50 +0900 + +avsystem (0.4.3-0) unstable; urgency=low + + * Change max handle (16->256) + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.4.3-0 + + -- Seungbae Shin Mon, 10 Oct 2011 13:50:09 +0900 + +avsystem (0.4.2-1) unstable; urgency=low + + * [camera] Fix prevent bug + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.4.2-1 + + -- Jeongmo Yang Mon, 10 Oct 2011 13:21:48 +0900 + +avsystem (0.4.2-0) unstable; urgency=low + + * 1. Fix to set auto earjack when voicecall with bt + * 2. Refine comments + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.4.2-0 + + -- Seungbae Shin Fri, 07 Oct 2011 16:32:53 +0900 + +avsystem (0.4.1-1) unstable; urgency=low + + * Reupload for build break + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.4.1-1 + + -- Seungbae Shin Thu, 22 Sep 2011 12:06:45 +0900 + +avsystem (0.4.1-0) unstable; urgency=low + + * Enhance debug dump + * Check value of jevent + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.4.1-0 + + -- Seungbae Shin Thu, 22 Sep 2011 11:43:16 +0900 + +avsystem (0.4.0-0) unstable; urgency=low + + * Fix earphone control + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.4.0-0 + + -- Seungbae Shin Thu, 15 Sep 2011 13:32:33 +0900 + +avsystem (0.3.50-2) unstable; urgency=low + + * Fix for prevent + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.50-2 + + -- Seungbae Shin Mon, 22 Aug 2011 15:40:21 +0900 + +avsystem (0.3.50-1) unstable; urgency=low + + * Code cleanup + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.50-1 + + -- Seungbae Shin Wed, 13 Jul 2011 19:41:23 +0900 + +avsystem (0.3.50-0) unstable; urgency=low + + * change vol max (system, noti, ringtone) + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.50-0 + + -- Seungbae Shin Tue, 05 Jul 2011 15:31:25 +0900 + +avsystem (0.3.49-0) unstable; urgency=low + + * [camera] Remove unnecessary code + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.49-0 + + -- Jeongmo Yang Tue, 21 Jun 2011 17:33:42 +0900 + +avsystem (0.3.48-0) unstable; urgency=low + + * fix videocall spkout + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.48-0 + + -- Seungbae Shin Fri, 10 Jun 2011 10:55:11 +0900 + +avsystem (0.3.47-0) unstable; urgency=low + + * [camera] Add screennail get method + * [camera] Fix prevent bug + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.47-0 + + -- Jeongmo Yang Wed, 08 Jun 2011 18:31:25 +0900 + +avsystem (0.3.46-0) unstable; urgency=low + + * fix sound transition when bt + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.46-0 + + -- Seungbae Shin Thu, 02 Jun 2011 20:15:54 +0900 + +avsystem (0.3.45-0) unstable; urgency=low + + * add bt_to_cp_gain call + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.45-0 + + -- Seungbae Shin Fri, 27 May 2011 11:23:44 +0900 + +avsystem (0.3.44-0) unstable; urgency=low + + * gain fix + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.44-0 + + -- Seungbae Shin Fri, 20 May 2011 16:13:47 +0900 + +avsystem (0.3.43-1) unstable; urgency=low + + * Remove PLATFORM_INIT macro in configure.ac + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.43-1 + + -- Seungbae Shin Thu, 19 May 2011 16:26:24 +0900 + +avsystem (0.3.43-0) unstable; urgency=low + + * open AIF3 when callalert case + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.43-0 + + -- Seungbae Shin Wed, 18 May 2011 11:10:20 +0900 + +avsystem (0.3.42-3) unstable; urgency=low + + * update volume table load from file + * add volume table dump utility + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.42-3 + + -- KwangHui Cho Wed, 13 Apr 2011 11:45:25 +0900 + +avsystem (0.3.42-2) unstable; urgency=low + + * update cp related sound path code + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.42-2 + + -- KwangHui Cho Thu, 07 Apr 2011 16:30:52 +0900 + +avsystem (0.3.42-1) unstable; urgency=low + + * remove unnecessary audio headers from dev package + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.42-1 + + -- KwangHui Cho Tue, 22 Mar 2011 10:59:34 +0900 + +avsystem (0.3.42-0) unstable; urgency=low + + * [camera] Remove deprecated API + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.42-0 + + -- Jeongmo Yang Mon, 21 Mar 2011 14:34:36 +0900 + +avsystem (0.3.41-0) unstable; urgency=low + + * Fix prevent bug + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.41-0 + + -- Wonhyung Cho Mon, 14 Mar 2011 11:06:58 +0900 + +avsystem (0.3.40-1) unstable; urgency=low + + * include avsys-audio-ascenario.h in i386-dev package + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.40-1 + + -- Seungbae Shin Thu, 10 Mar 2011 19:12:48 +0900 + +avsystem (0.3.40-0) unstable; urgency=low + + * Add continuous shot features + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.40-0 + + -- Wonhyung Cho Wed, 09 Mar 2011 18:36:17 +0900 + +avsystem (0.3.39-1) unstable; urgency=low + + * fix path release code + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.39-1 + + -- KwangHui Cho Wed, 23 Feb 2011 16:54:53 +0900 + +avsystem (0.3.39-0) unstable; urgency=low + + * Make a policy to protect conflict dual camera open + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.39-0 + + -- Wonhyung Cho Tue, 22 Feb 2011 17:02:25 +0900 + +avsystem (0.3.38-1) unstable; urgency=low + + * change AIF2 parameter setting from S16_LE to S16_BE + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.38-1 + + -- KwangHui Cho Mon, 21 Feb 2011 17:33:18 +0900 + +avsystem (0.3.38-0) unstable; urgency=low + + * remove signal handler in libavsysaudio.so + * remove amp management code + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.38-0 + + -- KwangHui Cho Wed, 16 Feb 2011 15:53:40 +0900 + +avsystem (0.3.37-2) unstable; urgency=low + + * reduce pulseaudio buffer time for high latency playback + * set umask of sound_initializer only when initial mode + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.37-2 + + -- KwangHui Cho Wed, 09 Feb 2011 09:53:10 +0900 + +avsystem (0.3.37-1) unstable; urgency=low + + * reduce high lantecy playback buffertime + * set umask(0) only when initialize time + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.37-1 + + -- KwangHui Cho Tue, 08 Feb 2011 14:11:16 +0900 + +avsystem (0.3.37-0) unstable; urgency=low + + * set umask(0) when sound_initializer start and set old value when exit + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.37-0 + + -- Seungbae Shin Wed, 02 Feb 2011 13:01:41 +0900 + +avsystem (0.3.36-0) unstable; urgency=low + + * remove unncessary signal handler + * remove unncessary audio handle structure member + * prevent fix + * include cleanup + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.36-0 + + -- KwangHui Cho Tue, 01 Feb 2011 14:28:59 +0900 + +avsystem (0.3.35-0) unstable; urgency=low + + * AIF2, AIF3 control update + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.35-0 + + -- KwangHui Cho Tue, 25 Jan 2011 10:42:42 +0900 + +avsystem (0.3.34-4) unstable; urgency=low + + * remove unused regacy avsys_audio_path_ex_set_amp() function + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.34-4 + + -- KwangHui Cho Fri, 14 Jan 2011 19:01:40 +0900 + +avsystem (0.3.34-3) unstable; urgency=low + + * check return of pa_simple_new_proplist() + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.34-3 + + -- KwangHui Cho Tue, 11 Jan 2011 14:38:24 +0900 + +avsystem (0.3.34-2) unstable; urgency=low + + * don't reset rec path during fmradio + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.34-2 + + -- Jisung Ahn Fri, 07 Jan 2011 19:55:28 +0900 + +avsystem (0.3.34-1) unstable; urgency=low + + * fix version + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.34-1 + + -- Jisung Ahn Thu, 06 Jan 2011 15:37:13 +0900 + +avsystem (0.3.34-0) unstable; urgency=low + + * update changelog + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.34-0 + + -- Jisung Ahn Thu, 06 Jan 2011 15:24:52 +0900 + +avsystem (0.3.33-0) unstable; urgency=low + + * [camera] Do not queue buffer is already queued + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.33-0 + + -- Jeongmo Yang Mon, 03 Jan 2011 19:25:15 +0900 + +avsystem (0.3.32-0) unstable; urgency=low + + * [camera] Add defensive code for JPEG thumbnail + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.32-0 + + -- Jeongmo Yang Mon, 27 Dec 2010 19:29:11 +0900 + +avsystem (0.3.31-1) unstable; urgency=low + + * change method to get default pa sink information + * header update + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.31-1 + + -- KwangHui Cho Mon, 27 Dec 2010 15:37:57 +0900 + +avsystem (0.3.31-0) unstable; urgency=low + + * audio priority update + * playing device information added + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.31-0 + + -- KwangHui Cho Tue, 21 Dec 2010 15:25:59 +0900 + +avsystem (0.3.30-0) unstable; urgency=low + + * [camera] Update code for AF + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.30-0 + + -- Jeongmo Yang Tue, 14 Dec 2010 22:29:31 +0900 + +avsystem (0.3.29-3) unstable; urgency=low + + * update buffer parameter + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.29-3 + + -- Kwanghui Cho Tue, 14 Dec 2010 16:26:16 +0900 + +avsystem (0.3.29-2) unstable; urgency=low + + * volume table bug fix + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.29-2 + + -- Kwanghui Cho Mon, 13 Dec 2010 10:53:44 +0900 + +avsystem (0.3.29-1) unstable; urgency=low + + * add changelog + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.29-1 + + -- Kwanghui Cho Mon, 13 Dec 2010 10:47:45 +0900 + +avsystem (0.3.29-0) unstable; urgency=low + + * Change volume control method + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.29-0 + + -- Kwanghui Cho Mon, 13 Dec 2010 08:44:54 +0900 + +avsystem (0.3.28-5) unstable; urgency=low + + * Fix debian clean error + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.28-5 + + -- Jeongmo Yang Thu, 09 Dec 2010 17:11:10 +0900 + +avsystem (0.3.28-4) unstable; urgency=low + + * Remove device dependent name and code clean up + * Git: 165.213.180.234:slp/pkgs/a/avsystem + * Tag: avsystem_0.3.28-4 + + -- Jeongmo Yang Wed, 08 Dec 2010 21:18:04 +0900 + +avsystem (0.3.27-3) unstable; urgency=low + + * Remove iniparser + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.27-3 + + -- Wonhyung Cho Fri, 03 Dec 2010 17:41:14 +0900 + +avsystem (0.3.27-2) unstable; urgency=low + + * Remove iniparser dependancy from dev package + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.27-2 + + -- Seungbae Shin Wed, 01 Dec 2010 12:37:04 +0900 + +avsystem (0.3.27-1) unstable; urgency=low + + * [audio] update buffer parameter + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.27-1 + + -- KwangHui Cho Fri, 26 Nov 2010 15:40:43 +0900 + +avsystem (0.3.27-0) unstable; urgency=low + + * [audio] priority support + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.27-0 + + -- KwangHui Cho Fri, 26 Nov 2010 09:11:30 +0900 + +avsystem (0.3.26-0) unstable; urgency=low + + * [audio] create audio policy lock + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.26-0 + + -- KwangHui Cho Thu, 25 Nov 2010 17:32:29 +0900 + +avsystem (0.3.25-0) unstable; urgency=low + + * [audio] fixed volume type added + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.25-0 + + -- KwangHui Cho Wed, 24 Nov 2010 13:46:58 +0900 + +avsystem (0.3.24-4) unstable; urgency=low + + * [audio] misc fix + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.24-4 + + -- KwangHui Cho Tue, 23 Nov 2010 14:53:58 +0900 + +avsystem (0.3.24-3) unstable; urgency=low + + * [audio] apply 20msec clock for gstavsysaudiosrc + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.24-3 + + -- KwangHui Cho Sat, 20 Nov 2010 10:24:15 +0900 + +avsystem (0.3.24-2) unstable; urgency=low + + * [audio] check primary volume pid before get current running type + * [common] add -fPIC, -Wl,--hash-style=both + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.24-2 + + -- KwangHui Cho Thu, 18 Nov 2010 15:01:32 +0900 + +avsystem (0.3.24-1) unstable; urgency=low + + * [audio] avsys_audio_path_earjack_wait() function returns warning when earjack auto mode is MANUL + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.24-1 + + -- KwangHui Cho Wed, 17 Nov 2010 11:13:51 +0900 + +avsystem (0.3.24-0) unstable; urgency=low + + * [audio] increase pa stream buffer size + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.24-0 + -- KwangHui Cho Fri, 12 Nov 2010 08:24:20 +0900 + +avsystem (0.3.23-0) unstable; urgency=low + + * [camera] Bug fix - sometimes can not start preview because of state change in AF start function + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.23-0 + + -- Jeongmo Yang Thu, 11 Nov 2010 16:49:25 +0900 + +avsystem (0.3.22-0) unstable; urgency=low + + * [camera] Fix typo in avsys_cam_support_jpeg_encoding + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.22-0 + + -- Jeongmo Yang Tue, 09 Nov 2010 21:24:18 +0900 + +avsystem (0.3.21-0) unstable; urgency=low + + * add avsys_cam_support_jpeg_encoding() + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.21-0 + + -- Wonhyung Cho Mon, 08 Nov 2010 21:38:26 +0900 + +avsystem (0.3.20-0) unstable; urgency=low + + * Add rotation + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.20-0 + + -- Wonhyung Cho Fri, 05 Nov 2010 21:21:35 +0900 + +avsystem (0.3.19-0) unstable; urgency=low + + * [camera] add BSD copyright to videodev2_samsung.h. And small changes + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.19-0 + + -- Wonhyung Cho Fri, 05 Nov 2010 16:29:13 +0900 + +avsystem (0.3.18-1) unstable; urgency=low + + * [audio] semaphore creation mode change from 0600 to 0666 + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.18-1 + + -- KwangHui Cho Thu, 04 Nov 2010 12:11:29 +0900 + +avsystem (0.3.18-0) unstable; urgency=low + + * [audio] move audio_reset, audio_delay, audio_get_period_buffer_time function to avsys_audio.c + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.18-0 + + -- KwangHui Cho Wed, 03 Nov 2010 11:20:08 +0900 + +avsystem (0.3.17-0) unstable; urgency=low + + * [camera] Bug fix - sometimes failed to start preview after capture because of AF stop command + * [debug] Add function name and line number to dlog + * [audio] remove unused + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.17-0 + + -- Jeongmo Yang Mon, 01 Nov 2010 14:54:58 +0900 + +avsystem (0.3.16-1) unstable; urgency=low + + * Modify copyright + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.16-1 + + -- Wonhyung Cho Thu, 28 Oct 2010 17:32:46 +0900 + +avsystem (0.3.16-0) unstable; urgency=low + + * [audio] Java/Android Volume set error fix + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.16-0 + + -- KwangHui Cho Wed, 27 Oct 2010 13:45:14 +0900 + +avsystem (0.3.15-1) unstable; urgency=low + + * [audio] remove condition check before set sound path to dual out + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.15-1 + + -- KwangHui Cho Mon, 25 Oct 2010 12:08:35 +0900 + +avsystem (0.3.15-0) unstable; urgency=low + + * [camera] Update code for touch AF + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.15-0 + + -- Jeongmo Yang Thu, 21 Oct 2010 16:02:56 +0900 + +avsystem (0.3.14-0) unstable; urgency=low + + * [audio] add fadedown mute function + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.14-0 + + -- Kwanghui Cho Thu, 21 Oct 2010 11:29:16 +0900 + +avsystem (0.3.13-0) unstable; urgency=low + + * [camera] Bug fix - I420 RAW image capture + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.13-0 + + -- Jeongmo Yang Mon, 18 Oct 2010 21:36:04 +0900 + +avsystem (0.3.12-2) unstable; urgency=low + + * [audio] AVSYS_AUDIO_MODE_OUTPUT uses mid latency + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.12-2 + + -- Kwanghui Cho Mon, 18 Oct 2010 17:49:18 +0900 + +avsystem (0.3.12-1) unstable; urgency=low + + * [audio] add rc4 script + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.12-1 + + -- Kwanghui Cho Mon, 18 Oct 2010 15:12:55 +0900 + +avsystem (0.3.12-0) unstable; urgency=low + + * [audio] make capture latency mode + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.12-0 + + -- Kwanghui Cho Mon, 18 Oct 2010 11:19:34 +0900 + +avsystem (0.3.11-0) unstable; urgency=low + + * [audio] remove unused resources + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.11-0 + + -- Kwanghui Cho Fri, 15 Oct 2010 20:59:28 +0900 + +avsystem (0.3.10-0) unstable; urgency=low + + * Modify EXIF + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.10-0 + + -- Wonhyung Cho Fri, 15 Oct 2010 19:35:46 +0900 + +avsystem (0.3.9-0) unstable; urgency=low + + * [camera] Fix bug - AF stop before capture start + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.9-0 + + -- Jeongmo Yang Wed, 13 Oct 2010 16:08:17 +0900 + +avsystem (0.3.8-0) unstable; urgency=low + + * [camera] Add get af_status function and remove some unused code + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.8-0 + + -- Jeongmo Yang Wed, 13 Oct 2010 14:54:49 +0900 + +avsystem (0.3.7-0) unstable; urgency=low + + * [camera] Modify JPEG max size + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.7-0 + + -- Jeongmo Yang Mon, 11 Oct 2010 13:41:21 +0900 + +avsystem (0.3.6-0) unstable; urgency=low + + * [camera] Support JPEG thumbnail + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.6-0 + + -- Jeongmo Yang Mon, 11 Oct 2010 12:13:19 +0900 + +avsystem (0.3.5-1) unstable; urgency=low + + * [audio] change abort to errro return when audio handle close failure + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.5-1 + + -- Kwanghui Cho Mon, 11 Oct 2010 10:31:56 +0900 + +avsystem (0.3.5-0) unstable; urgency=low + + * [camera] Support 8M JPEG capture and high speed recording with H2 SDK target + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.5-0 + + -- Jeongmo Yang Fri, 08 Oct 2010 21:52:33 +0900 + +avsystem (0.3.4-0) unstable; urgency=low + + * [camera] Update code for touch AF and exif + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.4-0 + + -- Jeongmo Yang Thu, 07 Oct 2010 20:16:33 +0900 + +avsystem (0.3.3-1) unstable; urgency=low + + * [audio] change value of period & buffer time for gstavsysaudiosink + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.3-1 + + -- Kwanghui Cho Thu, 07 Oct 2010 12:14:37 +0900 + +avsystem (0.3.3-0) unstable; urgency=low + + * [camera] Update code for touch AF and strobe control + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.3-0 + + -- Jeongmo Yang Wed, 06 Oct 2010 17:06:27 +0900 + +avsystem (0.3.2-0) unstable; urgency=low + + * Add Jpeg interleaved capture code(ZSL releated) with disabled featuring + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.2-0 + + -- Wonhyung Cho Wed, 06 Oct 2010 10:30:01 +0900 + +avsystem (0.3.1-3) unstable; urgency=low + + * Fix sound path bug (on earphone plug event during voice call) + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.1-3 + + -- Kwanghui Cho Mon, 04 Oct 2010 08:53:05 +0900 + +avsystem (0.3.1-2) unstable; urgency=low + + * misc cleanup (compile warning) + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.1-2 + + -- Kwanghui Cho Fri, 01 Oct 2010 09:03:32 +0900 + +avsystem (0.3.1-1) unstable; urgency=low + + * Add Ext android/java volume type + * remove volume sync in sound_intializer + * update hibernation reset code (avoid B/S) + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.1-1 + + -- Kwanghui Cho Thu, 30 Sep 2010 13:10:13 +0900 + +avsystem (0.3.1-0) unstable; urgency=low + + * Modify AF init scenario when capture start + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.1-0 + + -- Jeongmo Yang Tue, 28 Sep 2010 15:53:46 +0900 + +avsystem (0.3.0-2) unstable; urgency=low + + * Add primary volume api + * Support dirty volume set + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.0-2 + + -- Kwanghui Cho Mon, 27 Sep 2010 19:12:05 +0900 + +avsystem (0.3.0-1) unstable; urgency=low + + * ext dvice status api added + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.0-1 + + -- Kwanghui Cho Mon, 27 Sep 2010 12:28:17 +0900 + +avsystem (0.3.0-0) unstable; urgency=low + + * Extended Volume feature enable + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.3.0-0 + + -- Kwanghui Cho Fri, 17 Sep 2010 18:50:31 +0900 + +avsystem (0.2.2-4) unstable; urgency=low + + * add current running volume function + * Update avsys_audio_path_ex_reset() function + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.2.2-4 + + -- Kwanghui Cho Wed, 15 Sep 2010 17:23:53 +0900 + +avsystem (0.2.2-3) unstable; urgency=low + + * Use ringtone gain when callalert mode + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.2.2-3 + + -- Kwanghui Cho Mon, 13 Sep 2010 16:10:19 +0900 + +avsystem (0.2.2-2) unstable; urgency=low + + * ignore keypad undetected error for p1 target + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.2.2-2 + + -- Kwanghui Cho Thu, 09 Sep 2010 15:58:23 +0900 + +avsystem (0.2.2-1) unstable; urgency=low + + * add set/get audio route value api + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.2.2-1 + + -- Kwanghui Cho Wed, 08 Sep 2010 11:23:46 +0900 + +avsystem (0.2.2-0) unstable; urgency=low + + * Set appropriate value for metering + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.2.2-0 + + -- Wonhyung Cho Tue, 07 Sep 2010 15:21:41 +0900 + +avsystem (0.2.1-4) unstable; urgency=low + + * Fix bug (keytone does not sound) + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.2.1-4 + + -- KwangHui Cho Mon, 06 Sep 2010 19:48:46 +0900 + +avsystem (0.2.1-3) unstable; urgency=low + + * Cleanup avsysaudio source code + * Add AVSYS_AUDIO_OUTPUT_MODE_VIDEO + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.2.1-3 + + -- KwangHui Cho Mon, 06 Sep 2010 14:35:15 +0900 + +avsystem (0.2.1-2) unstable; urgency=low + + * Fix build error of i386 case + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.2.1-2 + + -- Wonhyung Cho Thu, 02 Sep 2010 20:31:17 +0900 + +avsystem (0.2.1-1) unstable; urgency=low + + * Change filename of h1 source, header + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.2.1-1 + + -- Wonhyung Cho Thu, 02 Sep 2010 19:48:20 +0900 + +avsystem (0.2.1-0) unstable; urgency=low + + * Reorganize avsys-cam related sources + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.2.1-0 + + -- Wonhyung Cho Thu, 02 Sep 2010 19:31:50 +0900 + +avsystem (0.2.0-0) unstable; urgency=low + + * Set PulseAudio as default + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.2.0-0 + + -- Seungbae Shin Thu, 02 Sep 2010 17:42:59 +0900 + +avsystem (0.1.58-1) unstable; urgency=low + + * Change call path call sequence. + * Change location of call device alsa handle (shared memory to local memory) + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.1.58-1 + + -- KwangHui Cho Wed, 01 Sep 2010 19:53:57 +0900 + +avsystem (0.1.58-0) unstable; urgency=low + + * Remove avsysvideosink releated sources + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.1.58-0 + + -- Wonhyung Cho Wed, 01 Sep 2010 15:26:01 +0900 + +avsystem (0.1.57-0) unstable; urgency=low + + * Fix pthread handling + * - Wonhyung Cho + * Logical volume scale + * PASIMPLE support (not enabled yet) + * Revise preprocessor name + * Alsa drain added + * - Seungbae Shin + * Update for Dynamic capabilities + * Remove some warnings in avsys-cam.c + * - Jeongmo Yang + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.1.57-0 + + -- Jeongmo Yang Thu, 19 Aug 2010 19:46:46 +0900 + +avsystem (0.1.56-0) unstable; urgency=low + + * Init lens when AF stop + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.1.56-0 + + -- Wonhyung Cho Wed, 04 Aug 2010 16:26:29 +0900 + +avsystem (0.1.55-0) unstable; urgency=low + + * Improve AF routine + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.1.55-0 + + -- Wonhyung Cho Wed, 04 Aug 2010 14:46:01 +0900 + +avsystem (0.1.54-5) unstable; urgency=low + + * [camera] Bug fix - Change permission of .dev_chk file for security version binary + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.1.54-5 + + -- Jeongmo Yang Mon, 02 Aug 2010 11:07:37 +0900 + +avsystem (0.1.53-5) unstable; urgency=low + + * [DAC] change permission of avsys audio handle/path lock + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.1.53-5 + + -- Seungbae Shin Sat, 31 Jul 2010 10:59:10 +0900 + +avsystem (0.1.53-4) unstable; urgency=low + + * [camera] Change permission of .dev_chk file for security version binary + * Add maintainer + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.1.53-4 + + -- Jeongmo Yang Wed, 28 Jul 2010 22:14:56 +0900 + +avsystem (0.1.52-3) unstable; urgency=low + + * Add alsa dev dependancy on avsystem-dev package (for gst-exetension) + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.1.52-3 + + -- Seungbae Shin Fri, 16 Jul 2010 14:05:33 +0900 + +avsystem (0.1.52-2) unstable; urgency=low + + * Modify dependancy for alsa sdk dev + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.1.52-2 + + -- Seungbae Shin Thu, 15 Jul 2010 19:49:45 +0900 + +avsystem (0.1.52-1) unstable; urgency=low + + * Remove snd_scenario_unset_scn() call + * Git: 165.213.180.234:/git/slp/pkgs/avsystem + * Tag: avsystem_0.1.52-1 + + -- Seungbae Shin Thu, 15 Jul 2010 11:09:11 +0900 + +avsystem (0.1.52-0) unstable; urgency=low + + * Rollback AF + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.52-0 + + -- Wonhyung Cho Tue, 13 Jul 2010 11:21:03 +0900 + +avsystem (0.1.51-18) unstable; urgency=low + + * Fix path blocking on MO/MT call & Enable LOG for i386 + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-18 + + -- Seungbae Shin Mon, 12 Jul 2010 17:16:54 +0900 + +avsystem (0.1.51-17) unstable; urgency=low + + * Change maintainer + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-17 + + -- JongHyuk Choi Wed, 07 Jul 2010 14:17:07 +0900 + +avsystem (0.1.51-16) unstable; urgency=low + + * Update code + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-16 + + -- KwangHui Cho Tue, 29 Jun 2010 15:49:31 +0900 + +avsystem (0.1.51-15) unstable; urgency=low + + * Update sound path + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-15 + + -- KwangHui Cho Fri, 25 Jun 2010 13:47:05 +0900 + +avsystem (0.1.51-14) unstable; urgency=low + + * Query interface changed and added + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-14 + + -- Kum Jun Seung Fri, 25 Jun 2010 11:35:10 +0900 + +avsystem (0.1.51-13) unstable; urgency=low + + * update sound path bug + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-13 + + -- KwangHui Cho Tue, 22 Jun 2010 17:29:14 +0900 + +avsystem (0.1.51-12) unstable; urgency=low + + * update volume table optimize + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-12 + + -- KwangHui Cho Tue, 22 Jun 2010 15:19:46 +0900 + +avsystem (0.1.51-11) unstable; urgency=low + + * Reupload for mm-log update + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-11 + + -- KwangHui Cho Thu, 17 Jun 2010 13:32:07 +0900 + +avsystem (0.1.51-10) unstable; urgency=low + + * reupload + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-10 + + -- KwangHui Cho Wed, 16 Jun 2010 10:45:44 +0900 + +avsystem (0.1.51-9) unstable; urgency=low + + * Reupload for mm-log update + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-9 + + -- KwangHui Cho Wed, 16 Jun 2010 08:30:21 +0900 + +avsystem (0.1.51-8) unstable; urgency=low + + * Reupload for mm-log update + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-8 + + -- Seungbae Shin Tue, 15 Jun 2010 18:55:01 +0900 + +avsystem (0.1.51-7) unstable; urgency=low + + * update sound path code + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-7 + + -- KwangHui Cho Tue, 15 Jun 2010 13:20:28 +0900 + +avsystem (0.1.51-6) unstable; urgency=low + + * apply duplex sound path + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-6 + + -- KwangHui Cho Wed, 09 Jun 2010 09:33:25 +0900 + +avsystem (0.1.51-5) unstable; urgency=low + + * Device name and index also can be quried + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-5 + + -- Kum Jun Seung Mon, 17 May 2010 20:00:06 +0900 + +avsystem (0.1.51-4) unstable; urgency=low + + * Add missing shmat + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-4 + + -- KwangHui Cho Thu, 13 May 2010 19:33:11 +0900 + +avsystem (0.1.51-3) unstable; urgency=low + + * update earjack management routine + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-3 + + -- KwangHui Cho Mon, 10 May 2010 18:40:23 +0900 + +avsystem (0.1.51-2) unstable; urgency=low + + * Error handling of ioctl fixed ( "== -1" deleted ) + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-2 + + -- Kum Jun Seung Mon, 10 May 2010 14:43:43 +0900 + +avsystem (0.1.51-1) unstable; urgency=low + + * update postinst (remove chwon, chmod) + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-1 + + -- KwangHui Mon, 10 May 2010 13:32:22 +0900 + +avsystem (0.1.51-0) unstable; urgency=low + + * Add earjack manager function & update shared memory permission + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.51-0 + + -- KwangHui Thu, 06 May 2010 14:21:56 +0900 + +avsystem (0.1.50-26) unstable; urgency=low + + * link avsys_cam_ctrl_id & query system + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-26 + + -- Kum Jun Seung Thu, 06 May 2010 16:43:39 +0900 + +avsystem (0.1.50-25) unstable; urgency=low + + * Add XB-Public-Package & Replace log,ta package with sdk package + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-25 + + -- Seungbae Shin Mon, 03 May 2010 22:37:30 +0900 + +avsystem (0.1.50-24) unstable; urgency=low + + * make new sdk-dev package which includes .pc & .la files only + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-24 + + -- KwangHui Cho Mon, 03 May 2010 19:09:28 +0900 + +avsystem (0.1.50-23) unstable; urgency=low + + * splite "reset" script by mode + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-23 + + -- KwangHui Cho Thu, 29 Apr 2010 15:55:58 +0900 + +avsystem (0.1.50-22) unstable; urgency=low + + * Directory reordering + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-22 + + -- KwangHui Cho Sun, 25 Apr 2010 08:37:01 +0900 + +avsystem (0.1.50-21) unstable; urgency=low + + * Add external device(fmradio) ampon/off & Fix postinst script + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-21 + + -- KwangHui Cho Sat, 24 Apr 2010 07:04:51 +0900 + +avsystem (0.1.50-20) unstable; urgency=low + + * deprecated dump functions deleted + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-20 + + -- Kum Jun Suung Fri, 23 Apr 2010 16:45:20 +0900 + +avsystem (0.1.50-19) unstable; urgency=low + + * Remove LVVE dependency + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-19 + + -- KwangHui Cho Fri, 23 Apr 2010 07:58:23 +0900 + + +avsystem (0.1.50-18) unstable; urgency=low + + * Simulator build prob fixed + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-18 + + -- Kum Jun Seung Wed, 21 Apr 2010 17:51:04 +0900 + +avsystem (0.1.50-17) unstable; urgency=low + + * remove path argument from querying load/save functions + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-17 + + -- Kum Jun Seung Tue, 20 Apr 2010 14:31:41 +0900 + +avsystem (0.1.50-16) unstable; urgency=low + + * avsystem delete ASYNC_DEV_OPEN feature (enable always) + * query functions enabled + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-16 + + -- Kum Jun Seung Mon, 19 Apr 2010 19:15:13 +0900 + +avsystem (0.1.50-15) unstable; urgency=low + + * Repackage for mm-log update + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-15 + + -- Seungbae Shin Wed, 14 Apr 2010 22:44:59 +0900 + +avsystem (0.1.50-14) unstable; urgency=low + + * Change alsa device name + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-14 + + -- KwangHui Cho Tue, 13 Apr 2010 12:39:25 +0900 + +avsystem (0.1.50-13) unstable; urgency=low + + * Fix tag verification failed + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-13 + + -- YoungHwan Ahn Thu, 08 Apr 2010 21:50:56 +0900 + +avsystem (0.1.50-12) unstable; urgency=low + + * add avsysvideo + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-12 + + -- YoungHwan Ahn Thu, 08 Apr 2010 21:12:52 +0900 + +avsystem (0.1.50-11) unstable; urgency=low + + * add init script + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-11 + + -- KwangHui Cho Thu, 08 Apr 2010 18:48:33 +0900 + +avsystem (0.1.50-10) unstable; urgency=low + + * update AEC integration - change dependecy of nxp solution + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-10 + + -- KwangHui Cho Mon, 05 Apr 2010 19:14:54 +0900 + +avsystem (0.1.50-9) unstable; urgency=low + + * update AEC integration + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/avsystem-0.1 + * Tag: avsystem_0.1.50-9 + + -- KwangHui Cho Mon, 05 Apr 2010 14:43:47 +0900 + +avsystem (0.1.50-8) unstable; urgency=low + + * dos2unix fwupdater/avsys-cam-firmware-v4l2.h + + -- Seungbae shin Mon, 05 Apr 2010 13:49:36 +0900 + +avsystem (0.1.50-7) unstable; urgency=low + + * Update VT BT call sound path + + -- KwangHui Cho Tue, 30 Mar 2010 16:49:59 +0900 + +avsystem (0.1.50-6) unstable; urgency=low + + * Feature added for CE147 module + + -- Kum Jun Seung Fri, 26 Mar 2010 16:12:34 +0900 + +avsystem (0.1.50-5) unstable; urgency=low + + * AF retry count bug fix + + -- Kum Jun Seung Fri, 26 Mar 2010 15:10:57 +0900 + +avsystem (0.1.50-4) unstable; urgency=low + + * There was an missing in previous package + + -- Wonhyung Cho Thu, 25 Mar 2010 14:17:01 +0900 + +avsystem (0.1.50-3) unstable; urgency=low + + * Toolchain Upgrade + + -- Wonhyung Cho Thu, 25 Mar 2010 13:50:20 +0900 + +avsystem (0.1.50-2) unstable; urgency=low + + * Camera Qbuf defensive code(preview Q after capture starting) applied + + -- Kum Jun Seung Wed, 24 Mar 2010 16:40:08 +0900 + +avsystem (0.1.50-1) unstable; urgency=low + + * Change buffer numbers + + -- Wonhyung Cho Mon, 22 Mar 2010 14:51:22 +0900 + +avsystem (0.1.50-0) unstable; urgency=low + + * Add shmat in earjack manager (to avoid remove of shared memory by system fw) + + -- KwangHui Cho Fri, 12 Mar 2010 11:27:59 +0900 + +avsystem (0.1.49-22) unstable; urgency=low + + * Get cmd Bug fix + * jpeg size limit featured + + -- Kum Jun Seung Tue, 09 Mar 2010 10:14:29 +0900 + +avsystem (0.1.49-21) unstable; urgency=low + + * bug fix for crashing when mosaic shot after multishot + + -- Kum Jun Seung Fri, 05 Mar 2010 22:26:47 +0900 + +avsystem (0.1.49-20) unstable; urgency=low + + * Make it skip to set S_PARM depending on the input value + + -- Wonhyung Cho Fri, 05 Mar 2010 20:02:10 +0900 + +avsystem (0.1.49-19) unstable; urgency=low + + * Modify section to main + + -- Kum Jun Seung Fri, 05 Mar 2010 18:18:26 +0900 + +avsystem (0.1.49-18) unstable; urgency=low + + * self shot bug fix(self shot didn't support compress ratio) + + -- Kum Jun Seung Tue, 02 Mar 2010 15:39:12 +0900 + +avsystem (0.1.49-17) unstable; urgency=low + + * AF return value fixed along kernel's guide + + -- Kum Jun Seung Fri, 26 Feb 2010 20:01:22 +0900 + +avsystem (0.1.49-16) unstable; urgency=low + + * facedetection status can be get(temporary solution. it should be solved by kernel) + + -- Kum Jun Seung Fri, 26 Feb 2010 15:37:11 +0900 + +avsystem (0.1.49-15) unstable; urgency=low + + * facedetection/macro/EINVAL/some other issues fixed + + -- Kum Jun Seung Thu, 25 Feb 2010 17:24:20 +0900 + +avsystem (0.1.49-14) unstable; urgency=low + + * fix prevent complaint + + -- root Mon, 22 Feb 2010 15:49:38 +0900 + +avsystem (0.1.49-13) unstable; urgency=low + + * Remove sound priority policy + + -- KwangHui Cho Sat, 20 Feb 2010 06:48:53 +0900 + +avsystem (0.1.49-12) unstable; urgency=low + + * Change videodev2.h, videodev2_samsung.h to the version used in kernel + + -- Wonhyung Cho Fri, 19 Feb 2010 13:45:54 +0900 + +avsystem (0.1.49-11) unstable; urgency=low + + * add gain debug mode + + -- KwangHui Cho Thu, 18 Feb 2010 12:28:44 +0900 + +avsystem (0.1.49-10) unstable; urgency=low + + * Fix 2nd call bug (codec off) + * Prevent Fix + + -- KwangHui Cho Thu, 18 Feb 2010 09:44:20 +0900 + +avsystem (0.1.49-9) unstable; urgency=low + + * jpg compress ratio enabled + * af init enabled + + -- Kum Jun Seung Wed, 17 Feb 2010 15:22:41 +0900 + +avsystem (0.1.49-8) unstable; urgency=low + + * Add "reset" to codec off after FM radio close + + -- KwangHui Cho Fri, 12 Feb 2010 19:45:08 +0900 + +avsystem (0.1.49-7) unstable; urgency=low + + * Skip re-open mic when ap play during voicecall + + -- KwangHui Cho Thu, 11 Feb 2010 19:17:56 +0900 + +avsystem (0.1.49-6) unstable; urgency=low + + * asm/page.h dependency removed + + -- Kum Jun Seung Thu, 11 Feb 2010 14:02:22 +0900 + +avsystem (0.1.49-5) unstable; urgency=low + + * Change initial sound path from spk to none + + -- KwangHui Cho Thu, 11 Feb 2010 12:05:35 +0900 + +avsystem (0.1.49-4) unstable; urgency=low + + * Add "use sub-mic" sound path option + + -- KwangHui Cho Tue, 09 Feb 2010 10:07:43 +0900 + +avsystem (0.1.49-3) unstable; urgency=low + + * Add time measurement code to avsys-cam + + -- Wonhyung Cho Fri, 05 Feb 2010 14:34:25 +0900 + +avsystem (0.1.49-2) unstable; urgency=low + + * Call "codec_disable_on_suspend" scenario when end of FM radio + + -- KwangHui Cho Mon, 08 Feb 2010 10:48:03 +0900 + +avsystem (0.1.49-1) unstable; urgency=low + + * Call "codec_disable_on_suspend" scenario when end of voice call + + -- KwangHui Cho Mon, 08 Feb 2010 09:03:32 +0900 + +avsystem (0.1.49-0) unstable; urgency=low + + * reupload + + -- KwangHui Cho Fri, 05 Feb 2010 12:22:01 +0900 + +avsystem (0.1.48) unstable; urgency=low + + * add new avsys_audio_get_volume_max_ex function which drop in replace of avsys_audio_get_volume_max + + -- KwangHui Cho Thu, 04 Feb 2010 12:03:40 +0900 + +avsystem (0.1.47) unstable; urgency=low + + * effect value changed + + -- Kum Jun Seung Wed, 03 Feb 2010 19:46:32 +0900 + +avsystem (0.1.46) unstable; urgency=low + + * Update Error handling code (shmat) + + -- KwangHui Cho Mon, 01 Feb 2010 19:05:34 +0900 + +avsystem (0.1.45) unstable; urgency=low + + * Add Error handling code in avsys_audio_logical_volume.c file + + -- KwangHui Cho Mon, 01 Feb 2010 18:14:23 +0900 + +avsystem (0.1.44) unstable; urgency=low + + * Fix ctrl cid changed to v4l2_cid_xx + + -- Kum Jun Seung Fri, 29 Jan 2010 21:24:40 +0900 + +avsystem (0.1.43) unstable; urgency=low + + * Replace OUTPUT_VIDEO mode to LOW_LATENCY mode + + -- KwangHui Cho Fri, 29 Jan 2010 08:13:15 +0900 + +avsystem (0.1.42) unstable; urgency=low + + * Fix SN12 preview bug + + -- Wonhyung Cho Tue, 26 Jan 2010 19:39:54 +0900 + +avsystem (0.1.41) unstable; urgency=low + + * changelog update for importing again + + -- Kum Jun Seung Mon, 25 Jan 2010 19:27:12 +0900 + +avsystem (0.1.40) unstable; urgency=low + + * call method changed + * redundant S_INPUT changed + + -- Kum Jun Seung Mon, 25 Jan 2010 19:14:21 +0900 + +avsystem (0.1.39) unstable; urgency=low + + * Change Volume table init. sequence + + -- KwangHui Cho Sat, 23 Jan 2010 08:00:52 +0900 + +avsystem (0.1.38) unstable; urgency=low + + * Add load volume table from file + * Mute/Unmute enabled + * Prevent Fix + + -- KwangHui Cho Fri, 22 Jan 2010 20:41:03 +0900 + +avsystem (0.1.37) unstable; urgency=low + + * Fix RAW capture format to YUYV + + -- Wonhyung Cho Thu, 21 Jan 2010 17:52:19 +0900 + +avsystem (0.1.36) unstable; urgency=low + + * Fix configure.ac (--enable-aquila, --enable-p1 option correctly) + + -- KwangHui Cho Wed, 20 Jan 2010 16:50:41 +0900 + +avsystem (0.1.35) unstable; urgency=low + + * Add ap call support + + -- KwangHui Cho Wed, 20 Jan 2010 10:08:30 +0900 + +avsystem (0.1.34) unstable; urgency=low + + * Integrate FM radio recording gain with FM radio playback gain + + -- KwangHui Cho Tue, 19 Jan 2010 19:19:17 +0900 + +avsystem (0.1.33) unstable; urgency=low + + * add call recording sound path option. + * fix fmradio_to_ap gain setting only when fm radio recording + + -- KwangHui Cho Tue, 19 Jan 2010 11:52:48 +0900 + +avsystem (0.1.32) unstable; urgency=low + + * add workaround sound path fix method for broken hardware + + -- KwangHui Cho Mon, 18 Jan 2010 08:43:06 +0900 + +avsystem (0.1.31) unstable; urgency=low + + * avsystem camera redundant log disabled + + -- Kum Jun Seung Fri, 15 Jan 2010 20:18:53 +0900 + +avsystem (0.1.30) unstable; urgency=low + + * add dbg package + + -- KwangHui Cho Thu, 14 Jan 2010 17:26:43 +0900 + +avsystem (0.1.29) unstable; urgency=low + + * Change VT call sound path use ap duplex + + -- KwangHui Cho Wed, 13 Jan 2010 19:28:53 +0900 + +avsystem (0.1.28) unstable; urgency=low + + * avsys camera memory management routine applied (REQBUF = 0 when it stops capturing) + + -- root Wed, 13 Jan 2010 18:31:39 +0900 + +avsystem (0.1.27) unstable; urgency=low + + * Capture frame available on avsystem camera + + -- root Tue, 12 Jan 2010 15:49:42 +0900 + +avsystem (0.1.26) unstable; urgency=low + + * Fix logical volume update/set table function. (SIGSEG, crash logger) + + -- KwangHui Cho Mon, 11 Jan 2010 12:21:18 +0900 + +avsystem (0.1.25) unstable; urgency=low + + * Enable BT voice call sound path + + -- Wonhyung Fri, 08 Jan 2010 17:32:26 +0900 + +avsystem (0.1.24) unstable; urgency=low + + * Fix configure.ac to apply MMTA to I386 build too. + + -- Wonhyung Tue, 05 Jan 2010 14:37:12 +0900 + +avsystem (0.1.23) unstable; urgency=low + + * Enable mm_ta for time analysis + + -- Wonhyung Wed, 30 Dec 2009 17:52:27 +0900 + +avsystem (0.1.22) unstable; urgency=low + + * Add allow mix bit support + + -- KwangHui Cho Wed, 30 Dec 2009 16:35:23 +0900 + +avsystem (0.1.21) unstable; urgency=low + + * Fix semaphore timeout error when eject earjack + + -- KwangHui Cho Tue, 29 Dec 2009 19:02:47 +0900 + +avsystem (0.1.20) unstable; urgency=low + + * Add swgain utility + + -- KwangHui Cho Mon, 28 Dec 2009 16:49:17 +0900 + +avsystem (0.1.19) unstable; urgency=low + + * Remove amp_state control + + -- KwangHui Cho Mon, 28 Dec 2009 10:33:14 +0900 + +avsystem (0.1.18) unstable; urgency=low + + * Add more log & change init backup outpath from none to spk + + -- KwangHui Cho Mon, 28 Dec 2009 09:39:52 +0900 + +avsystem (0.1.17) unstable; urgency=low + + * bug fix + + -- KwangHui Cho Thu, 24 Dec 2009 16:12:12 +0900 + +avsystem (0.1.16) unstable; urgency=low + + * change audio write on path off from skip to error msg + + -- KwangHui Cho Thu, 24 Dec 2009 15:17:32 +0900 + +avsystem (0.1.15) unstable; urgency=low + + * uncomment avsys_audio_path_ex_amp_all_off + + -- KwangHui Cho Thu, 24 Dec 2009 14:53:12 +0900 + +avsystem (0.1.14) unstable; urgency=low + + * fix voice call path bug & uncomment amp management + + -- KwangHui Cho Thu, 24 Dec 2009 11:29:33 +0900 + +avsystem (0.1.13) unstable; urgency=low + + * apply volume table & priority as separte + + -- KwangHui Cho Wed, 23 Dec 2009 19:33:48 +0900 + +avsystem (0.1.12) unstable; urgency=low + + * update log message + + -- KwangHui Cho Wed, 23 Dec 2009 09:46:02 +0900 + +avsystem (0.1.11) unstable; urgency=low + + * Block Path Mute because of alsa scenario restriction + + -- KwangHui Cho Wed, 23 Dec 2009 07:47:15 +0900 + +avsystem (0.1.10) unstable; urgency=low + + * Add support for sound priority + + -- KwangHui Cho Tue, 22 Dec 2009 16:53:22 +0900 + +avsystem (0.1.9) unstable; urgency=low + + * version up for import fail + + -- KwangHui Cho Mon, 21 Dec 2009 13:47:06 +0900 + +avsystem (0.1.8) unstable; urgency=low + + * fix dependency for i386 + + -- KwangHui Cho Mon, 21 Dec 2009 13:32:15 +0900 + +avsystem (0.1.7) unstable; urgency=low + + * SDK build support + + -- KwangHui Cho Sat, 19 Dec 2009 13:58:18 +0900 + +avsystem (0.1.6) unstable; urgency=low + + * Use alsa-scenario-files new version + + -- KwangHui Cho Thu, 17 Dec 2009 16:18:26 +0900 + +avsystem (0.1.5) unstable; urgency=low + + * Add YUY2 format to avsys-cam + + -- Wonhyung Cho Thu, 17 Dec 2009 10:44:34 +0900 + +avsystem (0.1.4) unstable; urgency=low + + * update alsa-scenario-scn-data dependency + + -- KwangHui Cho Thu, 17 Dec 2009 09:03:39 +0900 + +avsystem (0.1.3) unstable; urgency=low + + * change assert to error return in alsa close function + + -- KwangHui Cho Wed, 16 Dec 2009 10:55:12 +0900 + +avsystem (0.1.2) unstable; urgency=low + + * Add avsys-cam-* + + -- Wonhyung Mon, 14 Dec 2009 20:47:06 +0900 + +avsystem (0.1.1) unstable; urgency=low + + * Change initial sound path value + + -- KwangHui Cho Fri, 11 Dec 2009 09:56:40 +0900 + +avsystem (0.1.0) unstable; urgency=low + + * Initial Release. + + -- KwangHui Cho Thu, 03 Dec 2009 12:09:01 +0900 diff --git a/debian/rules b/debian/rules index 7e1bbe7..5b065ea 100755 --- a/debian/rules +++ b/debian/rules @@ -46,7 +46,7 @@ configure: configure.ac config.status: configure dh_testdir # Add here commands to configure the package. - CFLAGS="$(CFLAGS) -DGST_EXT_TIME_ANALYSIS" LDFLAGS="$(LDFLAGS)" ./configure --prefix=$(PREFIX) $(OPTION) + CFLAGS="$(CFLAGS) -DGST_EXT_TIME_ANALYSIS" LDFLAGS="$(LDFLAGS)" ./configure --prefix=$(PREFIX) $(OPTION) --enable-audiotest build: build-stamp @@ -94,9 +94,9 @@ install: build # Add here commands to install the package into debian/ncurses. $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install mkdir -p $(CURDIR)/debian/tmp/etc/rc.d/rc3.d/ - ln -s ../init.d/snd_init $(CURDIR)/debian/tmp/etc/rc.d/rc3.d/S30snd_init + ln -s ../init.d/snd_init $(CURDIR)/debian/tmp/etc/rc.d/rc3.d/S15snd_init mkdir -p $(CURDIR)/debian/tmp/etc/rc.d/rc4.d/ - ln -s ../init.d/snd_init $(CURDIR)/debian/tmp/etc/rc.d/rc4.d/S30snd_init + ln -s ../init.d/snd_init $(CURDIR)/debian/tmp/etc/rc.d/rc4.d/S15snd_init # Build architecture-independent files here. binary-indep: build install diff --git a/include/avsys-audio-alsa.h b/include/avsys-audio-alsa.h index 1711f84..56a7091 100644 --- a/include/avsys-audio-alsa.h +++ b/include/avsys-audio-alsa.h @@ -32,6 +32,7 @@ enum AIF_device_type_t { AIF2_PLAYBACK, AIF3_CAPTURE, AIF3_PLAYBACK, + AIF4_PLAYBACK, AIF_DEVICE_MAX, }; diff --git a/include/avsys-audio-pasimple.h b/include/avsys-audio-pasimple.h index 06fec34..acd0528 100644 --- a/include/avsys-audio-pasimple.h +++ b/include/avsys-audio-pasimple.h @@ -49,6 +49,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..f6f06f2 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,12 @@ 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 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 +141,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..e5d5252 100644 --- a/include/avsys-audio.h +++ b/include/avsys-audio.h @@ -143,7 +143,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; @@ -224,15 +224,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 */ /** @@ -551,16 +547,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 dev [out] current playback device type + * @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 avsys_audio_playing_devcie_t + * @see + */ +int avsys_audio_cork (avsys_handle_t handle, int cork); + +/** + * This function is to check whether stream is corked or not. + * + * @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 */ -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 +590,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/packaging/avsystem.spec b/packaging/avsystem.spec index abe3f6a..30bf3c0 100644 --- a/packaging/avsystem.spec +++ b/packaging/avsystem.spec @@ -1,7 +1,8 @@ + Name: avsystem Summary: Audio Video System -Version: 0.4.13 -Release: 1 +Version: 0.5.0 +Release: 11 Group: System/Libraries License: Apache-2.0 Source0: avsystem-%{version}.tar.gz @@ -35,31 +36,40 @@ Audio Video System Development headers and libraries. %autogen %configure \ %ifarch %{ix86} - --enable-slp2 --enable-aquila --enable-pasimple + --enable-audiotest --enable-sdk %else - --enable-slp2 --enable-sdk --enable-aquila --enable-pasimple + --enable-audiotest %endif make %{?jobs:-j%jobs} %install +rm -rf %{buildroot} %make_install - %post /sbin/ldconfig -mkdir -p /etc/rc.d/rc3.d/ -ln -s ../init.d/snd_init /etc/rc.d/rc3.d/S30snd_init -mkdir -p /etc/rc.d/rc4.d/ -ln -s ../init.d/snd_init /etc/rc.d/rc4.d/S30snd_init +mkdir -p /etc/rc.d/rc3.d +mkdir -p /etc/rc.d/rc4.d +ln -sf /etc/rc.d/init.d/snd_init /etc/rc.d/rc3.d/S15snd_init +ln -sf /etc/rc.d/init.d/snd_init /etc/rc.d/rc4.d/S15snd_init + +%postun +/sbin/ldconfig %files +%defattr(-,root,root,-) /etc/rc.d/init.d/snd_init -/usr/bin/* -/usr/lib/lib*.so.* +/usr/bin/sound_initializer +/usr/bin/avsys_audio_test +/usr/bin/avsys_volume_dump +/usr/lib/libavsysaudio.so.0 +/usr/lib/libavsysaudio.so.0.0.1 %files devel +/usr/lib/libavsysaudio.so /usr/lib/pkgconfig/*.pc -/usr/lib/*.so -/usr/include/avsystem/*.h - +/usr/include/avsystem/avsys-audio.h +/usr/include/avsystem/avsys-error.h +/usr/include/avsystem/avsys-types.h +/usr/include/avsystem/avsystem.h -- 2.34.1