summaryrefslogtreecommitdiffstats
path: root/htdocs
diff options
context:
space:
mode:
authorTai Vuong <tvuong@audiokinetic.com>2017-09-12 16:33:39 -0400
committerTai Vuong <tvuong@audiokinetic.com>2017-09-12 16:33:39 -0400
commitd69dc9732886074e9f400961b500e70d5c8305d7 (patch)
treeec5d4bb353814d442e3e4d84430a5343fee7b0c8 /htdocs
parent9098015429bcc87a7b624ade16732848a9d90f67 (diff)
Pre-AudioWorkshop Demo
Diffstat (limited to 'htdocs')
-rw-r--r--htdocs/CMakeLists.txt14
-rw-r--r--htdocs/alsa-core.html52
-rw-r--r--htdocs/audiohl-demo.html47
-rw-r--r--htdocs/audiohl.html135
-rw-r--r--htdocs/index.html3
5 files changed, 193 insertions, 58 deletions
diff --git a/htdocs/CMakeLists.txt b/htdocs/CMakeLists.txt
index e85ca3c..2e51461 100644
--- a/htdocs/CMakeLists.txt
+++ b/htdocs/CMakeLists.txt
@@ -25,18 +25,8 @@ PROJECT_TARGET_ADD(htdocs)
file(GLOB SOURCE_FILES "*.html" "*.js" "*.jpg" "*.css")
- add_custom_target(${TARGET_NAME}
- DEPENDS ${PROJECT_PKG_BUILD_DIR}/${TARGET_NAME}
- )
-
- add_custom_command(
- DEPENDS ${SOURCE_FILES}
- OUTPUT ${PROJECT_PKG_BUILD_DIR}/${TARGET_NAME}
- COMMAND mkdir -p ${PROJECT_PKG_BUILD_DIR}/${TARGET_NAME}
- COMMAND touch ${PROJECT_PKG_BUILD_DIR}/${TARGET_NAME}
- COMMAND cp -r ${SOURCE_FILES} ${PROJECT_PKG_BUILD_DIR}/${TARGET_NAME}
- )
-
+ add_input_files("${SOURCE_FILES}")
+
SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
LABELS "HTDOCS"
OUTPUT_NAME ${TARGET_NAME}
diff --git a/htdocs/alsa-core.html b/htdocs/alsa-core.html
index e946bdb..deca631 100644
--- a/htdocs/alsa-core.html
+++ b/htdocs/alsa-core.html
@@ -2,23 +2,25 @@
<head>
<link rel="stylesheet" href="AudioBinding.css">
<title>Alsa Low Level Simple Test</title>
-
+
<script type="text/javascript" src="AFB-websock.js"></script>
<script type="text/javascript" src="AudioBinding.js"></script>
</head>
-
-<body onload="init('alsa_registry','alsacore', 'getinfo')">
-
- <button id="connected" onclick="init('alsa_registry','alsacore', 'getinfo');">Binder WS Fail</button>
+
+<body onload="init('alsa_registry','alsacore', 'infoget')">
+
+ <button id="connected" onclick="init('alsa_registry','alsacore', 'infoget');">Binder WS Fail</button>
+ <button id="mnitoring" onclick="window.open('/monitoring/monitor.html','_monitor_audio')">Debug/Monitoring</a></button>
+
<br><br>
<b>Selected SndCard </b>
<select id='alsa_registry'></select>
<b>Select NUMID </b>
- <select id='alsa_ctl_list' onclick="refresh_list(this, 'alsacore', 'getctl', {devid:sndcard, mode:1})">
+ <select id='alsa_ctl_list' onclick="refresh_list(this, 'alsacore', 'ctlget', {devid:sndcard, mode:1})">
<option value='-1'>Refresh NUMID list</option>
- </select>
-
+ </select>
+
<b>API Verbosity </b>
<select id='api_verbosity' onclick='mode=this.value'>
<option value='0'>Quiet</option>
@@ -26,37 +28,39 @@
<option value='2'>Verbose</option>
<option value='3'>Full</option>
</select>
-
+
<br>
<ol>
- <li><button onclick="callbinder('alsacore','getctl', {devid:sndcard, mode:mode})">Get all Alsa Ctls</button></li>
- <li><button onclick="callbinder('alsacore','getctl', {devid:sndcard, mode:mode, ctl:[numid]})">Get Alsa Ctls [numid]</button></li>
- <li><button onclick="callbinder('alsacore','getctl', {devid:sndcard, mode:mode, ctl:[numid,numid+1]})">Get Alsa Ctls [numid,numid+1]</button></li>
+ <li><button onclick="callbinder('alsacore','ctlget', {devid:sndcard, mode:mode})">Get all Alsa Ctls</button></li>
+ <li><button onclick="callbinder('alsacore','ctlget', {devid:sndcard, mode:mode, ctl:numid})">Get Alsa Ctls [numid]</button></li>
+ <li><button onclick="callbinder('alsacore','ctlget', {devid:sndcard, mode:mode, ctl:[numid,numid+1]})">Get Alsa Ctls [numid,numid+1]</button></li>
+ <li><button onclick="callbinder('alsacore','infoget', {})">Get info</button></li>
+ <li><button onclick="callbinder('alsacore','hallist', {})">HAL list</button></li>
+ <br>
+
+
+ <li><button onclick="callbinder('alsacore','ctlset', {devid:sndcard, mode:mode, ctl:[[9,20]]})">Set Alsa Ctl ctl:[[9,20]]</button></li>
+ <li><button onclick="callbinder('alsacore','ctlset', {devid:sndcard, mode:mode, ctl:[{id:46,val:50}]})">Set Alsa Ctl ctl:[{id:46,val:50}]}</button></li>
+ <li><button onclick="callbinder('alsacore','ctlset', {devid:sndcard, mode:mode, ctl:[[6,[20,20]]]})">Set Alsa Ctl ctl:[[6,[20,20]]]</button></li>
+ <li><button onclick="callbinder('alsacore','ctlset', {devid:sndcard, mode:mode, ctl:[{id:6,val:[50,50]}]})">Set Alsa Ctl ctl:[{id:2,val:[50,50]}]</button></li>
+ <li><button onclick="callbinder('alsacore','ctlset', {devid:sndcard, mode:mode, ctl:[{id:6,val:[50,50]}, {id:9,val:50,50}]})">Set Alsa Ctl ctl:[{id:6,val:[50,50]}, {id:9,val:50,50}]</button></li>
<br>
-
-
- <li><button onclick="callbinder('alsacore','setctl', {devid:sndcard, mode:mode, ctl:[[9,20]]})">Set Alsa Ctl ctl:[[9,20]]</button></li>
- <li><button onclick="callbinder('alsacore','setctl', {devid:sndcard, mode:mode, ctl:[{id:9,val:50}]})">Set Alsa Ctl ctl:[{id:9,val:50}]}</button></li>
- <li><button onclick="callbinder('alsacore','setctl', {devid:sndcard, mode:mode, ctl:[[6,[20,20]]]})">Set Alsa Ctl ctl:[[6,[20,20]]]</button></li>
- <li><button onclick="callbinder('alsacore','setctl', {devid:sndcard, mode:mode, ctl:[{id:6,val:[50,50]}]})">Set Alsa Ctl ctl:[{id:2,val:[50,50]}]</button></li>
- <li><button onclick="callbinder('alsacore','setctl', {devid:sndcard, mode:mode, ctl:[{id:6,val:[50,50]}, {id:9,val:50,50}]})">Set Alsa Ctl ctl:[{id:6,val:[50,50]}, {id:9,val:50,50}]</button></li>
- <br>
<li><button onclick="callbinder('alsacore','ucmquery', {devid:sndcard, mode:mode})">List UCM verbs</button></li>
<li><button onclick="callbinder('alsacore','ucmset' , {devid:sndcard, mode:mode, verb:'HiFi'})">Set UCM HiFi</button></li>
<li><button onclick="callbinder('alsacore','ucmset' , {devid:sndcard, mode:mode, verb:'HiFi', dev:'Headphone'})">Set UCM HiFi+Headphone</button></li>
<li><button onclick="callbinder('alsacore','ucmset' , {devid:sndcard, mode:mode, verb:'HiFi', dev:'Headphone', mod:'RecordMedia'})">Set UCM HiFi+Headphone+RecordMedia</button></li>
- <br>
+ <br>
<li><button onclick="callbinder('alsacore','ucmget' , {devid:sndcard, mode:mode, values:['OutputDspName','PlaybackPCM','CapturePCM']})">Get UCM OutputDspName+PlaybackPCM+CapturePCM (SET UCM)</button></li>
- <br>
+ <br>
<li><button onclick="callbinder('alsacore','subscribe', {devid:sndcard})">Subscribe AlsaCtl Events</button></li>
<br>
</ol>
-
+
<div id="main" style="visibility:hidden">
<ol>
<li>Question <pre id="question"></pre>
<li>Response <pre id="output"></pre>
<li>Events: <pre id="outevt"></pre>
</ol>
- </div>
+ </div>
diff --git a/htdocs/audiohl-demo.html b/htdocs/audiohl-demo.html
new file mode 100644
index 0000000..e222707
--- /dev/null
+++ b/htdocs/audiohl-demo.html
@@ -0,0 +1,47 @@
+<html>
+<head>
+ <link rel="stylesheet" href="AudioBinding.css">
+ <title>Audio High Level Test</title>
+
+ <script type="text/javascript" src="AFB-websock.js"></script>
+ <script type="text/javascript" src="AudioBinding.js"></script>
+</head>
+
+<body onload="init('audiohl')">
+
+ <button id="connected" onclick="init('audiohl');">Binder WS Fail</button>
+
+ <li>Use Case 1: Automatic EndPoint Selection</li>
+ <br>
+ <ol>
+ <li><button onclick="callbinder('audiohl','stream_open', {audio_role:4,endpoint_type:1})">stream_open('Entertainment','Sink')</button></li>
+ <li><button onclick="callbinder('audiohl','set_endpoint_volume', {endpoint_type:1,endpoint_id:2,volume:'10+'})">set_endpoint_volume('Sink',2,'10+')</button></li>
+ <li><button onclick="callbinder('audiohl','stream_close', {stream_id:1})">stream_close(streamID)</button></li>
+ <br>
+ </ol>
+
+ <li>Use Case 2: User Select EndPoint</li>
+ <br>
+ <ol>
+ <li><button onclick="callbinder('audiohl','get_sinks', {audio_role:4})">get_sinks('Entertainment')</button></li>
+ <li><button onclick="callbinder('audiohl','stream_open', {audio_role:4,endpoint_type:1,endpoint_id:10})">stream_open('Entertainment','Sink',sinkID)</button></li>
+ <li><button onclick="callbinder('audiohl','post_sound_event', {event_name:'PlaySound',media_name:'HomeButton.wav'})">post_sound_event('PlaySound','HomeButton.wav')</button></li>
+ <li><button onclick="callbinder('audiohl','stream_close', {stream_id:1})">stream_close(streamID)</button></li>
+ <br>
+ </ol>
+
+ <li>Use Case 3: Select Routing</li>
+ <br>
+ <ol>
+ <li><button onclick="callbinder('audiohl','get_available_routings', {audio_role:4})">get_available_routings('Entertainment')</button></li>
+ <li><button onclick="callbinder('audiohl','add_routing', {audio_role:4,routing_id:2})">add_routing('Entertainment',routingID)</button></li>
+ <br>
+ </ol>
+
+ <div id="main" style="visibility:hidden">
+ <ol>
+ <li>Question <pre id="question"></pre>
+ <li>Response <pre id="output"></pre>
+ <li>Events: <pre id="outevt"></pre>
+ </ol>
+ </div>
diff --git a/htdocs/audiohl.html b/htdocs/audiohl.html
index 7cca6d8..31a28fe 100644
--- a/htdocs/audiohl.html
+++ b/htdocs/audiohl.html
@@ -11,31 +11,124 @@
<button id="connected" onclick="init('audiohl');">Binder WS Fail</button>
+ <b>Audio Role</b>
+ <select select_id='audiorole_list' onclick='ar=this.value'>
+ <option selected value=''>Select...</option>
+ <option value='warning' >Warning</option>
+ <option value='guidance'>Guidance</option>
+ <option value='notification'>Notification</option>
+ <option value='communication'>Communication</option>
+ <option value='entertainment'>Entertainment</option>
+ <option value='system'>System</option>
+ <option value='startup'>Startup</option>
+ <option value='shutdown'>Shutdown</option>
+ </select>
+ <b>Endpoint Type</b>
+ <select select_id='endpoint_type_list' onclick='ep_type=this.selectedIndex'>
+ <option value=0>Source</option>
+ <option value=1>Sink</option>
+ <option selected value=''>Select...</option>
+ </select>
+ <b>Endpoint ID</b>
+ <select select_id='endpoint_id_list' onclick='ep_id=this.selectedIndex'>
+ <option value='0'>0</option>
+ <option value='1'>1</option>
+ <option value='2'>2</option>
+ <option value='3'>3</option>
+ <option value='4'>4</option>
+ <option value='5'>5</option>
+ <option value='6'>6</option>
+ <option value='7'>7</option>
+ <option value='8'>8</option>
+ <option value='9'>9</option>
+ <option value='10'>10</option>
+ <option value='11'>11</option>
+ <option value='12'>12</option>
+ <option value='13'>13</option>
+ <option value='14'>14</option>
+ <option value='15'>15</option>
+ <option value='16'>16</option>
+ <option value='17'>17</option>
+ <option value='18'>18</option>
+ <option value='19'>19</option>
+ <option selected value=''>Select...</option>
+ </select>
+ <b>Stream ID</b>
+ <select select_id='stream_id_list' onclick='s_id=this.selectedIndex'>
+ <option value='0'>0</option>
+ <option value='1'>1</option>
+ <option value='2'>2</option>
+ <option value='3'>3</option>
+ <option value='4'>4</option>
+ <option value='5'>5</option>
+ <option value='6'>6</option>
+ <option value='7'>7</option>
+ <option value='8'>8</option>
+ <option value='9'>9</option>
+ <option value='10'>10</option>
+ <option value='11'>11</option>
+ <option value='12'>12</option>
+ <option value='13'>13</option>
+ <option value='14'>14</option>
+ <option value='15'>15</option>
+ <option value='16'>16</option>
+ <option value='17'>17</option>
+ <option value='18'>18</option>
+ <option value='19'>19</option>
+ <option selected value=''>Select...</option>
+ </select>
+ <b>Property</b>
+ <select select_id='property_name_list' onclick='p_name=this.value'>
+ <option value='balance'>Balance</option>
+ <option value='fade'>Fade</option>
+ <option value='eq_low'>EQ Low</option>
+ <option value='eq_mid'>EQ Mid</option>
+ <option value='eq_high'>EQ High</option>
+ <option selected value=''>Select...</option>
+ </select>
+
+ <b>State Name</b>
+ <select select_id='state_name_list' onclick='st_name=this.value'>
+ <option value='mute'>Mute</option>
+ <option value='active'>Active</option>
+ <option selected value=''>Select...</option>
+ </select>
+
+ <b>State Value</b>
+ <select select_id='state_value_list' onclick='st_val=this.value'>
+ <option value='on'>On</option>
+ <option value='off'>Off</option>
+ <option selected value=''>Select...</option>
+ </select>
+ <b>Volume Value</b>
+ <select select_id='value_list' onclick='val=this.value'>
+ <option value='0'>0</option>
+ <option value='20'>20</option>
+ <option value='40'>40</option>
+ <option value='60'>60</option>
+ <option value='80'>80</option>
+ <option value='100'>100</option>
+ <option selected value=''>Select...</option>
+ </select>
+
<br>
<ol>
- <li><button onclick="callbinder('audiohl','get_sources', {})">get_sources {}</button></li>
- <li><button onclick="callbinder('audiohl','get_sources', {audio_role:4})">get_sources('Entertainment')</button></li>
- <li><button onclick="callbinder('audiohl','get_sinks', {})">get_sinks</button></li>
- <li><button onclick="callbinder('audiohl','get_sinks', {audio_role:4})">get_sinks('Entertainment')</button></li>
- <li><button onclick="callbinder('audiohl','stream_open', {audio_role:4,endpoint_type:1})">stream_open('Entertainment','Sink')</button></li>
- <li><button onclick="callbinder('audiohl','stream_open', {audio_role:4,endpoint_type:1,endpoint_id:0})">stream_open('Entertainment','Sink',sinkID)</button></li>
- <li><button onclick="callbinder('audiohl','stream_close', {stream_id:3})">stream_close(streamID)</button></li>
- <li><button onclick="callbinder('audiohl','get_available_routings', {})">get_available_routings</button></li>
- <li><button onclick="callbinder('audiohl','get_available_routings', {audio_role:4})">get_available_routings('Entertainment')</button></li>
- <li><button onclick="callbinder('audiohl','add_routing', {audio_role:4})">add_routing('Entertainment')</button></li>
- <li><button onclick="callbinder('audiohl','add_routing', {audio_role:4,routing_id:2})">add_routing('Entertainment',routingID)</button></li>
- <li><button onclick="callbinder('audiohl','remove_routing', {routing_id:3})">remove_routing(routingID)</button></li>
- <li><button onclick="callbinder('audiohl','set_endpoint_volume', {endpoint_type:1,endpoint_id:1,volume:'10+'})">set_endpoint_volume('Sink',sinkID,'10+')</button></li>
- <li><button onclick="callbinder('audiohl','set_endpoint_volume', {endpoint_type:1,endpoint_id:1,volume:'50%',ramp_time_ms:50})">set_endpoint_volume('Sink',sinkID,'50+',50)</button></li>
- <li><button onclick="callbinder('audiohl','get_endpoint_volume', {endpoint_type:1,endpoint_id:1})">get_endpoint_volume('Sink',sinkID)</button></li>
- <li><button onclick="callbinder('audiohl','set_endpoint_property', {endpoint_type:1,endpoint_id:1,property_name:'balance',value:'75'})">set_endpoint_property('Sink',sinkID,'balance','75')</button></li>
- <li><button onclick="callbinder('audiohl','set_endpoint_property', {endpoint_type:1,endpoint_id:1,property_name:'balance',value:'75',ramp_time_ms:100})">set_endpoint_property('Sink',sinkID,'balance','75',100)</button></li>
- <li><button onclick="callbinder('audiohl','get_endpoint_property', {endpoint_type:1,endpoint_id:1,property_name:'balance'})">get_endpoint_property('Sink',sinkID,'balance')</button></li>
- <li><button onclick="callbinder('audiohl','set_endpoint_state', {endpoint_type:1,endpoint_id:1,state_name:'mute',state_value:'true'})">set_endpoint_state('Sink',sinkID,'mute','true')</button></li>
- <li><button onclick="callbinder('audiohl','get_endpoint_state', {endpoint_type:1,endpoint_id:1,state_name:'suspended'})">get_endpoint_state('Sink',sinkID,'suspended')</button></li>
- <li><button onclick="callbinder('audiohl','post_sound_event', {event_name:'PlaySound',media_name:'HomeButton.wav'})">post_sound_event('PlaySound','HomeButton.wav')</button></li>
+ <li><button onclick="callbinder('audiohl','get_sources', {audio_role:ar})">get_sources(audio_role)</button></li>
+ <li><button onclick="callbinder('audiohl','get_sinks', {audio_role:ar})">get_sinks(audio_role)</button></li>
+ <li><button onclick="callbinder('audiohl','stream_open', {audio_role:ar,endpoint_type:ep_type})">stream_open(audio_role,endpoint_type)</button></li>
+ <li><button onclick="callbinder('audiohl','stream_open', {audio_role:ar,endpoint_type:ep_type,endpoint_id:ep_id})">stream_open(audio_role,enpoint_type,endpoint_id)</button></li>
+ <li><button onclick="callbinder('audiohl','stream_close', {stream_id:s_id})">stream_close(stream_id)</button></li>
+ <li><button onclick="callbinder('audiohl','set_volume', {endpoint_type:ep_type,endpoint_id:ep_id,volume:val})">set_volume(endpoint_type,endpoint_id,value)</button></li>
+ <li><button onclick="callbinder('audiohl','get_volume', {endpoint_type:ep_type,endpoint_id:ep_id})">get_volume(endpoint_type,endpoint_id)</button></li>
+ <li><button onclick="callbinder('audiohl','set_property', {endpoint_type:ep_type,endpoint_id:ep_id,property_name:p_name,value:val})">set_property(endpoint_type,endpoint_id,property,value)</button></li>
+ <li><button onclick="callbinder('audiohl','get_property', {endpoint_type:ep_type,endpoint_id:ep_id,property_name:'balance'})">get_property(endpoint_type,endpoint_id,'balance')</button></li>
+ <li><button onclick="callbinder('audiohl','set_state', {endpoint_type:ep_type,endpoint_id:ep_id,state_name:st_name,state_value:st_val})">set_state(endpoint_type,endpoint_id,stateName,stateVal)</button></li>
+ <li><button onclick="callbinder('audiohl','get_state', {endpoint_type:ep_type,endpoint_id:ep_id,state_name:st_name})">get_state(endpoint_type,endpoint_id,stateName)</button></li>
+ <li><button onclick="callbinder('audiohl','post_sound_event', {event_name:'PlaySound',audio_role:'notification',media_name:'HomeButton.wav'})">post_sound_event('PlaySound','HomeButton.wav')</button></li>
<li><button onclick="callbinder('audiohl','subscribe', {events:['SinkDeviceChanges','StreamStatusChanges']})">subscribe(['SinkDeviceChanges','StreamStatusChanges'])</button>
+ <li><button onclick="callbinder('audiohl','unsubscribe', {events:['SinkDeviceChanges','StreamStatusChanges']})">unsubscribe(['SinkDeviceChanges','StreamStatusChanges'])</button>
</li>
+
<br>
</ol>
diff --git a/htdocs/index.html b/htdocs/index.html
index 9c645cf..3c43f9b 100644
--- a/htdocs/index.html
+++ b/htdocs/index.html
@@ -7,4 +7,5 @@
<li><a href="alsa-core.html">AlsaCore Low Level Binding</a>
<li><a href="alsa-hal.html" >AlsaHAL Hardware Abstraction Layer</a>
<li><a href="audio-control.html">AudioControl Control/Policy API</a>
- <li><a href="audiohl.html">High Level Audio API</a>
+ <li><a href="audiohl.html">High Level Audio API</a>
+ <li><a href="audiohl-demo.html">High Level Audio API Demo</a>