Mailing List archive

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

[vdr] Re: [ANNOUNCE] bitstreamout plugin 0.61 (sound loop through sound card)



On Thu, Jun 10, 2004 at 09:55:12AM +0200, Norbert Schmidt wrote:
> Hello Werner,
> 
> back again I changed channel.c and replay.c as suggested. Additionally I
> started vdr with LD_ASSUME... but the problem is still there. It always
> hangs with the same tid (114696), even after a reboot. But I have no idea
> wether this means something or not ;-).
> 
> Following your hint about NTPL I did some investigations on gentoo and
> it seems as if glibc is installed without ntpl-support by default.
> 
> This is the output of /lib/libc.so.6:
> 
> GNU C Library stable release version 2.3.3, by Roland McGrath et al.
> Copyright (C) 2004 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
> Compiled by GNU CC version 3.3.3 20040217 (Gentoo Linux 3.3.3, 
> propolice-3.3-7).
> Compiled on a Linux 2.4.21 system on 2004-06-10.
> Available extensions:
>        GNU libio by Per Bothner
>        crypt add-on version 2.1 by Michael Glad and others
>        linuxthreads-0.10 by Xavier Leroy
>        BIND-8.2.3-T5B
>        libthread_db work sponsored by Alpha Processor Inc
>        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/libc/bugs.html>.
> 
> As you can see, no ntpl-support is shown.

Hmmm ... in other words, if you do

          ps aux | grep vdr

you'll several lines of vdr threads? If not you may
use

          ps -um --pid `pidof vdr`

to see NPTL thread list.

Nevertheless, the Forwarding thread of the bitstreamout plugin
is never woken up and the ringbuffer isn't readed.  Or
the Forwarding thread is simply not running.

You may try the patch for bitstreamout attached to this
mail.

> 
> There is something I didn't realized in the messages log before. It is a
> message about "Please fix your driver for proper sysfs support".
> Again: See the log extraction below.
> 
> Is there anything I could do to go deeper into this problem?
> 
> CU Norbert
> 
> 
> Jun 10 09:16:49 amd64 vdr[7352]: assuming manual start of VDR
> Jun 10 09:16:53 amd64 vdr[7358]: CAM: Irdeto SE       , 01, 06FF, 06FF
> Jun 10 09:17:29 amd64 vdr[7362]: Bufferoverlow
> Jun 10 09:17:29 amd64 vdr[7362]: Bufferoverlow
> Jun 10 09:17:30 amd64 vdr[7362]: Bufferoverlow
> Jun 10 09:17:30 amd64 vdr[7362]: Bufferoverlow
> Jun 10 09:17:30 amd64 vdr[7362]: Bufferoverlow
> Jun 10 09:17:30 amd64 vdr[7362]: Bufferoverlow
> Jun 10 09:17:30 amd64 vdr[7362]: Bufferoverlow
> Jun 10 09:17:30 amd64 vdr[7362]: Bufferoverlow
> Jun 10 09:17:30 amd64 vdr[7362]: Bufferoverlow
> Jun 10 09:17:31 amd64 vdr[7362]: Bufferoverlow
> Jun 10 09:17:31 amd64 vdr[7362]: Bufferoverlow
> Jun 10 09:17:31 amd64 vdr[7352]: switching to channel 5
> Jun 10 09:17:31 amd64 vdr[7362]: receiver on device 1 thread ended (pid=7362, tid=98311)
> Jun 10 09:17:33 amd64 vdr[7352]: ERROR: thread 114696 won't end (waited 1 seconds) - cancelling it...
> Jun 10 09:17:33 amd64 vdr[7352]: INSTREAM: Forwarding bitstream thread was broken


          Werner

-- 
AC3 loop through sound card http://bitstreamout.sourceforge.net/
Howto http://www.vdr-portal.de/board/thread.php?threadid=1958
------------------------------------------------------------------
 "Having a smoking section in a restaurant is like having
         a  peeing section in a swimming pool." -- Edward Burr
diff -urN bitstreamout-0.61/Make.arch bitstreamout/Make.arch
--- bitstreamout-0.61/Make.arch	Thu Jun  3 15:00:51 2004
+++ bitstreamout/Make.arch	Sun Jun  6 13:56:52 2004
@@ -7,6 +7,7 @@
 
 my::
 
+ifeq ($(ARCH),i386)
 ifneq ($(wildcard /usr/src/linux/.config),)
   -include /usr/src/linux/.config
 else
@@ -17,6 +18,7 @@
 
 ifneq ($(wildcard /usr/src/linux/arch/$(ARCH)/Makefile),)
   -include /usr/src/linux/arch/$(ARCH)/Makefile
+endif
 endif
 
 my::
diff -urN bitstreamout-0.61/bitstreamout.c bitstreamout/bitstreamout.c
--- bitstreamout-0.61/bitstreamout.c	Wed Jun  2 11:34:42 2004
+++ bitstreamout/bitstreamout.c	Sun Jun  6 13:58:06 2004
@@ -42,7 +42,7 @@
 #include "mp2.h"
 #include "shm_memory_tool.h"
 
-static const char *VERSION	 = "0.61";
+static const char *VERSION	 = "0.61a";
 static const char *DESCRIPTION	 = "bit stream out to S/P-DIF of a sound card";
 static const char *MAINMENUENTRY = "Bitstreamout";
 ctrl_t setup = {
@@ -175,9 +175,6 @@
 	shm_free(setup.buf);
     setup.buf = NULL;
 
-#ifdef XXX 
-    mp2.FreeMP2Decoder();
-#endif
 #if 0
     if (rtc) {
         int fd;
@@ -222,9 +219,6 @@
     dts.SetBuffer(setup.buf + SPDIF_START);
     pcm.SetBuffer(setup.buf + SPDIF_START);
     mp2.SetBuffer(setup.buf + SPDIF_START);
-#ifdef XXX
-    mp2.InitMP2Decoder();
-#endif
 
     if (!(ReplayOutSPDif = new cReplayOutSPDif(spdifDev, setup, bounce, SPDIFmute)))
 	goto err;
diff -urN bitstreamout-0.61/channel.c bitstreamout/channel.c
--- bitstreamout-0.61/channel.c	Thu Jun  3 12:22:27 2004
+++ bitstreamout/channel.c	Mon Jun  7 14:13:57 2004
@@ -81,7 +81,6 @@
     debug_chl("%s %d (%s)\n", __FUNCTION__, __LINE__, onoff ? "on" : "off");
 
     if (onoff) {
-	LOCK_THREAD;
 	if (*spdifDev)
 	    goto out;		// An other has opened the S/P-DIF
 	if (test_setup(RESET)) {
@@ -92,7 +91,7 @@
 	    goto out;
 	set_flag(ACTIVE);
 	set_setup(LIVE);
-	Start();
+	Start();				// Warning: Start() sleeps 10ms after work
     } else {
 	int n = 500;				// 500 ms
 
@@ -110,6 +109,7 @@
 	    esyslog("INSTREAM: Forwarding bitstream thread was broken");
 	    usleep(1000);
 	    if (stream) {			// thread broken
+		LOCK_THREAD;
 		spdifDev->Close();
 		clear_flag(BOUNDARY);
 		stream->Reset();
@@ -121,8 +121,8 @@
 	ResetScan(true);
 	clear_setup(LIVE);
 	stream = NULL;
+	pthread_yield();
     }
-    pthread_yield();
 out:
     return;
 }
@@ -149,6 +149,7 @@
 
 	if (test_setup(MUTE)) {
 	    if (!test_flag(WASMUTED)) {
+		LOCK_THREAD;
 		spdifDev->Clear();
 		clear_flag(BOUNDARY);
 		bounce->flush();
@@ -167,6 +168,7 @@
 
 	if (test_setup(MUTE)) {
 	    if (!test_flag(WASMUTED)) {
+		LOCK_THREAD;
 		spdifDev->Clear();
 		clear_flag(BOUNDARY);
 		bounce->flush();
@@ -618,11 +620,10 @@
 	onoff = false;
 
     if (onoff) {
-	LOCK_THREAD;
 	if (test_flag(ACTIVE))
 	    goto out;
 	set_flag(ACTIVE);
-	Start();
+	Start();				// Warning: Start() sleeps 10ms after work
     } else {
 	int n = 500;				// 500 ms
 
@@ -640,8 +641,8 @@
 	    ctrl.Unlock();
 	    clear_flag(RUNNING);		// Should not happen
 	}
+	pthread_yield();
     }
-    pthread_yield();
 out:
     return;
 }
diff -urN bitstreamout-0.61/replay.c bitstreamout/replay.c
--- bitstreamout-0.61/replay.c	Thu Jun  3 14:53:41 2004
+++ bitstreamout/replay.c	Mon Jun  7 14:13:06 2004
@@ -67,7 +67,6 @@
 	onoff = false;
 
     if (onoff) {
-	LOCK_THREAD;
 	if (*spdifDev) {
 	    debug("Activated failed due S/P-DIF already open\n");
 	    goto out;		// An other has opened the S/P-DIF
@@ -81,7 +80,7 @@
 	    goto out;
 	}
 	set_flag(ACTIVE);
-	Start();
+	Start();				// Warning: Start() sleeps 10ms after work
 	debug("Activated\n");
     } else {
 	int n = 500;				// 500 ms
@@ -100,6 +99,7 @@
 	    esyslog("REPLAY: Forwarding bitstream thread was broken");
 	    usleep(1000);
 	    if (stream) {                       // thread broken
+		LOCK_THREAD;
 		spdifDev->Close();
 		clear_flag(BOUNDARY);
 		stream->Reset();
@@ -109,9 +109,9 @@
 	}
 
 	stream = NULL;
+	pthread_yield();
 	debug("DeActivated\n");
     }
-    pthread_yield();
 out:
     return;
 }
@@ -137,6 +137,7 @@
 
 	if (test_setup(MUTE)) {
 	    if (!test_flag(WASMUTED)) {
+		LOCK_THREAD;
 		spdifDev->Clear();
 		clear_flag(BOUNDARY);
 		bounce->flush();
@@ -153,6 +154,7 @@
 
 	if (test_setup(MUTE)) {
 	    if (!test_flag(WASMUTED)) {
+		LOCK_THREAD;
 		spdifDev->Clear();
 		clear_flag(BOUNDARY);
 		bounce->flush();
@@ -593,11 +595,14 @@
 
     debug("cReplayOutSPDif::Clear() called\n");
     (void)Activate(false);
-    stream = NULL;
-    bounce->flush();
-    bounce->signal();
-    clear_flag(BOUNDARY);
-    clear_setup(STILLPIC);
+    {
+	LOCK_THREAD;
+	stream = NULL;
+	bounce->flush();
+	bounce->signal();
+	clear_flag(BOUNDARY);
+	clear_setup(STILLPIC);
+    }
     if (PrimaryDevice)
 	Mute(PrimaryDevice->IsMute());
 }
diff -urN bitstreamout-0.61/vdr-1.2.6-audio.dif bitstreamout/vdr-1.2.6-audio.dif
--- bitstreamout-0.61/vdr-1.2.6-audio.dif	Fri Jun  4 12:49:53 2004
+++ bitstreamout/vdr-1.2.6-audio.dif	Sun Jun  6 13:59:23 2004
@@ -1,6 +1,6 @@
 --- Make.arch
-+++ Make.arch	2004-06-03 15:00:51.000000000 +0200
-@@ -0,0 +1,23 @@
++++ Make.arch	2004-06-06 13:56:52.000000000 +0200
+@@ -0,0 +1,25 @@
 +#
 +# Get the optimization of the used kernel
 +#
@@ -10,6 +10,7 @@
 +
 +my::
 +
++ifeq ($(ARCH),i386)
 +ifneq ($(wildcard /usr/src/linux/.config),)
 +  -include /usr/src/linux/.config
 +else
@@ -20,6 +21,7 @@
 +
 +ifneq ($(wildcard /usr/src/linux/arch/$(ARCH)/Makefile),)
 +  -include /usr/src/linux/arch/$(ARCH)/Makefile
++endif
 +endif
 +
 +my::

Home | Main Index | Thread Index