On 01/23/2006 02:00 PM, Ben Suffolk wrote:
As a matter of fact, I don't expect to use digital connections for
any of my audio. I can't live without timestretch, anymore (thanks,
Mark)--on TV and for DVD's--and decoding and re-encoding an AC-3
(*lossy* compression algorithm) stream to allow timestretch seems
like it negates the benefit of a digital audio connection. After all,
the audio is running over short connections and has to be analog
between the receiver and the speakers, anyway, so proper wiring of
analog connections will probably give at least as good--if not
better--quality as resampled AC-3.
A quick question if I may. Am I right in thinking that if I buy a new
sound-card with 6 analogue channels on the output it will drive my 5.1
amp (it has 6 channel input) for surround sound.
Yes (assuming you mean by 6-channel input that you have at least 6 RCA
connectors or 3 headphone connectors for input).
Note, though, that many cards use line in for surround output in
surround modes, so if you've got a software encoder that requires a
sound card for audio, you may have to keep your on-board card enabled as
well for sound capture.
i.e. I guess I am asking does myth decode the 5.1 happily from DVDs
and from DVB-T broadcasts?
Yep. It's been doing this for a long time--just disable AC-3 pass
through. Mark Spieth recently created a patch to support timestretch
with multi-channel streams. He did the analog patch in no time, but
it's the re-encoding to AC-3 that's taking some time. I don't think the
patch has been put in SVN, yet, though, so it may not make it into 0.19.
Does it also work happily with the internal volume controls as well
(which after all is what I am trying to achieve)
That's a question of your ALSA drivers. For some, the Master controls
only 2-channel audio and has no effect on surround channels (i.e. your
front left/right will get quieter and your center/rear channels will
stay at full volume). Since Myth's internal volume controls can only
use either PCM (which is always 2-channel audio) or Master (which is
sometimes 2-channel audio), you may be forced to use an external script
to change volume (thereby losing the OSD volume indicator). However,
using the mythtvosd program, you can make a "poor-man's" volume OSD.
For example, the script volume.sh (attached) will allow you to
increase/decrease or mute/unmute all channels of your surround, even if
ALSA's master control won't work. To use it, disable internal volume
controls in Myth and use something like the following in your LIRC
config (~/.lircrc) (note that the mute button is being used to toggle
the mute/unmute):
-----
begin
prog = irexec
button = volume-up
config = /path/to/volume.sh up &
repeat = 3
end
begin
prog = irexec
button = volume-down
config = /path/to/volume.sh down &
repeat = 3
end
begin
prog = irexec
button = mute
config = /path/to/volume.sh mute &
config = /path/to/volume.sh unmute &
repeat = 0
end
-----
That being said, I still like the IR transmitter to my receiver
approach. ;)
HTH.
Mike
#!/bin/bash
# Set the MIXER_NORM_CONTROL to the name of the ALSA control you want to use to
# "normalize" all control values. This value is used to determine the current
# volume before calculating the desired new volume, so using a control with
# high resolution allow you to use small volume adjustments without "getting
# stuck."
# If, for example, you're using a volume change that's less than
# 100/resolution, the volume will stick at the point where changing the control
# value by one results in a greater percentage change (after rounding) than
# requested.
# Note that PCM controls often have a resolution of 30, whereas Center,
# Surround, and LFE may have a resolution of 100.
MIXER_NORM_CONTROL=PCM
#MIXER_NORM_CONTROL=Center
# Set the MIXER_ADJ_AMOUNT to the desired percentage by which you want to
# adjust the volume. Note that if using a control whose resolution is less than
# 100, the MIXER_ADJ_AMOUNT should be approximately 100/resolution or greater
# (i.e. for a PCM control with a resolution of 30, use 3 or higher) to prevent
# "getting stuck" at any particular volume.
MIXER_ADJ_AMOUNT=3
# Set the VOLUME_CONTROLS to the space separated list of volume controls you
# want the script to adjust. Use single quotes around the list.
VOLUME_CONTROLS='PCM Surround Center LFE'
# Relies on amixer reporting volume in the format "[90%]" in any line of output
# Please test that your version of amixer does this or you may blow out your
# speakers.
VOLUME=`amixer sget $MIXER_NORM_CONTROL | awk '/[.*%]/ {split($0,a,"[");
split(a[2],a,"%"); print a[1]; exit}'`
case "$1" in
up|down)
if [ $1 = "down" ]; then
MIXER_ADJ_AMOUNT=-$MIXER_ADJ_AMOUNT
fi
NEW_VOLUME="$(($VOLUME + $MIXER_ADJ_AMOUNT))"
if [ $NEW_VOLUME -lt 0 ]; then
NEW_VOLUME=0
elif [ $NEW_VOLUME -gt 100 ]; then
NEW_VOLUME=100
fi
mythtvosd --bcastaddr='127.0.0.1' \
--template='alert' \
--alert_text="Volume: ${NEW_VOLUME}%" > /dev/null 2>&1 &
for control in $VOLUME_CONTROLS; do
amixer -q set $control ${NEW_VOLUME}% &
done
;;
mute|unmute)
mythtvosd --bcastaddr='127.0.0.1' \
--template='alert' --alert_text="$1" > /dev/null 2>&1 &
for control in $VOLUME_CONTROLS; do
amixer -q set $control $1 &
done
;;
*)
echo "Usage: $0 {up|down|mute|unmute}"
;;
esac
_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users