NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/59719 (emuxki(4) panics during attach)



The following reply was made to PR kern/59719; it has been noted by GNATS.

From: nia <nia%NetBSD.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/59719 (emuxki(4) panics during attach)
Date: Fri, 24 Oct 2025 10:22:13 +0000

 --F9G0s+KdhNGwsJWW
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 This patch appears to be enough to get the sound card to attach without
 panicking. It was derived by inspecting the other BSDs' code, and
 realizing that the A2_SPDIF sample rate shouldn't be initialized here
 for CA0108, but rather the A_SPDIF.
 
 The sound card does emit a loud extremely high pitched scream, enough
 to wake up every dog in the neighbourhood. Mixer controls seem to
 have no effect. So there's still something wrong with initialization,
 probably.
 
 --F9G0s+KdhNGwsJWW
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=emuxki.diff
 
 Index: emuxki.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/emuxki.c,v
 retrieving revision 1.79
 diff -u -p -r1.79 emuxki.c
 --- emuxki.c	8 Jun 2024 21:02:29 -0000	1.79
 +++ emuxki.c	24 Oct 2025 10:19:20 -0000
 @@ -604,9 +604,13 @@ emuxki_init(struct emuxki_softc *sc)
  	emuxki_write(sc, 0, EMU_SPCS2, spcs);
  
  	if (sc->sc_type & EMUXKI_AUDIGY2_CA0108) {
 +		uint32_t sr;
 +
  		/* Setup SRCMulti_I2S SamplingRate */
 -		emuxki_write(sc, 0, EMU_A2_SPDIF_SAMPLERATE,
 -		    emuxki_read(sc, 0, EMU_A2_SPDIF_SAMPLERATE) & 0xfffff1ff);
 +		sr = emuxki_read(sc, 0, EMU_A_SPDIF_SAMPLERATE);
 +		sr &= 0xfffff1ff;
 +		sr |= 0x400; /* 96 KHz */
 +		emuxki_write(sc, 0, EMU_A_SPDIF_SAMPLERATE, sr);
  
  		/* Setup SRCSel (Enable SPDIF, I2S SRCMulti) */
  		emuxki_writeptr(sc, EMU_A2_PTR, EMU_A2_DATA, EMU_A2_SRCSEL,
 
 --F9G0s+KdhNGwsJWW--
 


Home | Main Index | Thread Index | Old Index