#define RADIO_TUNING_VOLUME_TABLE "fmradio:volume_table"
#define RADIO_VOLUME_NUM_MAX 100
+uint32_t g_master_volume_level = 100;
+
static const char *g_volume_vconf[AUDIO_VOLUME_TYPE_MAX] = {
"file/private/sound/volume/system", /* AUDIO_VOLUME_TYPE_SYSTEM */
"file/private/sound/volume/notification", /* AUDIO_VOLUME_TYPE_NOTIFICATION */
AUDIO_RETURN_VAL_IF_FAIL(info, AUDIO_ERR_PARAMETER);
AUDIO_RETURN_VAL_IF_FAIL(level, AUDIO_ERR_PARAMETER);
+ if (!strncmp(info->type, "master", strlen("master"))) {
+ *level = g_master_volume_level;
+ return AUDIO_RET_OK;
+ }
+
/* Get max volume level by device & type */
*level = ah->volume.volume_level_max[__get_volume_idx_by_string_type(info->type)];
AUDIO_RETURN_VAL_IF_FAIL(ah, AUDIO_ERR_PARAMETER);
AUDIO_RETURN_VAL_IF_FAIL(info, AUDIO_ERR_PARAMETER);
+ if (!strncmp(info->type, "master", strlen("master"))) {
+ g_master_volume_level = level;
+ return AUDIO_RET_OK;
+ }
AUDIO_RETURN_VAL_IF_FAIL((ah->volume.volume_level_max[__get_volume_idx_by_string_type(info->type)] >= level), AUDIO_ERR_PARAMETER);
/* Update volume level */