summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungbae Shin <seungbae.shin@samsung.com>2012-08-30 05:57:01 (GMT)
committerSeungbae Shin <seungbae.shin@samsung.com>2012-08-30 05:57:01 (GMT)
commitb0e2139337e2c6ff53779723612f612c7365610b (patch)
tree3c41c5a1e144cfde3ad2800353961087e2e30816
parentf7e73c5c1d69adb89fa67feb75738d81e97794df (diff)
downloadavsystem-2.0alpha.zip
avsystem-2.0alpha.tar.gz
avsystem-2.0alpha.tar.bz2
Merge 1. Support DOCK Audio 2. Fix alarm volume range checksubmit/master/20120920.1510542.0_alpha2.0alpha
-rw-r--r--avsys-audio-ascenario.c4
-rw-r--r--avsys-audio-path.c20
-rw-r--r--avsys-audio.c2
-rw-r--r--include/avsys-audio-ascenario.h3
-rw-r--r--include/avsys-audio.h2
-rw-r--r--packaging/avsystem.spec2
6 files changed, 22 insertions, 11 deletions
diff --git a/avsys-audio-ascenario.c b/avsys-audio-ascenario.c
index 8e691df..cb5a2ac 100644
--- a/avsys-audio-ascenario.c
+++ b/avsys-audio-ascenario.c
@@ -98,7 +98,9 @@ static int __avsys_audio_ascn_make_scenario_str(int input, char *buf, int buf_le
if (input & OUTPUT_AP) {
strncpy(toStr, "ap", sizeof(toStr) - 1);
}
-
+ if (input & OUTPUT_DOCK) {
+ strncpy(toStr, "dock", sizeof(toStr) - 1);
+ }
if (input & GAIN_MODE) {
strncpy(optStr, "_gain", sizeof(optStr) - 1);
}
diff --git a/avsys-audio-path.c b/avsys-audio-path.c
index 6692c63..f82dbf6 100644
--- a/avsys-audio-path.c
+++ b/avsys-audio-path.c
@@ -50,24 +50,24 @@
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 */
- 0, 1, 0, 1, 0, 0, 0, 0
+ /* NONE SPK RECV HEADSET BTHEADSET A2DP HANDSFREE HDMI DOCK USBAUDIO */
+ 0, 1, 0, 1, 0, 0, 0, 0, 1, 0
},
{ /* AVSYS_AUDIO_PLAYBACK_GAIN_FMRADIO */
/* NONE SPK RECV HEADSET BTHEADSET A2DP HANDSFREE HDMI */
- 1, 1, 0, 1, 0, 1, 0, 0
+ 1, 1, 0, 1, 0, 1, 0, 0, 0, 0
},
{ /* AVSYS_AUDIO_PLAYBACK_GAIN_VOICECALL */
/* NONE SPK RECV HEADSET BTHEADSET A2DP HANDSFREE HDMI */
- 1, 1, 1, 1, 1, 0, 0, 0
+ 1, 1, 1, 1, 1, 0, 0, 0, 0, 0
},
{ /* AVSYS_AUDIO_PLAYBACK_GAIN_VIDEOCALL */
/* NONE SPK RECV HEADSET BTHEADSET A2DP HANDSFREE HDMI */
- 1, 1, 1, 1, 1, 0, 0, 0
+ 1, 1, 1, 1, 1, 0, 0, 0, 0, 0
},
{ /* AVSYS_AUDIO_PLAYBACK_GAIN_CALLALERT */
/* NONE SPK RECV HEADSET BTHEADSET A2DP HANDSFREE HDMI */
- 0, 1, 1, 1, 1, 0, 0, 0
+ 0, 1, 1, 1, 1, 0, 0, 0, 0, 0
}
};
@@ -502,7 +502,7 @@ int avsys_audio_path_ex_dump(void)
const static char *str_yn[] = { "NO", "YES" };
const static char *str_ear[] = { "MANUAL", "AUTO_MUTE", "AUTO_NOMUTE" };
const static char *str_out[AVSYS_AUDIO_PATH_EX_OUTMAX] = {
- "NONE", "SPK", "RECV", "HEADSET", "BTHEADSET", "A2DP", "HANSFREE"
+ "NONE", "SPK", "RECV", "HEADSET", "BTHEADSET", "A2DP", "HANSFREE", "HDMI", "DOCK", "USBAUDIO"
};
const static char *str_in[AVSYS_AUDIO_PATH_EX_INMAX] = {
"NONE", "MIC", "HEADMIC", "BTMIC", "FMINPUT", "HANSFREEMIC"
@@ -1531,6 +1531,12 @@ static int __avsys_audio_path_set_ascn_ap_playback(avsys_audio_path_ex_info_t *c
control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK;
break;
+ case AVSYS_AUDIO_PATH_EX_DOCK:
+ control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_SPK;
+ cmd_gain[0] = INPUT_AP | OUTPUT_DOCK | GAIN_MODE;
+ cmd_path[0] = INPUT_AP | OUTPUT_DOCK;
+ break;
+
case AVSYS_AUDIO_PATH_EX_BTHEADSET:
control->lvol_dev_type = AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET;
cmd_gain[0] = INPUT_AP | OUTPUT_BT_HEADSET | GAIN_MODE;
diff --git a/avsys-audio.c b/avsys-audio.c
index 083190a..31cc0a9 100644
--- a/avsys-audio.c
+++ b/avsys-audio.c
@@ -755,12 +755,12 @@ static inline int __avsys_audio_validate_volume(const int type, const int value)
if (value < 0)
return -1;
switch (type) {
- case AVSYS_AUDIO_VOLUME_TYPE_ALARM:
case AVSYS_AUDIO_VOLUME_TYPE_CALL:
if (value >= LVOLUME_MAX_BASIC) {
return -1;
}
break;
+ case AVSYS_AUDIO_VOLUME_TYPE_ALARM:
case AVSYS_AUDIO_VOLUME_TYPE_RINGTONE:
case AVSYS_AUDIO_VOLUME_TYPE_NOTIFICATION:
case AVSYS_AUDIO_VOLUME_TYPE_SYSTEM:
diff --git a/include/avsys-audio-ascenario.h b/include/avsys-audio-ascenario.h
index a5f8c24..4e5dc1d 100644
--- a/include/avsys-audio-ascenario.h
+++ b/include/avsys-audio-ascenario.h
@@ -63,7 +63,7 @@ typedef enum {
#define OUTPUT_CH_9 ((1 << (9 + OUT))) /* Video call gain */
#define OUTPUT_CH_10 ((1 << (10 + OUT))) /* Video call gain */
#define OUTPUT_CH_11 ((1 << (11 + OUT))) /* Reserved */
-#define OUTPUT_CH_12 ((1 << (12 + OUT))) /* Reserved */
+#define OUTPUT_CH_12 ((1 << (12 + OUT))) /* Dock */
#define OUTPUT_CH_13 ((1 << (13 + OUT))) /* Call alert Gain */
#define INPUT_MAIN_MIC (INPUT_CH_0)
@@ -83,6 +83,7 @@ typedef enum {
#define OUTPUT_BT_HEADSET (OUTPUT_CH_5)
#define OUTPUT_CP (OUTPUT_CH_6)
#define OUTPUT_AP (OUTPUT_CH_7)
+#define OUTPUT_DOCK (OUTPUT_CH_12)
#define GAIN_MODE (OUTPUT_CH_8)
#define GAIN_VIDEO_CALL (OUTPUT_CH_9)
diff --git a/include/avsys-audio.h b/include/avsys-audio.h
index e5d5252..8fd6ea5 100644
--- a/include/avsys-audio.h
+++ b/include/avsys-audio.h
@@ -169,6 +169,8 @@ enum avsys_audio_path_ex {
AVSYS_AUDIO_PATH_EX_A2DP,
AVSYS_AUDIO_PATH_EX_HANDSFREE,
AVSYS_AUDIO_PATH_EX_HDMI,
+ AVSYS_AUDIO_PATH_EX_DOCK,
+ AVSYS_AUDIO_PATH_EX_USBAUDIO,
AVSYS_AUDIO_PATH_EX_OUTMAX,
AVSYS_AUDIO_PATH_EX_MIC = 1,
AVSYS_AUDIO_PATH_EX_HEADSETMIC,
diff --git a/packaging/avsystem.spec b/packaging/avsystem.spec
index 30bf3c0..115dd72 100644
--- a/packaging/avsystem.spec
+++ b/packaging/avsystem.spec
@@ -2,7 +2,7 @@
Name: avsystem
Summary: Audio Video System
Version: 0.5.0
-Release: 11
+Release: 13
Group: System/Libraries
License: Apache-2.0
Source0: avsystem-%{version}.tar.gz