agl-service-unicens: support fiberdyne amp setup 85/14185/1
authorTobias Jahnke <tobias.jahnke@microchip.com>
Tue, 15 May 2018 14:35:15 +0000 (16:35 +0200)
committerTobias Jahnke <tobias.jahnke@microchip.com>
Tue, 15 May 2018 14:35:15 +0000 (16:35 +0200)
- add amp (node and routing) to xml configuration
- add amp control buttons to html web-interface

Bug-AGL: SPEC-1177

Change-Id: If6df66f4b6e7d9cf7a259c4e44604db90e588134
Signed-off-by: Tobias Jahnke <tobias.jahnke@microchip.com>
data/config_multichannel_audio_kit.xml
htdocs/UNICENS.html

index 1cbe31f..51d2fdc 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>\r
 <Unicens AsyncBandwidth="20" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="unicens.xsd">\r
-  <!-- Server Node -->\r
-  <Node Address="0x200">\r
+  <!-- Head Unit -->\r
+  <Node Address="0x200" Name="Head Unit">\r
     <SyncConnection MuteMode="NoMuting">\r
       <USBSocket EndpointAddress="0x1" FramesPerTransaction="42"/>\r
       <Splitter BytesPerFrame="12">\r
       </Splitter>\r
     </SyncConnection>\r
   </Node>\r
-  \r
+\r
+  <!-- Fiberdyne Amplifier -->\r
+  <Node Address="0x510" Name="Fiberdyne Amplifier">\r
+    <StreamPort ClockConfig="64Fs" DataAlignment="Seq"/>\r
+    <SyncConnection MuteMode="NoMuting">\r
+      <Combiner BytesPerFrame="8">\r
+        <MOSTSocket Route="5.1 DVD Player Front" Bandwidth="4" Offset="0"/>\r
+        <MOSTSocket Route="5.1 DVD Player Rear" Bandwidth="4" Offset="4"/>\r
+      </Combiner>\r
+      <StreamSocket StreamPinID="SRXA0" Bandwidth="8"/>\r
+    </SyncConnection>\r
+    <SyncConnection MuteMode="NoMuting">\r
+      <MOSTSocket Route="5.1 DVD Player Effect" Bandwidth="4"/>\r
+      <StreamSocket StreamPinID="SRXA1" Bandwidth="4"/>\r
+    </SyncConnection>\r
+  </Node>\r
+\r
   <!-- 1st Slim Amplifier -->\r
-  <Node Address="0x270" Script="slim-amp-config">\r
+  <Node Address="0x270" Script="slim-amp-config" Name="1st Slim Amplifier">\r
     <StreamPort ClockConfig="64Fs" DataAlignment="Left16Bit"/>\r
     <SyncConnection MuteMode="NoMuting">\r
       <MOSTSocket Route="5.1 DVD Player Front" Bandwidth="4"/>\r
@@ -21,7 +37,7 @@
     </SyncConnection>\r
   </Node>\r
   <!-- 2nd Slim Amplifier -->\r
-  <Node Address="0x271" Script="slim-amp-config">\r
+  <Node Address="0x271" Script="slim-amp-config" Name="2nd Slim Amplifier">\r
     <StreamPort ClockConfig="64Fs" DataAlignment="Left16Bit"/>\r
     <SyncConnection MuteMode="NoMuting">\r
       <MOSTSocket Route="5.1 DVD Player Rear" Bandwidth="4"/>\r
@@ -29,7 +45,7 @@
     </SyncConnection>\r
   </Node>\r
   <!-- 3rd Slim Amplifier -->\r
-  <Node Address="0x272" Script="slim-amp-config">\r
+  <Node Address="0x272" Script="slim-amp-config" Name="3rd Slim Amplifier">\r
     <StreamPort ClockConfig="64Fs" DataAlignment="Left16Bit"/>\r
     <SyncConnection MuteMode="NoMuting">\r
       <MOSTSocket Route="5.1 DVD Player Effect" Bandwidth="4"/>\r
@@ -53,7 +69,7 @@
   </Script>\r
 \r
   <!-- 1st Aux IO -->\r
-  <Node Address="0x240" Script="aux-io-config">\r
+  <Node Address="0x240" Script="aux-io-config" Name="1st Aux IO">\r
     <StreamPort ClockConfig="64Fs" DataAlignment="Left16Bit"/>\r
     <SyncConnection MuteMode="NoMuting">\r
       <MOSTSocket Route="5.1 DVD Player Front" Bandwidth="4"/>\r
@@ -61,7 +77,7 @@
     </SyncConnection>\r
   </Node>\r
   <!-- 2nd Aux IO -->\r
-  <Node Address="0x241" Script="aux-io-config">\r
+  <Node Address="0x241" Script="aux-io-config" Name="2nd Aux IO">\r
     <StreamPort ClockConfig="64Fs" DataAlignment="Left16Bit"/>\r
     <SyncConnection MuteMode="NoMuting">\r
       <MOSTSocket Route="5.1 DVD Player Rear" Bandwidth="4"/>\r
@@ -69,7 +85,7 @@
     </SyncConnection>\r
   </Node>\r
   <!-- 3rd Aux IO -->\r
-  <Node Address="0x242" Script="aux-io-config">\r
+  <Node Address="0x242" Script="aux-io-config" Name="3rd Aux IO">\r
     <StreamPort ClockConfig="64Fs" DataAlignment="Left16Bit"/>\r
     <SyncConnection MuteMode="NoMuting">\r
       <MOSTSocket Route="5.1 DVD Player Effect" Bandwidth="4"/>\r
@@ -83,6 +99,5 @@
                   Payload="00 0f 02 01 00 00 02 a5 df 03 3f 3f 04 02 02 10 30 30 11 00 00 12 00 00 13 00 00 14 00 00"/>\r
     <I2CPortWrite Mode="BurstMode" BlockCount="4" Address="0x18" Length="3" Timeout="100"\r
                   Payload="20 00 00 21 00 00 22 00 00 23 00 00"/>\r
-  <GPIOPortPinMode PinConfiguration="03 35 04 35 05 35 06 35 07 41 08 40"/>\r
   </Script>\r
 </Unicens>\r
index ab478f6..46efeff 100644 (file)
@@ -5,7 +5,49 @@
     <link rel="stylesheet" href="Ucs2Binding.css">
     <script type="text/javascript" src="AFB-websock.js"></script>
     <script type="text/javascript" src="Ucs2Binding.js"></script>
+    <style>
+               .divTable{
+                       display: table;
 
+               }
+               .divTableRow {
+                       display: table-row;
+               }
+               .divTableHeading {
+                       background-color: #EEE;
+                       display: table-header-group;
+               }
+               .divTableCell, .divTableHead {
+                       border: 1px solid #999999;
+                       display: table-cell;
+                       padding: 3px 10px;
+               }
+               .divTableHeading {
+                       background-color: #EEE;
+                       display: table-header-group;
+                       font-weight: bold;
+               }
+               .divTableFoot {
+                       background-color: #EEE;
+                       display: table-footer-group;
+                       font-weight: bold;
+               }
+               .divTableBody {
+                       display: table-row-group;
+               }
+
+               .ucsCtrlButton {
+                       border: none;
+                       padding: 5px 15px;
+                       text-align: center;
+                       text-decoration: none;
+                       display: inline-block;
+                       font-size: 16px;
+                       width: 144px;
+                       border: 2px solid #4CAF50;
+               }
+       </style>
+</head>
 <body onload="init('ucs2_config','unicens', 'listconfig');">
     <h1>Unicens Simple Test</h1>
 
     <li><button onclick="callbinder('UNICENS','initialise', {filename:ucs2_config})">Parse XML and Start UNICENS</button></li>
     </ol>
     <br>
-    <!--
-    <ol>
-    <li><button onclick="callbinder('UNICENS','writei2c', [{node: 0x270, data:[0x07,0x01,0x00]}, {node: 0x271, data:[0x07,0x01,0x00]}, {node: 0x272, data:[0x07,0x01,0x00]}] )">WriteI2c Master (100%)</button></li>
-    <li><button onclick="callbinder('UNICENS','writei2c', [{node: 0x270, data:[0x07,0x01,0x99]}, {node: 0x271, data:[0x07,0x01,0x99]}, {node: 0x272, data:[0x07,0x01,0x99]}] )">WriteI2c Master (80%)</button></li>
-    <li><button onclick="callbinder('UNICENS','writei2c', [{node: 0x270, data:[0x07,0x02,0x32]}, {node: 0x271, data:[0x07,0x02,0x32]}, {node: 0x272, data:[0x07,0x02,0x32]}] )">WriteI2c Master (60%)</button></li>
-    <li><button onclick="callbinder('UNICENS','writei2c', [{node: 0x270, data:[0x07,0x02,0xCB]}, {node: 0x271, data:[0x07,0x02,0xCB]}, {node: 0x272, data:[0x07,0x02,0xCB]}] )">WriteI2c Master (40%)</button></li>
-    <li><button onclick="callbinder('UNICENS','writei2c', [{node: 0x270, data:[0x07,0x03,0x64]}, {node: 0x271, data:[0x07,0x03,0x64]}, {node: 0x272, data:[0x07,0x03,0x64]}] )">WriteI2c Master (20%)</button></li>
-    <li><button onclick="callbinder('UNICENS','writei2c', [{node: 0x270, data:[0x07,0x03,0xFF]}, {node: 0x271, data:[0x07,0x03,0xFF]}, {node: 0x272, data:[0x07,0x03,0xFF]}] )">WriteI2c Master (0%)</button></li>
-    </ol>
-    -->
-    <br>
+
+    <h1>K2L Slim-Amp Demo</h1>
     <ol>
     <li><button onclick="callbinder('UNICENS','writei2c', {node: 0x270, data:[0x07,0x03,0xFF]})">WriteI2c to 0x270 (mute)</button></li>
     <li><button onclick="callbinder('UNICENS','writei2c', {node: 0x271, data:[0x07,0x03,0xFF]})">WriteI2c to 0x271 (mute)</button></li>
     <!--<li><button onclick="callbinder('UNICENS','sendmessage', {node: 0x270, msgid: 0x5AC4, data: ''})">Send ControlMsgB64 to 0x270 (data: '')</button></li>-->
     </ol>
     <br>
+
+    <h1>Fiberdyne Amplifier Controls (Node 0x510)</h1>
+    <div class="divTable">
+    <div class="divTableBody">
+    <div class="divTableRow">
+    <div class="divTableCell">&nbsp;</div>
+    <div class="divTableCell">Volume (0x100)</div>
+    <div class="divTableCell">Bass (0x101)</div>
+    <div class="divTableCell">Treble (0x102)</div>
+    <div class="divTableCell">Mid (0x103)</div>
+    <div class="divTableCell">Balance (0x0104)</div>
+    <div class="divTableCell">Fade (0x105)</div>
+    <!--<div class="divTableCell">SmartEqPoints (0x108)</div>-->
+    <div class="divTableCell">Mute (0x109)</div>
+    <!--div class="divTableCell">&nbsp;</div>
+    <div class="divTableCell">&nbsp;</div-->
+    </div>
+    <div class="divTableRow">
+    <div class="divTableCell">Max</div>
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x100, data:'AP8='})">MaxVolume</button></div><!--[0x00,0xFF]-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x101, data:'AA8='})">MaxBass</button></div><!--[0x00,15]-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x102, data:'AA8='})">MaxTreble</button></div><!--[0x00,15]-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x103, data:'AA8='})">MaxMid</button></div><!--[0x00,15]-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x104, data:'AI8='})">Full Left</button></div><!--[0x00,-15]-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x105, data:'AA8='})">Full Forward</button></div><!--[0x00,15]-->
+    <!--<div class="divTableCell">
+         <ol>
+              <li><button onclick="pushCurve(0xFF,1)">Test HIGH Curve</button></li>
+              <li><button onclick="pushCurve(0xFF,2)">Test HIGH Curve</button></li>
+              <li><button onclick="pushCurve(0xFF,3)">Test HIGH Curve</button></li>
+              <li><button onclick="pushCurve(0xFF,4)">Test HIGH Curve</button></li>
+         </ol>
+    </div>-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x109, data:'AAE='})">Mute</button></div><!--data:[0x00,1]-->
+    <!--div class="divTableCell">&nbsp;</div>
+    <div class="divTableCell">&nbsp;</div-->
+    </div>
+
+    <div class="divTableRow">
+    <div class="divTableCell">Middle</div>
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x100, data:'AO8='})">MidVolume</button></div><!--[0x00,0xEF]-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x101, data:'AAA='})">MidBass</button></div><!--[0x00,0]-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x102, data:'AAA='})">MidTreble</button></div><!--[0x00,0]-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x103, data:'AAA='})">MidMid</button></div><!--[0x00,0]-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x104, data:'AAA='})">Center Balance</button></div><!--[0x00,0]-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x105, data:'AAA='})">Center Fade</button></div><!--[0x00,0]-->
+    <!--<div class="divTableCell">
+         <ol>
+         <li><button onclick="pushCurve(0xE7,1)">Test MID Curve</button></li>
+         <li><button onclick="pushCurve(0xE7,2)">Test MID Curve</button></li>
+         <li><button onclick="pushCurve(0xE7,3)">Test MID Curve</button></li>
+         <li><button onclick="pushCurve(0xE7,4)">Test MID Curve</button></li>
+         </ol>
+       </div>-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x109, data:'AAA='})">Unmute</button></div><!--[0x00,0]-->
+    <!--div class="divTableCell">&nbsp;</div>
+    <div class="divTableCell">&nbsp;</div-->
+    </div>
+    <div class="divTableRow">
+    <div class="divTableCell">Min</div>
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x100, data:'AAA='})">MinVolume</button></div><!--[0x00,0x00]-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x101, data:'AI8='})">MinBass</button></div><!--[0x00,-15]-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x102, data:'AI8='})">MinTreble</button></div><!--[0x00,-15]-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x103, data:'AI8='})">MinMidRange</button></div><!--[0x00,-15]-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x104, data:'AA8='})">Full Right</button></div><!--[0x00,15]-->
+    <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x105, data:'AI8='})">Full Rear</button></div><!--[0x00,-15]-->
+    <!--<div class="divTableCell">
+        <ol>
+          <li><button onclick="pushCurve(0,1)">Test LOW Curve</button></li>
+          <li><button onclick="pushCurve(0,2)">Test LOW Curve</button></li>
+          <li><button onclick="pushCurve(0,3)">Test LOW Curve</button></li>
+          <li><button onclick="pushCurve(0,4)">Test LOW Curve</button></li>
+        </ol>
+    </div>-->
+    <div class="divTableCell">&nbsp;</div>
+    <!--div class="divTableCell">&nbsp;</div>
+    <div class="divTableCell">&nbsp;</div-->
+    </div>
+    </div>
+    </div>
+
+    <h1>Events</h1>
     <br>
     <div id="main" style="visibility:hidden">
     <ol>
     <li>Events: <pre id="outevt"></pre>
     </ol>
     </div>
+</body>