On Sun, Dec 14, 2008 at 06:09:24PM +0100, Martin Toft wrote:
> A small follow-up:
> 
> The problem only occurs when opening the audio device. If I queue a
> number of tracks in mpd's playlist and let it play, then it does not
> suddenly start making noise from one track to the next. It only happens
> when I manually start a track (and only sometimes). I suspect that mpd
> does not close the audio device between tracks if it is playing from its
> playlist, and that is probably why the problem does not occur in that
> setting.
> 
> Martin
> 

sorry for the delay.  can you see if this fixes the problem?

something of a guess, but the addition of S/PDIF support is the only
change that fits the timeline of when it was working and when
the problem started.  (and if you look at ac97.c just a few lines down
from this patch, you'll see the XXX-is-this-right? comment I added
when bringing in S/PDIF support from NetBSD ...)

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: ac97.c
===================================================================
RCS file: /home2/cvs/OpenBSD/src/sys/dev/ic/ac97.c,v
retrieving revision 1.70
diff -u -r1.70 ac97.c
--- ac97.c      23 Oct 2008 21:50:01 -0000      1.70
+++ ac97.c      19 Jan 2009 10:07:44 -0000
@@ -878,6 +878,13 @@
 
        as->ac97_clock = AC97_STANDARD_CLOCK;
        ac97_read(as, AC97_REG_EXT_AUDIO_ID, &as->ext_id);
+
+       /* This VIA codec doesn't like the way we enable S/PDIF, so
+        * pretend it doesn't have S/PDIF capabilities.
+        */
+       if (id == 56494182)
+               as->ext_id &= ~(AC97_EXT_AUDIO_SPDIF); 
+
        if (as->ext_id & (AC97_EXT_AUDIO_VRA | AC97_EXT_AUDIO_DRA
                          | AC97_EXT_AUDIO_SPDIF | AC97_EXT_AUDIO_VRM
                          | AC97_EXT_AUDIO_CDAC | AC97_EXT_AUDIO_SDAC

Reply via email to