| 1 |
#!/bin/sh |
| 2 |
#Load parameters according to devices configuration |
| 3 |
if [ -z "$@" ]; then |
| 4 |
for _dt_compatible in $(cat /proc/device-tree/compatible | tr '\0' ' '); do |
| 5 |
# HexagonRPC parameters |
| 6 |
case "$_dt_compatible" in |
| 7 |
"qcom,sdm670") |
| 8 |
hexagonrpcd_device=${hexagonrpcd_device:-"/dev/fastrpc-adsp-secure"} |
| 9 |
break |
| 10 |
;; |
| 11 |
"qcom,sdm845") |
| 12 |
hexagonrpcd_device=${hexagonrpcd_device:-"/dev/fastrpc-sdsp"} |
| 13 |
hexagonrpcd_dsp=${hexagonrpcd_dsp:-"sdsp"} |
| 14 |
break |
| 15 |
;; |
| 16 |
esac |
| 17 |
done |
| 18 |
hexagonrpcd_device=${hexagonrpcd_device:-"/dev/fastrpc-adsp"} |
| 19 |
hexagonrpcd_dsp=${hexagonrpcd_dsp:-"adsp"} |
| 20 |
hexagonrpcd_fw_dir=${hexagonrpcd_fw_dir:-"/var/lib/droid-juicer/sensors/"} |
| 21 |
hexagonrpcd_extra=${hexagonrpcd_extra-"-s"} |
| 22 |
|
| 23 |
/usr/libexec/hexagonrpc/hexagonrpcd -f ${hexagonrpcd_device} -d ${hexagonrpcd_dsp} ${hexagonrpcd_extra} -R ${hexagonrpcd_fw_dir} |
| 24 |
else |
| 25 |
/usr/libexec/hexagonrpc/hexagonrpcd $@ |
| 26 |
fi |