summaryrefslogtreecommitdiffstats
path: root/MOST_UNICENS/hal_most_unicens.c
diff options
context:
space:
mode:
Diffstat (limited to 'MOST_UNICENS/hal_most_unicens.c')
-rw-r--r--MOST_UNICENS/hal_most_unicens.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/MOST_UNICENS/hal_most_unicens.c b/MOST_UNICENS/hal_most_unicens.c
index 12abe29..4bb9b45 100644
--- a/MOST_UNICENS/hal_most_unicens.c
+++ b/MOST_UNICENS/hal_most_unicens.c
@@ -126,9 +126,9 @@ STATIC halVolRampT volRampFallback= {
};
-static int master_volume;
+static int master_volume = 80;
static json_bool master_switch;
-static int pcm_volume[PCM_MAX_CHANNELS];
+static int pcm_volume[PCM_MAX_CHANNELS] = {100,100,100,100,100,100};
static void unicens_apply_card_value(void *closure, struct json_object *j_obj){
@@ -174,7 +174,7 @@ static void unicens_request_card_values_cb(void *closure, int status, struct jso
}
}
-static void unicens_request_card_values(const char* dev_id) {
+static __attribute__((unused)) void unicens_request_card_values(const char* dev_id) {
int err;
json_object *j_query = NULL;
@@ -365,8 +365,14 @@ STATIC int unicens_service_init() {
goto OnErrorExit;
}
+ /* Step 1: Set output volume to pre-defined level */
+ /* in order to avoid muted volume to be persistent after boot. */
+ wrap_volume_master(80);
+ wrap_volume_pcm(pcm_volume, PCM_MAX_CHANNELS/*array size*/);
+
+ /* Step 2: risk to have influence on mixer controls init */
/* request of initial card values */
- unicens_request_card_values(ALSA_DEVICE_ID);
+ /* unicens_request_card_values(ALSA_DEVICE_ID); */
OnErrorExit:
AFB_NOTICE("Initializing HAL-MOST-UNICENS-BINDING done..");