add appid property back to resource attributes
[profile/ivi/pulseaudio-module-murphy-ivi.git] / murphy / murphy-ivi.lua
index fc3dd50..88eb3d6 100644 (file)
@@ -111,7 +111,8 @@ application_class {
     roles = { music    = {0, "mandatory", "exclusive"},
               video    = {0, "mandatory", "exclusive"},
               test     = {0, "mandatory", "exclusive"},
-              bt_music = no_resource
+              bt_music = no_resource,
+              player   = no_resource
     },
     binaries = { ['t8j6HTRpuz.MediaPlayer'] = "music" }
 }
@@ -134,6 +135,7 @@ audio_resource {
     attributes = {
        role = {"media.role", mdb.string, "music"},
        pid  = {"application.process.id", mdb.string, "<unknown>"},
+       name = {"resource.set.name", mdb.string, "<unknown>"},
        appid = {"resource.set.appid", mdb.string, "<unknown>"}
     }
 }
@@ -170,6 +172,14 @@ mdb.import {
     update = builtin.method.make_volumes
 }
 
+mdb.import {
+    table = "volume_context",
+    columns = {"value"},
+    condition = "id = 1",
+    maxrow = 1,
+    update = builtin.method.change_volume_context
+}
+
 volume_limit {
     name = "speed_adjust",
     type = volume_limit.generic,
@@ -213,7 +223,7 @@ volume_limit {
     type = volume_limit.class,
     limit = -90,
     node_type = { node.player, node.game },
-    calculate = function(self, class, device)
+    calculate = function(self, class, device, mask)
 --      print("*** limit "..self.name.." class:"..class.." stream:"..device.name)
         position = mdb.import.amb_gear_position[1].value
         if (position and position == 128) then