On Tue, 2004-03-02 at 19:39, Ann Patterson wrote:
> On Mon, 2004-03-01 at 00:17, Jaroslav Kysela wrote:
> > On Sun, 29 Feb 2004, Ann Patterson wrote:
> > 
> > > I installed a M-Audio Revolution 7.1 (snd-ice1724) in my mythtv box. I
> > > had mythtv working fine with the machine's onboard sound (snd-trident)
> > > using OSS emulation. The revo works correctly for things like xine,
> > > mplayer, aplay (of course), play, etc. In mythtv, however, I get no
> > > sound. 
> > > 
> > > I dug into the mythtv code, and found that it is doing a call to
> > > ioctl(audiofd, SNDCTL_DSP_GETOSPACE, &info) and using the info.bytes
> > > value that is returned to determine whether or not to write to the card.
> > > The first call to SNDCTL_DSP_GETOSPACE appears to return a reasonable
> > > number, but from that point, the numbers returned are all over the
> > > place, and are often negative. So, mythtv, of course, won't write to the
> > > card. I find that if I comment out the code that checks the values
> > > returned from GETOSPACE, I get sound, but it is out of sync with the
> > > video (sound slightly behind video).
> > > 
> > 
> > Can you write a nice small test code which shows this problem? You may 
> > modify code in alsa-oss/test/osstest.c .
> > 
> >                                             Jaroslav
<snip>
> 
> Let me know if you need anything else, or if I'm doing something wrong.
> 
> Ann P.
> 

I have this sorted out. According to the OSS docs, the values returned
by SNDCTL_DSP_GETOSPACE are only defined if the application is writing
full fragments. Mythtv was writing partial fragments, then checking the
value returned from GETOSPACE. For pretty much every other card, this
works fine. For the M-Audio card, bad things happen. When I changed
mythtv to write full fragments, the problem went away.

Ann P.



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to