Roland Praml wrote: > > Your description of what you do is rather vague. Assuming you > > write audio to /dev/dvb/adapterX/audioY and video to > > /dev/dvb/adapterX/videoY, why don't you use nonblocking I/O? > > Yes thats right, I open the devices with O_NONBLOCK and I poll > each device to see if i can write new data. But it seems that the > AUDIO device blocks also if there is enough video-data sent. > (and the other way round)
Well, if you open the devices with O_NONBLOCK write() should never block... > btw. it doesn't matter if I fed the audio-LPCM frames in the > audio or video device, because the data stream is demultiplexed > in somewher the AV7110 again, and if the demx buffer is full > both devices are blocked. I assume by "block" you mean that poll() isn't woken up? The ability to write multiplexed audio/video PES into the video device complicates the logic for poll() (see av7110_av.c, dvb_audio_poll() and dvb_video_poll() and FREE_COND). But ultimately it is an API issue that you cannot specify whether you want to write multiplexd a/v to one device or both seperately, so the wake-up conditions in *_poll() cannot be fixed. Or so I think. BTW: The firmware requests audio and video data when it has enough free buffer space (see case DATA_MPEG_PLAY in gpioirq() in av7110.c, bits 8 and 9 in av7110->debitype request audio/video). If you fail to provide data, then the CPU will spent a lot of time handling useless gpioirqs... HTH, Johannes