[mythtv-users] SOLVED Boot Sound Volume Set to Zero, Realtek ALC888, GA-EP31-DS3L

f-myth-users at media.mit.edu f-myth-users at media.mit.edu
Mon Mar 1 20:55:31 UTC 2010


    > Date: Sat, 27 Feb 2010 14:00:45 +0000
    > From: Mike Perkins <mikep at randomtraveller.org.uk>

    > Tortise wrote:
    > [...]
    > > 1. Open Terminal from "Applications->Accessories->Terminal"
    > > 2. copy-paste the following command into the Terminal:
    > > gksudo gedit /etc/init.d/alsa-utils
    > > 3. Replace the following line (which is line 372 in the 
    > > /etc/init.d/alsa-utils file):
    > > mute_and_zero_levels "$TARGET_CARD" || EXITSTATUS=1
    > > with the following line:
    > > # mute_and_zero_levels "$TARGET_CARD" || EXITSTATUS=1
    > > So you need to comment out that line to prevent the script from muting 
    > > your soundcard during boot.
    > > 4. Reboot and recheck mixer settings
    > > 
    > Unbelievable. Who on earth thought that resetting sound levels to zero on shut 
    > down *and muting them* was a good idea in the first place?

But wait a minute here.  Below is what appears to be the relevant
section from /etc/init.d/alsa-utils in my Ubuntu 9.10 (-not-
MythBuntu; I don't know if that makes a difference).

Yes, it looks like they're muting when alsa is stopped.  But it also
appears that they're attempting to reset the levels on start; there's
a bunch of other logic in there to save/restore.  (I have done zero
other debugging on this since it's not my issue, but it shouldn't be
hard for someone to trace through the calls in the init script.)

In short, while muting on shutdown does seem weird, it looks like the
real bug is the failure to restore levels on reboot.  (Unless the OP
is shutting down alsa and -not- rebooting and then checking levels,
but I don't think he said he was doing this.)

I still think something's buggy either in restoration in general (but
I suspect there'd be a ton of bug reports lodged against it) or on the
OP's machine in particular (file permissions? something else?)

I'd imagine other MythBuntu users would be complaining of this, too,
if the problem was that muting wasn't being undone on reboot.  Are they?

case "$1" in
  start)
	EXITSTATUS=0
	TARGET_CARD="$2"
	case "$TARGET_CARD" in
	  ""|all) TARGET_CARD=all ; log_action_begin_msg "Setting up ALSA" ;;
	esac
	if ! card_OK "$TARGET_CARD"; then
		[ "$TARGET_CARD" = "all" ] && log_action_end_msg "$( [ ! "$2" ] ; echo $? ; )" "none loaded"
		exit $?
	fi
	preinit_levels "$TARGET_CARD" || EXITSTATUS=1
	if ! restore_levels "$TARGET_CARD" ; then
		sanify_levels "$TARGET_CARD" || EXITSTATUS=1
		restore_levels "$TARGET_CARD" >/dev/null 2>&1 || :
	fi
	[ "$TARGET_CARD" = "all" ] && log_action_end_msg_and_exit "$EXITSTATUS"
	exit $EXITSTATUS
	;;
  stop)
	EXITSTATUS=0
	TARGET_CARD="$2"
	case "$TARGET_CARD" in
	  ""|all) TARGET_CARD=all ; log_action_begin_msg "Shutting down ALSA" ;;
	  *) log_action_begin_msg "Shutting down ALSA card ${TARGET_CARD}" ;;
	esac
	card_OK "$TARGET_CARD" || log_action_end_msg_and_exit "$( [ ! "$2" ] ; echo $? ; )" "none loaded"
	store_levels "$TARGET_CARD" || EXITSTATUS=1
	mute_and_zero_levels "$TARGET_CARD" || EXITSTATUS=1
	log_action_end_msg_and_exit "$EXITSTATUS"
	;;
  restart|force-reload)
	EXITSTATUS=0
	$0 stop || EXITSTATUS=1
	$0 start || EXITSTATUS=1
	exit $EXITSTATUS
	;;
  reset)
	TARGET_CARD="$2"
	case "$TARGET_CARD" in
	  ""|all) TARGET_CARD=all ; log_action_begin_msg "Resetting ALSA" ;;
	  *) log_action_begin_msg "Resetting ALSA card ${TARGET_CARD}" ;;
	esac
	card_OK "$TARGET_CARD" || log_action_end_msg_and_exit "$( [ ! "$2" ] ; echo $? ; )" "none loaded"
	preinit_levels "$TARGET_CARD"
	sanify_levels "$TARGET_CARD"
	log_action_end_msg_and_exit "$?"
	;;
  *)
	echo "Usage: $MYNAME {start [CARD]|stop [CARD]|restart [CARD]|reset [CARD]}" >&2
	exit 3
	;;
esac


More information about the mythtv-users mailing list