[PATCH] Re: [Fwd: Re: [mythtv] Your soundcard is not reporting free space correctly.]

Isaac Richards ijr at po.cwru.edu
Sat Mar 27 15:02:27 EST 2004

On Saturday 27 March 2004 12:22 pm, Ann Patterson wrote:
> On Tue, 2004-03-09 at 19:32, Ann Patterson wrote:
> > On Mon, 2004-03-08 at 08:15, Ann Patterson wrote:
> > > After even more debugging, and a reading of the OSS docs, I discovered
> > > that the values returned from ioctl(audio_fd, SNDCTL_DSP_GETOSPACE,
> > > &info) are undefined if you're not writing full fragments to the card.
> > > For every other card I tested, the values returned from this call were
> > > fine, even when writing partial fragments. But when I ran this with the
> > > M-Audio card, the values are all over the place. I was able to
> > > duplicate the problem with the alsa osstest program, writing blocks of
> > > 1000 bytes. When I changed the osstest program to write 4096 bytes
> > > (this card's fragsize), the problem went away.
> > >
> > > Ann P.
> >
> > Here's a patch that sets the fragment size on the card to a reasonable
> > value, then writes the audio in full fragments. It fixes the problems
> > I'm having with the M-Audio card. I don't think it should hurt anything
> > else.
> >
> > Ann P.
> I submitted this patch a couple of weeks ago, and it got ignored.
> Recently, I've been getting emails from other people who have the same
> card, asking when the patch is going to be applied to CVS. This (or
> something similar) is required for this particular M-Audio card to work
> correctly with mythtv.

I didn't apply it because it hadn't sounded like you tested it very much, and 
there were no reports of anyone else using it, either.  As it changes 
behavior for _everyone_, I think it needs at least a little testing before 
going into CVS.


More information about the mythtv-dev mailing list