2015-04-14 21:22:23 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
show_help() {
|
|
|
|
echo "AXE debug script, commands:"
|
|
|
|
echo " tuner [0x<mask>] : enable tuner (fe) debug"
|
|
|
|
echo " i2c : enable i2c debug"
|
|
|
|
echo " off : all debug off"
|
|
|
|
echo " reset : reset all tuners and kill (restart) minisatip"
|
2015-04-14 22:19:56 +02:00
|
|
|
echo " dmxts"
|
2015-04-14 21:22:23 +02:00
|
|
|
echo " pti [dmesg|pid|util|pdev|vdev] [num0-3]"
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
tuner)
|
|
|
|
val1="$2"
|
|
|
|
test -z "$val1" && val1="0xffffffff"
|
|
|
|
echo "Enabling tuner debug $val1"
|
|
|
|
echo "deb $val1" > /proc/bus/nim_sockets
|
|
|
|
;;
|
|
|
|
i2c)
|
|
|
|
if test -z "$2"; then
|
|
|
|
echo "Enabling i2c debug"
|
|
|
|
echo "i2c_dbg_trans 1" > /proc/bus/ivo_i2c
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
off)
|
|
|
|
echo "Disabling kernel driver debug"
|
|
|
|
echo "deb 0" > /proc/bus/nim_sockets
|
|
|
|
echo "i2c_dbg_trans 0" > /proc/bus/ivo_i2c
|
|
|
|
;;
|
|
|
|
reset)
|
|
|
|
echo "Reset all tuners"
|
|
|
|
echo "i2c_dbg_trans 1" > /proc/bus/ivo_i2c
|
|
|
|
echo "res" > /proc/bus/nim_sockets
|
|
|
|
sleep 10
|
|
|
|
echo "i2c_dbg_trans 0" > /proc/bus/ivo_i2c
|
|
|
|
killall -9 minisatip
|
|
|
|
;;
|
2015-04-14 22:19:56 +02:00
|
|
|
dmxts)
|
|
|
|
noex="AAAAAAAAAABBBBBBBBB"
|
|
|
|
while [ 1 -eq 1 ]; do grep -v $noex /proc/driver/axedmx-ts ; sleep 0.2; done
|
|
|
|
;;
|
2015-04-14 21:22:23 +02:00
|
|
|
pti)
|
|
|
|
cmd="$2"
|
|
|
|
test -z "$cmd" && cmd=vdev
|
|
|
|
num="$3"
|
|
|
|
test -z "$num" && num=0
|
|
|
|
noex="AAAAAAAAAABBBBBBBBB"
|
|
|
|
d="/proc/STAPI/stpti/PTI$num"
|
|
|
|
case "$cmd" in
|
|
|
|
dmesg) grep -v $noex $d/PrintBuffer ;;
|
|
|
|
pid) grep -v $noex $d/PIDTable ;;
|
|
|
|
util) while [ 1 -eq 1 ]; do grep -v $noex $d/UtilisationTP ; sleep 0.2; done ;;
|
|
|
|
pdev) while [ 1 -eq 1 ]; do grep -v $noex $d/pDevice ; sleep 0.2 ; done ;;
|
|
|
|
vdev) while [ 1 -eq 1 ]; do grep -v $noex $d/vDeviceInfo ; sleep 0.2 ; done ;;
|
|
|
|
esac
|
|
|
|
;;
|
2015-04-18 21:45:50 +02:00
|
|
|
demod)
|
|
|
|
for a in 0xd0:f2:f3:Input_1 0xd0:f4:f5:Input_2 \
|
|
|
|
0xd2:f2:f3:Input_3 0xd2:f4:f5:Input_4; do
|
|
|
|
d=$(echo $a | cut -d ':' -f 1)
|
|
|
|
a1=$(echo $a | cut -d ':' -f 2)
|
|
|
|
a2=$(echo $a | cut -d ':' -f 3)
|
|
|
|
n=$(echo $a | cut -d ':' -f 4)
|
|
|
|
echo
|
|
|
|
echo ">>> $n"
|
|
|
|
echo "********************************************************"
|
|
|
|
echo
|
|
|
|
axehelper i2c_demod_reg_read --decode $d 0x${a1}12 2
|
|
|
|
axehelper i2c_demod_reg_read --decode $d 0x${a1}16 1
|
|
|
|
axehelper i2c_demod_reg_read --decode $d 0x${a2}69 2
|
|
|
|
axehelper i2c_demod_reg_read --decode $d 0x${a2}70 1
|
|
|
|
axehelper i2c_demod_reg_read --decode $d 0x${a2}80 5
|
|
|
|
axehelper i2c_demod_reg_read --decode $d 0x${a2}99 3
|
|
|
|
axehelper i2c_demod_reg_read --decode $d 0x${a2}9d 3
|
|
|
|
axehelper i2c_demod_reg_read --decode $d 0x${a2}a4 1
|
|
|
|
axehelper i2c_demod_reg_read --decode $d 0x${a2}ad 3
|
|
|
|
done
|
|
|
|
;;
|
2015-04-14 21:22:23 +02:00
|
|
|
*)
|
|
|
|
show_help
|
|
|
|
esac
|