Re: Is anyone using btaudio without latency?

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



On Mon, 26 Nov 2001, Brian J. Murrell wrote:

> Is anyone successfully using btaudio?  What version (exactly) and what
> if any module parameters are you passing when you load it?

OK - I'm using the btaudio that came from Gerd's bttv-0.7.80, with the
following patch.

I do find that my audio drifts perhaps .1 of a second in 15 minutes.  I've
got used to trimming it as I play with mplayer, but keep meaning to
investigate why.  I've been assuming that my GETISPACE implementation
below is wrong.

Steve


--- bttv-0.7.80-orig/driver/btaudio.c	Fri Sep 14 14:52:29 2001
+++ bttv-0.7.80/driver/btaudio.c	Sun Oct  7 16:03:22 2001
@@ -757,6 +757,25 @@
         case SNDCTL_DSP_SYNC:
 		/* NOP */
 		return 0;
+	case SNDCTL_DSP_GETISPACE:
+	{
+		audio_buf_info info;
+		if (!bta->recording) return -EINVAL;
+		info.fragsize = bta->block_bytes>>bta->sampleshift;
+		info.fragstotal = bta->block_count;
+		info.bytes = bta->read_count;
+		info.fragments = info.bytes / info.fragsize;
+#if 0
+		if (debug) {
+			printk(KERN_DEBUG "btaudio: SNDCTL_DSP_GETISPACE returning"
+			       " fragsize=%d, fragstotal=%d bytes=%d fragments=%d\n",
+			       info.fragsize, info.fragstotal, info.bytes, info.fragments);
+		}
+#endif
+		if (copy_to_user((void *)arg, &info, sizeof(info)))
+			return -EFAULT;
+		return 0;
+	}
 #if 0 /* TODO */
         case SNDCTL_DSP_GETTRIGGER:
         case SNDCTL_DSP_SETTRIGGER:





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux