[mythtv-users] stereo+AC3/DTS sound to both analog+digital outputs

Robin Gilks g8ecj at gilks.org
Thu Jul 30 01:21:42 UTC 2009


> Hi,
>
> first the goal I'd like to achieve: to lower the power bill by not
> running my 5.1 receiver when not necessary (an overkill for poor stereo
> sounds of most recordings). Also the receiver eats 40W when idle and
> they often forget to turn it off after watching something.

Tackling the problem rather than the symptom, why not make sure the amp is
turned off...

I have the following entry for the remote control power button in my
lircrc file.
===========================================
begin
    prog   = irexec
    button = Power
    config = /usr/local/bin/power_toggle.sh
end
===========================================

and the script which blanks the TV and allows it to go into power save and
power the amp on/off.
Note that this requires all the amp codes you are going to use in the
lircrc file and that the user running irexec is not the mythtv user hence
the 'su' magic!!
===========================================
#!/bin/sh

AMP=rm-aap013
FILE=/home/mythtv/.power
DEV=/dev/lircd
export DISPLAY=:0
SU="su mythtv -c "
DATE=`date +%s`

# using an MCE remote we need to set which IR blaster port we are using
/usr/bin/irsend SET_TRANSMITTERS 1

# Use the presense of a flag file to see if we are powering up or down
if [ -e $FILE  ]
then
LAST=`cat $FILE`
# ignore unless at least 3 seconds has passed  this stops a keybounce
# from turning us off straight after a turn on
if [ $(($LAST + 3)) -lt $DATE ]
then
# power down - just blindly do it
$SU "/usr/bin/xset dpms force off"
/usr/bin/irsend -d $DEV SEND_ONCE $AMP A_power
/bin/rm -f $FILE
fi

else
# power up and select the correct input on the amp
$SU "/usr/bin/xset dpms force on"
/usr/bin/irsend -d $DEV SEND_ONCE $AMP A_dvd
echo $DATE > $FILE

fi
===========================================

Your amp likely has slightly different commands but I hope you get the
general idea!!

-- 
Robin Gilks





More information about the mythtv-users mailing list