resource-asm: map SLP media classes to Murphy classes.
authorIsmo Puustinen <ismo.puustinen@intel.com>
Wed, 12 Dec 2012 14:47:44 +0000 (16:47 +0200)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 8 Jan 2015 16:37:09 +0000 (18:37 +0200)
src/plugins/plugin-resource-asm.c

index dfaed46..a78a7dd 100644 (file)
@@ -458,13 +458,15 @@ static asm_to_lib_t *process_msg(lib_to_asm_t *msg, asm_data_t *ctx)
                     shared = TRUE;
                     break;
                 case ASM_EVENT_SHARE_MMSOUND:
-                    resource = "sound";
+                    resource = "event";
                     shared = TRUE;
                     break;
                 case ASM_EVENT_SHARE_OPENAL:
+                    resource = "game";
                     shared = TRUE;
                     break;
                 case ASM_EVENT_SHARE_AVSYSTEM:
+                    resource = "event";
                     shared = TRUE;
                     break;
                 case ASM_EVENT_EXCLUSIVE_MMPLAYER:
@@ -476,16 +478,19 @@ static asm_to_lib_t *process_msg(lib_to_asm_t *msg, asm_data_t *ctx)
                     shared = FALSE;
                     break;
                 case ASM_EVENT_EXCLUSIVE_MMSOUND:
-                    resource = "sound";
+                    resource = "event";
                     shared = FALSE;
                     break;
                 case ASM_EVENT_EXCLUSIVE_OPENAL:
+                    resource = "game";
                     shared = FALSE;
                     break;
                 case ASM_EVENT_EXCLUSIVE_AVSYSTEM:
+                    resource = "event";
                     shared = FALSE;
                     break;
                 case ASM_EVENT_NOTIFY:
+                    resource = "event";
                     shared = FALSE;
                     break;
                 case ASM_EVENT_CALL:
@@ -493,9 +498,11 @@ static asm_to_lib_t *process_msg(lib_to_asm_t *msg, asm_data_t *ctx)
                     shared = FALSE;
                     break;
                 case ASM_EVENT_SHARE_FMRADIO:
+                    resource = "radio";
                     shared = TRUE;
                     break;
                 case ASM_EVENT_EXCLUSIVE_FMRADIO:
+                    resource = "radio";
                     shared = FALSE;
                     break;
                 case ASM_EVENT_EARJACK_UNPLUG:
@@ -503,6 +510,7 @@ static asm_to_lib_t *process_msg(lib_to_asm_t *msg, asm_data_t *ctx)
                     shared = TRUE;
                     break;
                 case ASM_EVENT_ALARM:
+                    resource = "alert";
                     shared = FALSE;
                     break;
                 case ASM_EVENT_VIDEOCALL:
@@ -640,9 +648,6 @@ static asm_to_lib_t *process_msg(lib_to_asm_t *msg, asm_data_t *ctx)
                     }
                 }
 
-                /* TODO: free memory and check if the resource set is empty when
-                 * the resource library supports it */
-
                 /* no reply needed! */
                 goto noreply;
 
@@ -748,7 +753,8 @@ static asm_to_lib_t *process_msg(lib_to_asm_t *msg, asm_data_t *ctx)
     return reply;
 
 error:
-    /* TODO: need to write some sort of message back? */
+    /* write some message back to avoid client locking */
+    return reply;
 
 noreply: