Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: AW: VDR: first step towards AC3 sound
Guido Fiala wrote:
>
> On Sunday, 24. June 2001 11:00, Klaus Schmidinger wrote:
> > Andreas Vitting wrote:
> > > I have tried it out, but i can get no data! The command -a works, the
> > > ac3play starts, but no data was send to it. I have also tried your
> > > command -a "cat > vdr.ac3" but the file keeps empty. I'm using the newest
> > > cvs dvb api and your patch was successful read in. The records are new
> > > and from different channels.
> > > With the dvdplayer and the dvb card my ac3 works ok.
> > > Also, what's wrong ??
> >
> > Please make sure that the channel you are recording has the "Dpid1"
> > parameter set in the channel setup, and also that the channel actually
> > broadcasts AC3 sound. So far the only FTA channel I know of that does this
> > is Pro7, and its Dpid1 is 257. This works for me (at least I get the data,
> > since I don't have any AC3 equipment I can't actually replay it).
>
> Have exactly the same problem and the DPID1 is set (i took your
> channels.conf), /var/log/messages shows a couple of
>
> Jun 24 11:06:17 wonderbox vdr[819]: ERROR: wrote 968 byte to dolby device
> instead of 1806
> Jun 24 11:06:17 wonderbox vdr[819]: ERROR: wrote 484 byte to dolby device
> instead of 1806
Looks like 'ac3play' doesn't accept the entire data packet at once.
I thought that the pipe would be opened in blocking mode, but maybe that
was a false assumption.
Please try the following patch to the dvbapi.c file:
--- dvbapi.c.003 Sat Jun 23 18:27:49 2001
+++ dvbapi.c Sun Jun 24 11:41:30 2001
@@ -808,12 +808,17 @@
switch (c) {
case 0xBD: // dolby
if (Except && dolbyDev) {
- int w = fwrite(&b[i], 1, l, dolbyDev);
- if (w < 0) {
- LOG_ERROR;
- }
- else if (w != l)
- esyslog(LOG_ERR, "ERROR: wrote %d byte to dolby device instead of %d", w, l);
+ int written = 0;
+ int n = l;
+ while (n > 0) {
+ int w = fwrite(&b[i + written], 1, n, dolbyDev);
+ if (w < 0) {
+ LOG_ERROR;
+ break;
+ }
+ n -= w;
+ written += w;
+ }
}
// continue with deleting the data - otherwise it disturbs DVB replay
case 0xC0 ... 0xC1: // audio
> I assume Pro7 sends AC3-stream all the time? How can i know that they
> actually do?
They always send data on PID 257 (at least as far as I have observed).
You can use my little 'xlist.c' program to dump a recorded file and see
if it contains "dolby" packets (see ftp://ftp.cadsoft.de/pub/people/kls/vdr/xlist.c).
Klaus
--
_______________________________________________________________
Klaus Schmidinger Phone: +49-8635-6989-10
CadSoft Computer GmbH Fax: +49-8635-6989-40
Hofmark 2 Email: kls@cadsoft.de
D-84568 Pleiskirchen, Germany URL: www.cadsoft.de
_______________________________________________________________
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index