Subject: Re: CD Audio and ESS 1868
To: Jared D. McNeill <shaded@linuxmafia.org>
From: Charles M. Hannum <root@ihack.net>
List: port-i386
Date: 12/02/1999 12:15:49
"Jared D. McNeill" <shaded@linuxmafia.org> writes:

> I was wondering if anybody else was having this problem; CD audio is muted
> for me unless /dev/audio is open. Whenever i want to listen to a CD I have
> to run 'cat /dev/zero >/dev/audio' and leave it going while the CD plays.

This is because the master volume is muted when the device is closed.
Could you try the following patch?

Index: ess.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/isa/ess.c,v
retrieving revision 1.48
diff -c -2 -r1.48 ess.c
*** ess.c	1999/11/02 17:05:05	1.48
--- ess.c	1999/12/02 17:15:27
***************
*** 2422,2428 ****
  	struct ess_softc *sc;
  {
! 	/* Disable mute on left- and right-master volume. */
! 	ess_clear_mreg_bits(sc, ESS_MREG_VOLUME_LEFT, ESS_VOLUME_MUTE);
! 	ess_clear_mreg_bits(sc, ESS_MREG_VOLUME_RIGHT, ESS_VOLUME_MUTE);
  }
  
--- 2422,2427 ----
  	struct ess_softc *sc;
  {
! 	/* Unmute the DAC. */
! 	ess_set_gain(sc, ESS_DAC_PLAY_VOL, 1);
  }
  
***************
*** 2431,2437 ****
  	struct ess_softc *sc;
  {
! 	/* Enable mute on left- and right-master volume. */
! 	ess_set_mreg_bits(sc, ESS_MREG_VOLUME_LEFT, ESS_VOLUME_MUTE);
! 	ess_set_mreg_bits(sc, ESS_MREG_VOLUME_RIGHT, ESS_VOLUME_MUTE);
  }
  
--- 2430,2435 ----
  	struct ess_softc *sc;
  {
! 	/* Mute the DAC. */
! 	ess_set_gain(sc, ESS_DAC_PLAY_VOL, 0);
  }