summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorVincent Guittot <vincent.guittot@linaro.org>2014-08-01 11:57:33 +0200
committerVincent Guittot <vincent.guittot@linaro.org>2014-09-10 09:41:54 +0200
commit4da08f9546d11ffaea7670284a04a5602f2206e6 (patch)
tree8fb0283e30d1ade71566ed74f9cd3addc264191b /doc
parent5c10f573b2d04e0476ef40003eddd588e29fc033 (diff)
new mp3 use case
Conflicts: doc/examples/mp3.json
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/mp3.json129
1 files changed, 81 insertions, 48 deletions
diff --git a/doc/examples/mp3.json b/doc/examples/mp3.json
index f81a409..231358e 100644
--- a/doc/examples/mp3.json
+++ b/doc/examples/mp3.json
@@ -1,66 +1,99 @@
{
"tasks" : {
- "AudioOut" : {
- "exec" : 5000,
- "period" : 24000,
+ "AudioTick" : {
"priority" : -19,
- "lock_order" : ["r0", "trigA"],
- "resources" : {
- "r0" : { "duration" : 275 },
- "trigA" : { "duration" : 0 },
- }
+ "loop" : -1,
+ "phases" : {
+ "p1" : {
+ "loop" : 1,
+ "lock1" : "trig0_mutex",
+ "signal2" : "trig0",
+ "unlock3" : "trig0_mutex",
+ "timer4" : { "ref" : "tick", "period": 6000 },
+ },
+ "p2" : {
+ "loop" : 4,
+ "timer0" : { "ref" : "tick", "period": 6000 },
+ }
+ }
+ },
+ "AudioOut" : {
+ "priority" : -19,
+ "loop" : -1,
+ "phases" : {
+ "p1" : {
+ "loop" : 1,
+ "run3" : 275,
+ "lock4" : "trig1_mutex",
+ "signal5" : "trig1",
+ "unlock6" : "trig1_mutex",
+ "run7" : 4725,
+ "lock0" : "trig0_mutex",
+ "wait1" : { "ref" : "wait0", "mutex": "trig0_mutex" },
+ "unlock2" : "trig0_mutex",
+ },
+ }
},
"AudioTrack" : {
- "exec" : 300,
- "period" : 24000,
"priority" : -16,
- "sleep" : false,
- "lock_order" : ["waitA", "r0", "trigB"],
- "resources" : {
- "waitA" : { "duration" : 0, "access": ["trigA_mutex"] },
- "r0" : { "duration" : 300 },
- "trigB" : { "duration" : 0 },
- }
+ "loop" : -1,
+ "lock0" : "trig1_mutex",
+ "wait1" : { "ref" : "wait1", "mutex": "trig1_mutex" },
+ "unlock2" : "trig1_mutex",
+ "run3" : 300,
+ "signal4" : "trig2",
},
"mp3.decoder" : {
- "exec" : 1150,
- "period" : 24000,
- "deadline" : 24000,
"priority" : -2,
- "sleep" : false,
- "lock_order" : ["waitB", "r0", "syncC"],
- "resources" : {
- "waitB" : { "duration" : 0, "access": ["trigB_mutex"] },
- "r0" : { "duration" : 1000 },
- "syncC" : { "duration" : 0, "access": ["trigC_mutex"] },
- }
+ "loop" : -1,
+ "lock0" : "trig2_mutex",
+ "wait1" : { "ref" : "wait2", "mutex": "trig2_mutex" },
+ "unlock2" : "trig2_mutex",
+ "run3" : 1000,
+ "lock4" : "trig3_mutex",
+ "signal5" : "trig3",
+ "wait6" : { "ref" : "wait3", "mutex": "trig3_mutex" },
+ "unlock7" : "trig3_mutex",
+ "run8" : 150,
},
"OMXCall" : {
- "exec" : 300,
- "period" : 24000,
- "deadline" : 24000,
"priority" : -2,
- "sleep" : false,
- "lock_order" : ["waitC", "r0", "trigC"],
- "resources" : {
- "waitC" : { "duration" : 0, "access": ["trigC_mutex"] },
- "r0" : { "duration" : 300 },
- "trigC" : { "duration" : 0, "access": ["trigC_mutex"] },
- }
+ "loop" : -1,
+ "phases" : {
+ "p1" : {
+ "lock0" : "trig3_mutex",
+ "wait1" : { "ref" : "wait3", "mutex": "trig3_mutex" },
+ "unlock2" : "trig3_mutex",
+ "run3" : 300,
+ "lock4" : "trig3_mutex",
+ "signal5" : "trig3",
+ "unlock6" : "trig3_mutex",
+ },
+ "p2" : {
+ "lock0" : "trig3_mutex",
+ "wait1" : { "ref" : "wait3", "mutex": "trig3_mutex" },
+ "unlock2" : "trig3_mutex",
+ "run3" : 300,
+ "lock4" : "trig3_mutex",
+ "signal5" : "trig3",
+ "unlock6" : "trig3_mutex",
+ } }
},
},
"resources" : {
- "trigA_mutex" : { "type" : "mutex" },
- "waitA" : { "type" : "wait" },
- "trigA" : { "type" : "signal", "target" : "waitA" },
- "trigB_mutex" : { "type" : "mutex" },
- "waitB" : { "type" : "wait" },
- "trigB" : { "type" : "signal", "target" : "waitB" },
- "trigC_mutex" : { "type" : "mutex" },
- "waitC" : { "type" : "wait" },
- "trigC" : { "type" : "signal", "target" : "waitC" },
- "syncC" : { "type" : "sync", "target" : "waitC" },
- "r0" : { "type" : "run" },
+ "tick" : { "type" : "timer" },
+ "trig0_mutex" : { "type" : "mutex" },
+ "wait0" : { "type" : "wait" },
+ "trig0" : { "type" : "signal", "target" : "wait0" },
+ "trig1_mutex" : { "type" : "mutex" },
+ "wait1" : { "type" : "wait" },
+ "trig1" : { "type" : "signal", "target" : "wait1" },
+ "trig2_mutex" : { "type" : "mutex" },
+ "wait2" : { "type" : "wait" },
+ "trig2" : { "type" : "signal", "target" : "wait2" },
+ "trig3_mutex" : { "type" : "mutex" },
+ "wait3" : { "type" : "wait" },
+ "trig3" : { "type" : "signal", "target" : "wait3" },
},
"global" : {
"default_policy" : "SCHED_OTHER",