diff options
author | Christian Gromm <christian.gromm@microchip.com> | 2016-06-20 14:09:37 +0200 |
---|---|---|
committer | Christian Gromm <christian.gromm@microchip.com> | 2016-06-20 14:09:37 +0200 |
commit | 019c14a4c4a79b19494fe460c4ea26de934dadf3 (patch) | |
tree | 93d80785028a16cc21ea5181c09d9c06d47f0da7 | |
parent | f3db6860431df740e6eb58fb499b0d37be0b631d (diff) |
staging: most-can-demo-bin: initial file import
This patch adds the binary blob needed for the video application.
Change-Id: Ia8ca14598c39bbc2d28f4cbc647a20feed6fb444
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
-rw-r--r-- | DriverVersion.txt | 1 | ||||
-rw-r--r-- | NetworkManager | bin | 0 -> 270068 bytes | |||
-rw-r--r-- | VideoOnDemand | bin | 0 -> 108288 bytes | |||
-rw-r--r-- | aim_cdev.ko | bin | 0 -> 10044 bytes | |||
-rw-r--r-- | aim_network.ko | bin | 0 -> 10872 bytes | |||
-rw-r--r-- | aim_sound.ko | bin | 0 -> 10536 bytes | |||
-rw-r--r-- | aim_v4l2.ko | bin | 0 -> 11372 bytes | |||
-rw-r--r-- | config-agl.xml | 305 | ||||
-rw-r--r-- | hdm_usb.ko | bin | 0 -> 17384 bytes | |||
-rw-r--r-- | i2c-slim-amplifier.script | 92 | ||||
-rw-r--r-- | i2c-uda1388-v2.script | 29 | ||||
-rwxr-xr-x | loadDriver.sh | 164 | ||||
-rw-r--r-- | mostcore.ko | bin | 0 -> 26536 bytes | |||
-rw-r--r-- | vod-client | bin | 0 -> 46940 bytes |
14 files changed, 591 insertions, 0 deletions
diff --git a/DriverVersion.txt b/DriverVersion.txt new file mode 100644 index 0000000..150a871 --- /dev/null +++ b/DriverVersion.txt @@ -0,0 +1 @@ +V1.3.11 diff --git a/NetworkManager b/NetworkManager Binary files differnew file mode 100644 index 0000000..ce16af9 --- /dev/null +++ b/NetworkManager diff --git a/VideoOnDemand b/VideoOnDemand Binary files differnew file mode 100644 index 0000000..e2bd4d1 --- /dev/null +++ b/VideoOnDemand diff --git a/aim_cdev.ko b/aim_cdev.ko Binary files differnew file mode 100644 index 0000000..4ff17a5 --- /dev/null +++ b/aim_cdev.ko diff --git a/aim_network.ko b/aim_network.ko Binary files differnew file mode 100644 index 0000000..93e4af0 --- /dev/null +++ b/aim_network.ko diff --git a/aim_sound.ko b/aim_sound.ko Binary files differnew file mode 100644 index 0000000..cbee3f4 --- /dev/null +++ b/aim_sound.ko diff --git a/aim_v4l2.ko b/aim_v4l2.ko Binary files differnew file mode 100644 index 0000000..3dcec58 --- /dev/null +++ b/aim_v4l2.ko diff --git a/config-agl.xml b/config-agl.xml new file mode 100644 index 0000000..97fcb5c --- /dev/null +++ b/config-agl.xml @@ -0,0 +1,305 @@ +<?xml version="1.0"?> +<root> + <network_manager> + <endpoint> + <port_id>USB</port_id> + <device_api_ver>3</device_api_ver> + <data_type>CTRL</data_type> + <dir>IN</dir> + <channel_addr_hex>8f</channel_addr_hex> + </endpoint> + <endpoint> + <port_id>USB</port_id> + <device_api_ver>f</device_api_ver> + <data_type>CTRL</data_type> + <dir>OUT</dir> + <channel_addr_hex>f</channel_addr_hex> + </endpoint> + <network_config> + <timing_master>1</timing_master> + <async_bandwidth>276</async_bandwidth> + </network_config> + + <!-- Server device with OS81118 D-Rev --> + <device> + <device_type_hex>311</device_type_hex> + <device_api_ver>3</device_api_ver> + <channel> + <!-- ALSA 5.1 channel --> + <channel_id>1</channel_id> + <socket> + <port_id>USB</port_id> + <data_type>SYNC</data_type> + <dir>IN</dir> + <channel_addr_hex>1</channel_addr_hex> + <number_of_buffers>16</number_of_buffers> + <buffer_size>5040</buffer_size> + <packets_per_xact>42</packets_per_xact> + <subbuffer_size>12</subbuffer_size> + <offset>0</offset> + <aim_type>AUDIO</aim_type> + </socket> + <socket> + <port_id>MOST</port_id> + <data_type>SYNC</data_type> + <dir>OUT</dir> + <blockwidth>4</blockwidth> + </socket> + </channel> + <channel> + <channel_id>2</channel_id> + <socket> + <port_id>USB</port_id> + <data_type>SYNC</data_type> + <dir>IN</dir> + <channel_addr_hex>1</channel_addr_hex> + <number_of_buffers>16</number_of_buffers> + <buffer_size>5040</buffer_size> + <packets_per_xact>42</packets_per_xact> + <subbuffer_size>12</subbuffer_size> + <offset>4</offset> + <aim_type>AUDIO</aim_type> + </socket> + <socket> + <port_id>MOST</port_id> + <data_type>SYNC</data_type> + <dir>OUT</dir> + <blockwidth>4</blockwidth> + </socket> + </channel> + <channel> + <channel_id>3</channel_id> + <socket> + <port_id>USB</port_id> + <data_type>SYNC</data_type> + <dir>IN</dir> + <channel_addr_hex>1</channel_addr_hex> + <number_of_buffers>16</number_of_buffers> + <buffer_size>5040</buffer_size> + <packets_per_xact>42</packets_per_xact> + <subbuffer_size>12</subbuffer_size> + <offset>8</offset> + <aim_type>AUDIO</aim_type> + </socket> + <socket> + <port_id>MOST</port_id> + <data_type>SYNC</data_type> + <dir>OUT</dir> + <blockwidth>4</blockwidth> + </socket> + </channel> + <channel> + <channel_id>4</channel_id> + <socket> + <port_id>USB</port_id> + <data_type>ISOC</data_type> + <dir>IN</dir> + <channel_addr_hex>2</channel_addr_hex> + <subbuffer_size>188</subbuffer_size> + <number_of_buffers>32</number_of_buffers> + <buffer_size>7520</buffer_size> + <packets_per_xact>2</packets_per_xact> + </socket> + <socket> + <port_id>MOST</port_id> + <data_type>ISOC</data_type> + <dir>OUT</dir> + <blockwidth>80</blockwidth> + <subbuffer_size>188</subbuffer_size> + </socket> + </channel> + </device> + + <!-- Slim amplifier 1 with OS81118 --> + <device> + <device_type_hex>370</device_type_hex> + <device_api_ver>3</device_api_ver> + <script>i2c-slim-amplifier.script</script> + <channel> + <channel_id>1</channel_id> + <socket> + <port_id>MOST</port_id> + <data_type>SYNC</data_type> + <dir>IN</dir> + <blockwidth>4</blockwidth> + </socket> + <socket> + <port_id>I2S</port_id> + <data_type>SYNC</data_type> + <dir>OUT</dir> + <blockwidth>4</blockwidth> + <i2s_option>DualOut</i2s_option> + <i2s_clock_dir>Output</i2s_clock_dir> + <i2s_clock_delay>1</i2s_clock_delay> + <i2s_fs_speed>64</i2s_fs_speed> + <i2s_align>Left16</i2s_align> + <i2s_pin>SRXA0</i2s_pin> + </socket> + </channel> + </device> + + <!-- Slim amplifier 2 with OS81118 --> + <device> + <device_type_hex>371</device_type_hex> + <device_api_ver>3</device_api_ver> + <script>i2c-slim-amplifier.script</script> + <channel> + <channel_id>1</channel_id> + <socket> + <port_id>MOST</port_id> + <data_type>SYNC</data_type> + <dir>IN</dir> + <blockwidth>4</blockwidth> + </socket> + <socket> + <port_id>I2S</port_id> + <data_type>SYNC</data_type> + <dir>OUT</dir> + <blockwidth>4</blockwidth> + <i2s_option>DualOut</i2s_option> + <i2s_clock_dir>Output</i2s_clock_dir> + <i2s_clock_delay>1</i2s_clock_delay> + <i2s_fs_speed>64</i2s_fs_speed> + <i2s_align>Left16</i2s_align> + <i2s_pin>SRXA0</i2s_pin> + </socket> + </channel> + </device> + + <!-- Slim amplifier 3 with OS81118 --> + <device> + <device_type_hex>372</device_type_hex> + <device_api_ver>3</device_api_ver> + <script>i2c-slim-amplifier.script</script> + <channel> + <channel_id>1</channel_id> + <socket> + <port_id>MOST</port_id> + <data_type>SYNC</data_type> + <dir>IN</dir> + <blockwidth>4</blockwidth> + </socket> + <socket> + <port_id>I2S</port_id> + <data_type>SYNC</data_type> + <dir>OUT</dir> + <blockwidth>4</blockwidth> + <i2s_option>DualOut</i2s_option> + <i2s_clock_dir>Output</i2s_clock_dir> + <i2s_clock_delay>1</i2s_clock_delay> + <i2s_fs_speed>64</i2s_fs_speed> + <i2s_align>Left16</i2s_align> + <i2s_pin>SRXA0</i2s_pin> + </socket> + </channel> + </device> + + <!-- RSE with OS81118 USB --> + <device> + <device_type_hex>332</device_type_hex> + <device_api_ver>3</device_api_ver> + <channel> + <!-- 1st Channel: Iosc RX --> + <channel_id>1</channel_id> + <socket> + <port_id>MOST</port_id> + <data_type>ISOC</data_type> + <dir>IN</dir> + <blockwidth>80</blockwidth> + <subbuffer_size>188</subbuffer_size> + </socket> + <socket> + <port_id>USB</port_id> + <data_type>ISOC</data_type> + <dir>OUT</dir> + <buffer_size>7520</buffer_size> + <packets_per_xact>2</packets_per_xact> + <channel_addr_hex>83</channel_addr_hex> + <subbuffer_size>188</subbuffer_size> + </socket> + </channel> + <!-- 2nd Channel: Sync HMI Audio TX --> + <channel> + <channel_id>2</channel_id> + <socket> + <port_id>USB</port_id> + <data_type>SYNC</data_type> + <dir>IN</dir> + <channel_addr_hex>4</channel_addr_hex> + <number_of_buffers>16</number_of_buffers> + <buffer_size>7520</buffer_size> + <packets_per_xact>128</packets_per_xact> + <subbuffer_size>4</subbuffer_size> + </socket> + <socket> + <port_id>MOST</port_id> + <data_type>SYNC</data_type> + <dir>OUT</dir> + <blockwidth>4</blockwidth> + </socket> + </channel> + </device> + + <!-- Routing 5.1 channel (1/3)--> + <route> + <terminal> + <device_type_hex>311</device_type_hex> + <instance>0</instance> + <channel_id>1</channel_id> + </terminal> + <terminal> + <device_type_hex>370</device_type_hex> + <instance>0</instance> + <channel_id>1</channel_id> + </terminal> + </route> + + <!-- Routing 5.1 channel (2/3)--> + <route> + <terminal> + <device_type_hex>311</device_type_hex> + <instance>0</instance> + <channel_id>2</channel_id> + </terminal> + <terminal> + <device_type_hex>371</device_type_hex> + <instance>0</instance> + <channel_id>1</channel_id> + </terminal> + </route> + + <!-- Routing 5.1 channel (3/3)--> + <route> + <terminal> + <device_type_hex>311</device_type_hex> + <instance>0</instance> + <channel_id>3</channel_id> + </terminal> + <terminal> + <device_type_hex>372</device_type_hex> + <instance>0</instance> + <channel_id>1</channel_id> + </terminal> + </route> + + <!-- Routing Video (3/3)--> + <route> + <terminal> + <device_type_hex>311</device_type_hex> + <instance>0</instance> + <channel_id>4</channel_id> + </terminal> + <terminal> + <device_type_hex>332</device_type_hex> + <instance>0</instance> + <channel_id>1</channel_id> + </terminal> + <terminal> + <device_type_hex>332</device_type_hex> + <instance>1</instance> + <channel_id>1</channel_id> + </terminal> + </route> + + </network_manager> +</root> diff --git a/hdm_usb.ko b/hdm_usb.ko Binary files differnew file mode 100644 index 0000000..661f462 --- /dev/null +++ b/hdm_usb.ko diff --git a/i2c-slim-amplifier.script b/i2c-slim-amplifier.script new file mode 100644 index 0000000..405a9fe --- /dev/null +++ b/i2c-slim-amplifier.script @@ -0,0 +1,92 @@ +<script> + <action> + <name>I2CPortCreate (1/1)</name> + <type>SEND_MCM</type> + <fblock_id_hex>0</fblock_id_hex> + <function_id_hex>6C1</function_id_hex> + <op_type_request_hex>6</op_type_request_hex> + <op_type_response_hex>D</op_type_response_hex> + <payload_hex>00 00 00 00 01 01</payload_hex> + </action> + <action> + <name>TAS5717 Setup (1/8)</name> + <type>SEND_MCM</type> + <fblock_id_hex>0</fblock_id_hex> + <function_id_hex>6C4</function_id_hex> + <op_type_request_hex>6</op_type_request_hex> + <op_type_response_hex>D</op_type_response_hex> + <payload_hex>00 00 0F 00 00 00 2A 02 03 E8 1B 80</payload_hex> + </action> + <action> + <name>TAS5717 Setup (2/8)</name> + <type>SEND_MCM</type> + <fblock_id_hex>0</fblock_id_hex> + <function_id_hex>6C4</function_id_hex> + <op_type_request_hex>6</op_type_request_hex> + <op_type_response_hex>D</op_type_response_hex> + <payload_hex>00 00 0F 00 00 00 2A 02 03 E8 11 B8</payload_hex> + </action> + <action> + <name>TAS5717 Setup (3/8)</name> + <type>SEND_MCM</type> + <fblock_id_hex>0</fblock_id_hex> + <function_id_hex>6C4</function_id_hex> + <op_type_request_hex>6</op_type_request_hex> + <op_type_response_hex>D</op_type_response_hex> + <payload_hex>00 00 0F 00 00 00 2A 02 03 E8 12 60</payload_hex> + </action> + <action> + <name>TAS5717 Setup (4/8)</name> + <type>SEND_MCM</type> + <fblock_id_hex>0</fblock_id_hex> + <function_id_hex>6C4</function_id_hex> + <op_type_request_hex>6</op_type_request_hex> + <op_type_response_hex>D</op_type_response_hex> + <payload_hex>00 00 0F 00 00 00 2A 02 03 E8 13 A0</payload_hex> + </action> + <action> + <name>TAS5717 Setup (5/8)</name> + <type>SEND_MCM</type> + <fblock_id_hex>0</fblock_id_hex> + <function_id_hex>6C4</function_id_hex> + <op_type_request_hex>6</op_type_request_hex> + <op_type_response_hex>D</op_type_response_hex> + <payload_hex>00 00 0F 00 00 00 2A 02 03 E8 14 48</payload_hex> + </action> + <action> + <name>TAS5717 Setup (6/8)</name> + <type>SEND_MCM</type> + <fblock_id_hex>0</fblock_id_hex> + <function_id_hex>6C4</function_id_hex> + <op_type_request_hex>6</op_type_request_hex> + <op_type_response_hex>D</op_type_response_hex> + <payload_hex>00 00 0F 00 00 00 2A 05 03 E8 20 00 89 77 72</payload_hex> + </action> + <action> + <name>TAS5717 Setup (7/8)</name> + <type>SEND_MCM</type> + <fblock_id_hex>0</fblock_id_hex> + <function_id_hex>6C4</function_id_hex> + <op_type_request_hex>6</op_type_request_hex> + <op_type_response_hex>D</op_type_response_hex> + <payload_hex>00 00 0F 00 00 00 2A 02 03 E8 06 00</payload_hex> + </action> + <action> + <name>TAS5717 Setup (8/8)</name> + <type>SEND_MCM</type> + <fblock_id_hex>0</fblock_id_hex> + <function_id_hex>6C4</function_id_hex> + <op_type_request_hex>6</op_type_request_hex> + <op_type_response_hex>D</op_type_response_hex> + <payload_hex>00 00 0F 00 00 00 2A 02 03 E8 05 00</payload_hex> + </action> + <action> + <name>TAS5717 Master Volume (1/1)</name> + <type>SEND_MCM</type> + <fblock_id_hex>0</fblock_id_hex> + <function_id_hex>6C4</function_id_hex> + <op_type_request_hex>6</op_type_request_hex> + <op_type_response_hex>D</op_type_response_hex> + <payload_hex>00 00 0F 00 00 00 2A 03 03 E8 07 01 50</payload_hex> + </action> +</script> diff --git a/i2c-uda1388-v2.script b/i2c-uda1388-v2.script new file mode 100644 index 0000000..16b9dec --- /dev/null +++ b/i2c-uda1388-v2.script @@ -0,0 +1,29 @@ +<script> + <action> + <name>I2CPortCreate (1/1)</name> + <type>SEND_MCM</type> + <fblock_id_hex>0</fblock_id_hex> + <function_id_hex>6C1</function_id_hex> + <op_type_request_hex>6</op_type_request_hex> + <op_type_response_hex>D</op_type_response_hex> + <payload_hex>00 00 00 00 01 01</payload_hex> + </action> + <action> + <name>Uda1380Setup (1/2)</name> + <type>SEND_MCM</type> + <fblock_id_hex>0</fblock_id_hex> + <function_id_hex>6C4</function_id_hex> + <op_type_request_hex>6</op_type_request_hex> + <op_type_response_hex>d</op_type_response_hex> + <payload_hex>00 00 0F 00 02 0A 18 03 03 E8 00 0f 02 01 00 00 02 a5 df 03 3f 3f 04 02 02 10 00 00 11 00 00 12 00 00 13 00 00 14 00 00</payload_hex> + </action> + <action> + <name>Uda1380Setup (2/2)</name> + <type>SEND_MCM</type> + <fblock_id_hex>0</fblock_id_hex> + <function_id_hex>6C4</function_id_hex> + <op_type_request_hex>6</op_type_request_hex> + <op_type_response_hex>d</op_type_response_hex> + <payload_hex>00 00 0F 00 02 04 18 03 03 E8 20 00 00 21 00 00 22 00 00 23 00 00</payload_hex> + </action> +</script>
\ No newline at end of file diff --git a/loadDriver.sh b/loadDriver.sh new file mode 100755 index 0000000..f0ce5b7 --- /dev/null +++ b/loadDriver.sh @@ -0,0 +1,164 @@ +#!/bin/bash + +if [ ! "$(whoami)" = "root" ] +then + echo Warning you are not root, expect problems! +fi + +if [ -d ../../../LinuxDriver ] +then + cd ../../../LinuxDriver + echo Switched to folder:$(pwd) +else + echo Searching driver in folder:$(pwd) +fi + +#unload MOST Kernel modules +lsmod | grep "^mxc_mlb\>" > /dev/null && + rmmod mxc_mlb && echo "unloaded mxc_mlb" + +lsmod | grep "^hdm_dim2_mx6q\>" > /dev/null && + rmmod hdm_dim2_mx6q && echo "unloaded hdm_dim2_mx6q" + +lsmod | grep "^hdm_dim2\>" > /dev/null && + rmmod hdm_dim2 && echo "unloaded hdm_dim2" + +lsmod | grep "^hdm_usb\>" > /dev/null && + rmmod hdm_usb && echo "unloaded hdm_usb" + +lsmod | grep "^aim_sound\>" > /dev/null && + rmmod aim_sound && echo "unloaded aim_sound" + +lsmod | grep "^aim_cdev\>" > /dev/null && + rmmod aim_cdev && echo "unloaded aim_cdev" + +lsmod | grep "^aim_network\>" > /dev/null && + rmmod aim_network && echo "unloaded aim_network" + +lsmod | grep "^mostcore\>" > /dev/null && + rmmod mostcore && echo "unloaded mostcore" + +echo + + +#load MOST Kernel modules +insmod mostcore.ko && echo "loaded mostcore" +insmod aim_cdev.ko && echo "loaded aim_cdev" + +[ -e aim_network.ko ] && + insmod aim_network.ko && echo "loaded aim_network" + +[ -e aim_sound.ko ] && + insmod aim_sound.ko && echo "loaded sound" + +[ -e hdm_usb.ko ] && + insmod hdm_usb.ko && echo "loaded hdm_usb" + +[ -e hdm_dim2.ko ] && + insmod hdm_dim2.ko clock_speed=4096fs fcnt=3 && echo "loaded hdm_dim2" + +[ -e hdm_dim2_mx6q.ko ] && + insmod hdm_dim2_mx6q.ko && echo "loaded hdm_dim2_mx6q" + +DEVS=/sys/devices/virtual/most/mostcore/devices +AIMS=/sys/devices/virtual/most/mostcore/aims + +xset() +{ + VAL=$1 + FILE=$2 + + #echo "$VAL > $FILE" + echo "$VAL" > $FILE +} + +SetAsyncChannel() +{ + MDEV=mdev$1 + CH_NAME=$2 + DIR=dir_$3 + BUFSIZE=$4 + + CHANNEL=$DEVS/$MDEV/$CH_NAME + + [ -e $CHANNEL/set_buffer_size ] || return 1 + + [ "$(cat $CHANNEL/set_buffer_size)" = "0" ] || return 2 + + echo "Set Ethernet $MDEV channel: $CH_NAME" + + xset async $CHANNEL/set_datatype + xset $DIR $CHANNEL/set_direction + xset 32 $CHANNEL/set_number_of_buffers + xset $BUFSIZE $CHANNEL/set_buffer_size + + xset $MDEV:$CH_NAME: $AIMS/networking/add_link + return 0 +} + +StartupEth() +{ + METH=meth$1 + IFC_ALL=$2 + IFC_UP=$3 + + #if device not exist return + echo "$IFC_ALL" | grep -q $METH || return 1 + + #if the interface is down, start it + if [ -z "`echo "$IFC_UP" | grep $METH`" ] + then + echo Starting up $METH + ifconfig $METH up + ETH_ALREADY_SET="" + return 2 + fi + + #if the IP is already set, we have nothing to do anymore + ifconfig $METH |grep -q "inet addr:" && return 3 + + MAC=`ifconfig -a $METH | awk '/HWaddr/{ print $5}'` + #if MAC address has not been set yet return + [ -z "$MAC" ] && return 4 + [ $MAC = "FF:FF:FF:FF:FF:FF" ] && return 5 + [ $MAC = "ff:ff:ff:ff:ff:ff" ] && return 5 + [ $MAC = "00:00:00:00:00:00" ] && return 6 + + m0=$(echo $((16#${MAC:0:2}))) + m1=$(echo $((16#${MAC:3:2}))) + m2=$(echo $((16#${MAC:6:2}))) + m3=$(echo $((16#${MAC:9:2}))) + m4=$(echo $((16#${MAC:12:2}))) + m5=$(echo $((16#${MAC:15:2}))) + + IP=10.0.$m2.$((1+$m5)) + echo Setting IP address $IP for device $METH MAC:$m0-$m1-$m2-$m3-$m4-$m5 + ifconfig $METH $IP netmask 255.255.255.0 + return 0 +} + +########################## +## USER ADJUSTABLE AREA ## +########################## +while : +do + for i in 0 1 2 3 4 5 6 7 8 9 + do +#USB attached INICs: +#MEP + SetAsyncChannel $i ep8e rx 1548 && + SetAsyncChannel $i ep0e tx 1548 +#MLB attached INICs: +#MEP + SetAsyncChannel $i ca6 rx 1548 && + SetAsyncChannel $i ca8 tx 1548 + done + IFC_ALL="$(ifconfig -a)" + IFC_UP="$(ifconfig)" + for i in 0 1 2 3 4 5 6 7 8 9 + do + StartupEth $i "$IFC_ALL" "$IFC_UP" + done + sleep 3 +done + diff --git a/mostcore.ko b/mostcore.ko Binary files differnew file mode 100644 index 0000000..986ebfe --- /dev/null +++ b/mostcore.ko diff --git a/vod-client b/vod-client Binary files differnew file mode 100644 index 0000000..7be715e --- /dev/null +++ b/vod-client |