RDEPENDS = "bash sed gawk grep zenity"
-PR = "r150"
+PR = "r151"
SRC_URI = " \
file://op_paths.sh \
file://op_bright.sh \
file://op_cpuspeed.sh \
file://op_cpuspeed.pnd \
+ file://op_dspspeed.sh \
file://op_usbhost.sh \
file://op_usbhost.pnd \
file://op_osupgrade.sh \
file://op_inputtest.pnd \
file://gui.conf \
file://cpu.conf \
+ file://dsp.conf \
file://led.conf \
file://gamma.conf \
file://service.conf \
install -m 0755 ${WORKDIR}/op_osupgrade.sh ${D}${prefix}/pandora/scripts/
install -m 0755 ${WORKDIR}/op_bright.sh ${D}${prefix}/pandora/scripts/
install -m 0755 ${WORKDIR}/op_cpuspeed.sh ${D}${prefix}/pandora/scripts/
+ install -m 0755 ${WORKDIR}/op_dspspeed.sh ${D}${prefix}/pandora/scripts/
install -m 0755 ${WORKDIR}/op_createsd.sh ${D}${prefix}/pandora/scripts/
install -m 0755 ${WORKDIR}/op_sysspeed.sh ${D}${prefix}/pandora/scripts/
install -m 0755 ${WORKDIR}/op_cpusettings.sh ${D}${prefix}/pandora/scripts/
install -m 0644 ${WORKDIR}/gui.conf ${D}${sysconfdir}/pandora/conf/gui.conf
install -m 0644 ${WORKDIR}/led.conf ${D}${sysconfdir}/pandora/conf/led.conf
install -m 0644 ${WORKDIR}/cpu.conf ${D}${sysconfdir}/pandora/conf/cpu.conf
+ install -m 0644 ${WORKDIR}/dsp.conf ${D}${sysconfdir}/pandora/conf/dsp.conf
install -m 0644 ${WORKDIR}/gamma.conf ${D}${sysconfdir}/pandora/conf/gamma.conf
install -m 0644 ${WORKDIR}/service.conf ${D}${sysconfdir}/pandora/conf/service.conf
install -m 0666 ${WORKDIR}/nub_profiles.conf ${D}${sysconfdir}/pandora/conf/nub_profiles.conf
CONFFILES_${PN} += ${sysconfdir}/pandora/conf/gui.conf
CONFFILES_${PN} += ${sysconfdir}/pandora/conf/cpu.conf
+CONFFILES_${PN} += ${sysconfdir}/pandora/conf/dsp.conf
CONFFILES_${PN} += ${sysconfdir}/pandora/conf/led.conf
CONFFILES_${PN} += ${sysconfdir}/pandora/conf/gamma.conf
CONFFILES_${PN} += ${sysconfdir}/pandora/conf/service.conf
--- /dev/null
+max:1000
+min:90
#!/bin/bash
#get value range
-minmhz="$(cat /etc/pandora/conf/cpu.conf | grep 'min:' | awk -F\: '{print $2}')"
-safemhz="$(cat /etc/pandora/conf/cpu.conf | grep 'safe:' | awk -F\: '{print $2}')"
-maxmhz="$(cat /etc/pandora/conf/cpu.conf | grep 'max:' | awk -F\: '{print $2}')"
-warn="$(cat /etc/pandora/conf/cpu.conf | grep 'warn:' | awk -F\: '{print $2}')"
+cpu_conf=/etc/pandora/conf/cpu.conf
+minmhz="$(grep '^min:' $cpu_conf | awk -F\: '{print $2}')"
+safemhz="$(grep '^safe:' $cpu_conf | awk -F\: '{print $2}')"
+maxmhz="$(grep '^max:' $cpu_conf | awk -F\: '{print $2}')"
+warn="$(grep '^warn:' $cpu_conf | awk -F\: '{print $2}')"
device=/proc/pandora/cpu_mhz_max
curmhz="$(cat $device)"
newmhz="$(cat $device)"
if [ ! $1 ]; then
if [ $DISPLAY ]; then
- newmhz=$(zenity --scale --text "Set CPU clockspeed" --min-value=$minmhz --max-value=$maxmhz --value=$curmhz --step 1)
+ newmhz=$(zenity --scale --title "CPU clockspeed" --text "Set CPU clockspeed" --min-value=$minmhz --max-value=$maxmhz --value=$curmhz --step 1)
else
read -p "Please enter the desired clockspeed: " newmhz
fi
--- /dev/null
+#!/bin/sh
+
+cpu_conf=/etc/pandora/conf/dsp.conf
+minmhz="$(grep '^min:' $cpu_conf | awk -F\: '{print $2}')"
+maxmhz="$(grep '^max:' $cpu_conf | awk -F\: '{print $2}')"
+test -z "$minmhz" && minmhz=90
+test -z "$maxmhz" && maxmhz=1000
+
+device=/proc/pandora/dsp_mhz_max
+curmhz="$(cat $device)"
+newmhz="$(cat $device)"
+
+if [ "$1" = "-n" ]; then
+ shift
+ warn=no
+fi
+
+if [ ! -e $device ]; then
+ if [ -z "$1" -a -n "$DISPLAY" ]; then
+ zenity --info --title="DSP overclocking not supported" --text \
+ "Sorry, your kernel does not support DSP overclocking."
+ fi
+ exit 1
+fi
+
+if [ -z "$1" ]; then
+ if [ -n "$DISPLAY" ]; then
+ newmhz=$(zenity --scale --title "DSP clockspeed" --text "Set DSP clockspeed" --min-value=$minmhz --max-value=$maxmhz --value=$curmhz --step 1)
+ else
+ echo "Clock speed not specified"
+ exit 1
+ fi
+else
+ newmhz=$1
+fi
+
+if ! [ 0 -lt "$newmhz" -a "$newmhz" -lt 10000 ]; then
+ echo "invalid argument: $newmhz"
+ exit 1
+fi
+
+if [ "$newmhz" -lt "$minmhz" ]; then
+ echo "limiting clock to configured minimum of $minmhz"
+ newmhz=$minmhz
+fi
+if [ "$newmhz" -gt "$maxmhz" ]; then
+ echo "limiting clock to configured maximum of $maxmhz"
+ newmhz=$maxmhz
+fi
+
+# not much else to do here..
+echo "$newmhz" > $device