root/trunk/libffado/src/libstreaming/IsoHandler.cpp

Revision 535, 20.4 kB (checked in by ppalmers, 17 years ago)

fix bug: returning length without setting it to a specific value sometimes prevents stream startup

Line 
1 /*
2  * Copyright (C) 2005-2007 by Pieter Palmers
3  *
4  * This file is part of FFADO
5  * FFADO = Free Firewire (pro-)audio drivers for linux
6  *
7  * FFADO is based upon FreeBoB.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License version 2.1, as published by the Free Software Foundation;
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21  * MA 02110-1301 USA
22  */
23
24 #include "IsoHandler.h"
25 #include "IsoStream.h"
26 #include "cycletimer.h"
27
28 #include "libutil/TimeSource.h"
29 #include "libutil/SystemTimeSource.h"
30
31 #include <errno.h>
32 #include <netinet/in.h>
33 #include <assert.h>
34 #include <unistd.h>
35 #include <string.h>
36
37 #include <iostream>
38 using namespace std;
39
40 #define CC_SLEEP_TIME_AFTER_UPDATE    1000
41 #define CC_SLEEP_TIME_AFTER_FAILURE     10
42 #define CC_DLL_COEFF     ((0.001)*((float)(CC_SLEEP_TIME_AFTER_UPDATE/1000.0)))
43
44 #define CC_MAX_RATE_ERROR           (2.0/100.0)
45 #define CC_INIT_MAX_TRIES 10
46
47
48 namespace Streaming
49 {
50
51 IMPL_DEBUG_MODULE( IsoHandler, IsoHandler, DEBUG_LEVEL_NORMAL );
52
53 /* the C callbacks */
54 enum raw1394_iso_disposition
55 IsoXmitHandler::iso_transmit_handler(raw1394handle_t handle,
56         unsigned char *data, unsigned int *length,
57         unsigned char *tag, unsigned char *sy,
58         int cycle, unsigned int dropped) {
59
60     IsoXmitHandler *xmitHandler=static_cast<IsoXmitHandler *>(raw1394_get_userdata(handle));
61     assert(xmitHandler);
62
63     return xmitHandler->getPacket(data, length, tag, sy, cycle, dropped);
64 }
65
66 enum raw1394_iso_disposition
67 IsoRecvHandler::iso_receive_handler(raw1394handle_t handle, unsigned char *data,
68                         unsigned int length, unsigned char channel,
69                         unsigned char tag, unsigned char sy, unsigned int cycle,
70                         unsigned int dropped) {
71
72     IsoRecvHandler *recvHandler=static_cast<IsoRecvHandler *>(raw1394_get_userdata(handle));
73     assert(recvHandler);
74
75     return recvHandler->putPacket(data, length, channel, tag, sy, cycle, dropped);
76 }
77
78 int IsoHandler::busreset_handler(raw1394handle_t handle, unsigned int generation)
79 {
80     debugOutput( DEBUG_LEVEL_VERBOSE, "Busreset happened, generation %d...\n", generation);
81
82     IsoHandler *handler=static_cast<IsoHandler *>(raw1394_get_userdata(handle));
83     assert(handler);
84     return handler->handleBusReset(generation);
85 }
86
87
88 /* Base class implementation */
89 IsoHandler::IsoHandler(int port)
90    :  m_handle(0), m_handle_util(0), m_port(port),
91    m_buf_packets(400), m_max_packet_size(1024), m_irq_interval(-1),
92    m_packetcount(0), m_dropped(0), m_Client(0),
93    m_State(E_Created)
94 {
95 }
96
97 IsoHandler::IsoHandler(int port, unsigned int buf_packets, unsigned int max_packet_size, int irq)
98    : m_handle(0), m_port(port),
99    m_buf_packets(buf_packets), m_max_packet_size( max_packet_size),
100    m_irq_interval(irq),
101    m_packetcount(0), m_dropped(0), m_Client(0),
102    m_State(E_Created)
103 {
104 }
105
106 IsoHandler::~IsoHandler() {
107
108 // Don't call until libraw1394's raw1394_new_handle() function has been
109 // fixed to correctly initialise the iso_packet_infos field.  Bug is
110 // confirmed present in libraw1394 1.2.1.  In any case,
111 // raw1394_destroy_handle() will do any iso system shutdown required.
112 //     raw1394_iso_shutdown(m_handle);
113
114     if(m_handle) {
115         if (m_State == E_Running) {
116             stop();
117         }
118
119         raw1394_destroy_handle(m_handle);
120     }
121
122     if(m_handle_util) raw1394_destroy_handle(m_handle_util);
123
124 }
125
126 bool IsoHandler::iterate() {
127     debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "IsoHandler (%p) iterate...\n",this);
128
129     if(m_handle) {
130         if(raw1394_loop_iterate(m_handle)) {
131             debugOutput( DEBUG_LEVEL_VERBOSE,
132                  "IsoHandler (%p): Failed to iterate handler: %s\n",
133                  this,strerror(errno));
134             return false;
135         } else {
136             return true;
137         }
138     } else {
139         return false;
140     }
141 }
142
143 bool
144 IsoHandler::init()
145 {
146     debugOutput( DEBUG_LEVEL_VERBOSE, "IsoHandler (%p) enter...\n",this);
147
148     // check the state
149     if(m_State != E_Created) {
150         debugError("Incorrect state, expected E_Created, got %d\n",(int)m_State);
151         return false;
152     }
153
154     // the main handle for the ISO traffic
155     m_handle = raw1394_new_handle_on_port( m_port );
156     if ( !m_handle ) {
157         if ( !errno ) {
158             debugError("libraw1394 not compatible\n");
159         } else {
160             debugError("Could not get 1394 handle: %s\n", strerror(errno) );
161             debugError("Are ieee1394 and raw1394 drivers loaded?\n");
162         }
163         return false;
164     }
165     raw1394_set_userdata(m_handle, static_cast<void *>(this));
166
167     // a second handle for utility stuff
168     m_handle_util = raw1394_new_handle_on_port( m_port );
169     if ( !m_handle_util ) {
170         if ( !errno ) {
171             debugError("libraw1394 not compatible\n");
172         } else {
173             debugError("Could not get 1394 handle: %s\n", strerror(errno) );
174             debugError("Are ieee1394 and raw1394 drivers loaded?\n");
175         }
176
177         raw1394_destroy_handle(m_handle);
178         return false;
179     }
180     raw1394_set_userdata(m_handle_util, static_cast<void *>(this));
181
182     // bus reset handling
183     if(raw1394_busreset_notify (m_handle, RAW1394_NOTIFY_ON)) {
184         debugWarning("Could not enable busreset notification.\n");
185         debugWarning(" Error message: %s\n",strerror(errno));
186         debugWarning("Continuing without bus reset support.\n");
187     } else {
188         // apparently this cannot fail
189         raw1394_set_bus_reset_handler(m_handle, busreset_handler);
190     }
191
192     // test the cycle timer read function
193     int err;
194     uint32_t cycle_timer;
195     uint64_t local_time;
196     err=raw1394_read_cycle_timer(m_handle_util, &cycle_timer, &local_time);
197     if(err) {
198         debugError("raw1394_read_cycle_timer failed.\n");
199         debugError(" Error: %s\n", strerror(err));
200         debugError(" Your system doesn't seem to support the raw1394_read_cycle_timer call\n");
201         return false;
202     }
203
204     // update the internal state
205     m_State=E_Initialized;
206
207     return true;
208 }
209
210 bool IsoHandler::prepare()
211 {
212     debugOutput( DEBUG_LEVEL_VERBOSE, "IsoHandler (%p) enter...\n",this);
213
214     // check the state
215     if(m_State != E_Initialized) {
216         debugError("Incorrect state, expected E_Initialized, got %d\n",(int)m_State);
217         return false;
218     }
219
220     // Don't call until libraw1394's raw1394_new_handle() function has been
221     // fixed to correctly initialise the iso_packet_infos field.  Bug is
222     // confirmed present in libraw1394 1.2.1.
223
224 //     raw1394_iso_shutdown(m_handle);
225
226     m_State = E_Prepared;
227
228     return true;
229 }
230
231 bool IsoHandler::start(int cycle)
232 {
233     debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n");
234
235     // check the state
236     if(m_State != E_Prepared) {
237         debugError("Incorrect state, expected E_Prepared, got %d\n",(int)m_State);
238         return false;
239     }
240
241     m_State=E_Running;
242
243     return true;
244 }
245
246 bool IsoHandler::stop()
247 {
248     debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n");
249
250     // check state
251     if(m_State != E_Running) {
252         debugError("Incorrect state, expected E_Running, got %d\n",(int)m_State);
253         return false;
254     }
255
256     // this is put here to try and avoid the
257     // Runaway context problem
258     // don't know if it will help though.
259     raw1394_iso_xmit_sync(m_handle);
260
261     raw1394_iso_stop(m_handle);
262
263     m_State=E_Prepared;
264
265     return true;
266 }
267
268 /**
269  * Bus reset handler
270  *
271  * @return ?
272  */
273
274 int IsoHandler::handleBusReset(unsigned int generation) {
275     debugOutput( DEBUG_LEVEL_VERBOSE, "bus reset...\n");
276
277
278     return 0;
279 }
280
281 /**
282  * Returns the current value of the cycle timer (in ticks)
283  *
284  * @return the current value of the cycle timer (in ticks)
285  */
286
287 unsigned int IsoHandler::getCycleTimerTicks() {
288     // the new api should be realtime safe.
289     // it might cause a reschedule when turning preemption,
290     // back on but that won't hurt us if we have sufficient
291     // priority
292     int err;
293     uint32_t cycle_timer;
294     uint64_t local_time;
295     err=raw1394_read_cycle_timer(m_handle_util, &cycle_timer, &local_time);
296     if(err) {
297         debugWarning("raw1394_read_cycle_timer: %s\n", strerror(err));
298     }
299     return CYCLE_TIMER_TO_TICKS(cycle_timer);
300 }
301
302 /**
303  * Returns the current value of the cycle timer (as is)
304  *
305  * @return the current value of the cycle timer (as is)
306  */
307
308 unsigned int IsoHandler::getCycleTimer() {
309     // the new api should be realtime safe.
310     // it might cause a reschedule when turning preemption,
311     // back on but that won't hurt us if we have sufficient
312     // priority
313     int err;
314     uint32_t cycle_timer;
315     uint64_t local_time;
316     err=raw1394_read_cycle_timer(m_handle_util, &cycle_timer, &local_time);
317     if(err) {
318         debugWarning("raw1394_read_cycle_timer: %s\n", strerror(err));
319     }
320     return cycle_timer;
321 }
322
323 void IsoHandler::dumpInfo()
324 {
325
326     int channel=-1;
327     if (m_Client) channel=m_Client->getChannel();
328
329     debugOutputShort( DEBUG_LEVEL_NORMAL, "  Handler type    : %s\n",
330             (this->getType()==EHT_Receive ? "Receive" : "Transmit"));
331     debugOutputShort( DEBUG_LEVEL_NORMAL, "  Port, Channel   : %2d, %2d\n",
332             m_port, channel);
333     debugOutputShort( DEBUG_LEVEL_NORMAL, "  Packet count    : %10d (%5d dropped)\n",
334             this->getPacketCount(), this->getDroppedCount());
335 }
336
337 void IsoHandler::setVerboseLevel(int l)
338 {
339     setDebugLevel(l);
340 }
341
342 bool IsoHandler::registerStream(IsoStream *stream)
343 {
344     assert(stream);
345     debugOutput( DEBUG_LEVEL_VERBOSE, "registering stream (%p)\n", stream);
346
347     if (m_Client) {
348             debugFatal( "Generic IsoHandlers can have only one client\n");
349             return false;
350     }
351
352     m_Client=stream;
353
354     m_Client->setHandler(this);
355
356     return true;
357
358 }
359
360 bool IsoHandler::unregisterStream(IsoStream *stream)
361 {
362     assert(stream);
363     debugOutput( DEBUG_LEVEL_VERBOSE, "unregistering stream (%p)\n", stream);
364
365     if(stream != m_Client) {
366             debugFatal( "no client registered\n");
367             return false;
368     }
369
370     m_Client->clearHandler();
371
372     m_Client=0;
373     return true;
374
375 }
376
377 /* Child class implementations */
378
379 IsoRecvHandler::IsoRecvHandler(int port)
380                 : IsoHandler(port)
381 {
382     debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n");
383 }
384 IsoRecvHandler::IsoRecvHandler(int port, unsigned int buf_packets,
385                                unsigned int max_packet_size, int irq)
386                 : IsoHandler(port, buf_packets,max_packet_size,irq)
387 {
388     debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n");
389
390 }
391 IsoRecvHandler::~IsoRecvHandler()
392 {
393
394 }
395
396 bool
397 IsoRecvHandler::init() {
398     debugOutput( DEBUG_LEVEL_VERBOSE, "init recv handler %p\n",this);
399
400     if(!(IsoHandler::init())) {
401         return false;
402     }
403     return true;
404
405 }
406
407 enum raw1394_iso_disposition IsoRecvHandler::putPacket(
408                     unsigned char *data, unsigned int length,
409                     unsigned char channel, unsigned char tag, unsigned char sy,
410                     unsigned int cycle, unsigned int dropped) {
411
412     debugOutput( DEBUG_LEVEL_VERY_VERBOSE,
413                  "received packet: length=%d, channel=%d, cycle=%d\n",
414                  length, channel, cycle );
415     m_packetcount++;
416     m_dropped+=dropped;
417
418     if(m_Client) {
419         return m_Client->putPacket(data, length, channel, tag, sy, cycle, dropped);
420     }
421
422     return RAW1394_ISO_OK;
423 }
424
425 bool IsoRecvHandler::prepare()
426 {
427
428     // prepare the generic IsoHandler
429     if(!IsoHandler::prepare()) {
430         return false;
431     }
432
433     debugOutput( DEBUG_LEVEL_VERBOSE, "Preparing iso receive handler (%p)\n",this);
434     debugOutput( DEBUG_LEVEL_VERBOSE, " Buffers         : %d \n",m_buf_packets);
435     debugOutput( DEBUG_LEVEL_VERBOSE, " Max Packet size : %d \n",m_max_packet_size);
436     debugOutput( DEBUG_LEVEL_VERBOSE, " Channel         : %d \n",m_Client->getChannel());
437     debugOutput( DEBUG_LEVEL_VERBOSE, " Irq interval    : %d \n",m_irq_interval);
438
439     if(m_irq_interval > 1) {
440         if(raw1394_iso_recv_init(m_handle,
441                                 iso_receive_handler,
442                                 m_buf_packets,
443                                 m_max_packet_size,
444                                 m_Client->getChannel(),
445                                 RAW1394_DMA_BUFFERFILL,
446                                 m_irq_interval)) {
447             debugFatal("Could not do receive initialisation!\n" );
448             debugFatal("  %s\n",strerror(errno));
449
450             return false;
451         }
452     } else {
453         if(raw1394_iso_recv_init(m_handle,
454                                 iso_receive_handler,
455                                 m_buf_packets,
456                                 m_max_packet_size,
457                                 m_Client->getChannel(),
458                                 RAW1394_DMA_PACKET_PER_BUFFER,
459                                 m_irq_interval)) {
460             debugFatal("Could not do receive initialisation!\n" );
461             debugFatal("  %s\n",strerror(errno));
462
463             return false;
464         }
465     }
466     return true;
467 }
468
469 bool IsoRecvHandler::start(int cycle)
470 {
471     debugOutput( DEBUG_LEVEL_VERBOSE, "start on cycle %d\n", cycle);
472
473     // start the generic IsoHandler
474     if(!IsoHandler::start(cycle)) {
475         return false;
476     }
477
478     if(raw1394_iso_recv_start(m_handle, cycle, -1, 0)) {
479         debugFatal("Could not start receive handler (%s)\n",strerror(errno));
480         return false;
481     }
482     return true;
483 }
484
485 int IsoRecvHandler::handleBusReset(unsigned int generation) {
486     debugOutput( DEBUG_LEVEL_VERBOSE, "handle bus reset...\n");
487
488     //TODO: implement busreset
489
490     // pass on the busreset signal
491     if(IsoHandler::handleBusReset(generation)) {
492         return -1;
493     }
494     return 0;
495 }
496
497 /* ----------------- XMIT --------------- */
498
499 IsoXmitHandler::IsoXmitHandler(int port)
500                 : IsoHandler(port), m_prebuffers(0)
501 {
502     debugOutput( DEBUG_LEVEL_VERBOSE, "IsoXmitHandler enter...\n");
503
504 }
505 IsoXmitHandler::IsoXmitHandler(int port, unsigned int buf_packets,
506                                unsigned int max_packet_size, int irq)
507                 : IsoHandler(port, buf_packets, max_packet_size,irq),
508                   m_speed(RAW1394_ISO_SPEED_400), m_prebuffers(0)
509 {
510     debugOutput( DEBUG_LEVEL_VERBOSE, "IsoXmitHandler enter...\n");
511
512 }
513 IsoXmitHandler::IsoXmitHandler(int port, unsigned int buf_packets,
514                                unsigned int max_packet_size, int irq,
515                                enum raw1394_iso_speed speed)
516                 : IsoHandler(port, buf_packets,max_packet_size,irq),
517                   m_speed(speed), m_prebuffers(0)
518 {
519     debugOutput( DEBUG_LEVEL_VERBOSE, "IsoXmitHandler enter...\n");
520
521 }
522
523 IsoXmitHandler::~IsoXmitHandler()
524 {
525     // handle cleanup is done in the IsoHanlder destructor
526 }
527
528 bool
529 IsoXmitHandler::init() {
530
531     debugOutput( DEBUG_LEVEL_VERBOSE, "init xmit handler %p\n",this);
532
533     if(!(IsoHandler::init())) {
534         return false;
535     }
536
537     return true;
538 }
539
540 bool IsoXmitHandler::prepare()
541 {
542     debugOutput( DEBUG_LEVEL_VERBOSE, "Preparing iso transmit handler (%p, client=%p)\n",this,m_Client);
543
544     if(!(IsoHandler::prepare())) {
545         return false;
546     }
547
548     debugOutput( DEBUG_LEVEL_VERBOSE, " Buffers         : %d \n",m_buf_packets);
549     debugOutput( DEBUG_LEVEL_VERBOSE, " Max Packet size : %d \n",m_max_packet_size);
550     debugOutput( DEBUG_LEVEL_VERBOSE, " Channel         : %d \n",m_Client->getChannel());
551     debugOutput( DEBUG_LEVEL_VERBOSE, " Speed           : %d \n",m_speed);
552     debugOutput( DEBUG_LEVEL_VERBOSE, " Irq interval    : %d \n",m_irq_interval);
553
554     if(raw1394_iso_xmit_init(m_handle,
555                              iso_transmit_handler,
556                              m_buf_packets,
557                              m_max_packet_size,
558                              m_Client->getChannel(),
559                              m_speed,
560                              m_irq_interval)) {
561         debugFatal("Could not do xmit initialisation!\n" );
562
563         return false;
564     }
565
566     return true;
567 }
568
569 bool IsoXmitHandler::start(int cycle)
570 {
571     debugOutput( DEBUG_LEVEL_VERBOSE, "start on cycle %d, %d prebuffers\n",
572         cycle, m_prebuffers);
573
574     if(!(IsoHandler::start(cycle))) {
575         return false;
576     }
577
578     if(raw1394_iso_xmit_start(m_handle, cycle, m_prebuffers)) {
579         debugFatal("Could not start xmit handler (%s)\n",strerror(errno));
580         return false;
581     }
582     return true;
583 }
584
585 enum raw1394_iso_disposition IsoXmitHandler::getPacket(
586                     unsigned char *data, unsigned int *length,
587                     unsigned char *tag, unsigned char *sy,
588                     int cycle, unsigned int dropped) {
589
590     debugOutput( DEBUG_LEVEL_VERY_VERBOSE,
591                     "sending packet: length=%d, cycle=%d\n",
592                     *length, cycle );
593     m_packetcount++;
594     m_dropped+=dropped;
595
596     if(m_Client) {
597         return m_Client->getPacket(data, length, tag, sy, cycle, dropped, m_max_packet_size);
598     }
599
600     return RAW1394_ISO_OK;
601 }
602
603 int IsoXmitHandler::handleBusReset(unsigned int generation) {
604     debugOutput( DEBUG_LEVEL_VERBOSE, "bus reset...\n");
605     //TODO: implement busreset
606
607     // pass on the busreset signal
608     if(IsoHandler::handleBusReset(generation)) {
609             return -1;
610     }
611
612     return 0;
613 }
614
615 }
616
617 /* multichannel receive  */
618 #if 0
619 IsoRecvHandler::IsoRecvHandler(int port)
620         : IsoHandler(port)
621 {
622     debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n");
623 }
624 IsoRecvHandler::IsoRecvHandler(int port, unsigned int buf_packets,
625                                unsigned int max_packet_size, int irq)
626         : IsoHandler(port, buf_packets,max_packet_size,irq)
627 {
628     debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n");
629
630 }
631 IsoRecvHandler::~IsoRecvHandler()
632 {
633 // Don't call until libraw1394's raw1394_new_handle() function has been
634 // fixed to correctly initialise the iso_packet_infos field.  Bug is
635 // confirmed present in libraw1394 1.2.1.  In any case,
636 // raw1394_destroy_handle() (in the base class destructor) will do any iso
637 // system shutdown required.
638     raw1394_iso_shutdown(m_handle);
639
640 }
641
642 bool
643 IsoRecvHandler::initialize() {
644     debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n");
645
646     IsoHandler *base=static_cast<IsoHandler *>(this);
647
648     if(!(base->initialize())) {
649         return false;
650     }
651
652     raw1394_set_userdata(m_handle, static_cast<void *>(this));
653
654     if(raw1394_iso_multichannel_recv_init(m_handle,
655                                          iso_receive_handler,
656                                          m_buf_packets,
657                                          m_max_packet_size,
658                                          m_irq_interval)) {
659         debugFatal("Could not do multichannel receive initialisation!\n" );
660
661         return false;
662     }
663
664     return true;
665
666 }
667
668 enum raw1394_iso_disposition IsoRecvHandler::putPacket(unsigned char *data, unsigned int length,
669                       unsigned char channel, unsigned char tag, unsigned char sy,
670                       unsigned int cycle, unsigned int dropped) {
671
672     debugOutput( DEBUG_LEVEL_VERY_VERBOSE,
673                  "received packet: length=%d, channel=%d, cycle=%d\n",
674                  length, channel, cycle );
675
676     return RAW1394_ISO_OK;
677 }
678
679 // an recv handler can have multiple destination IsoStreams
680 // NOTE: this implementation even allows for already registered
681 // streams to be registered again.
682 int IsoRecvHandler::registerStream(IsoRecvStream *stream)
683 {
684     assert(stream);
685     debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n");
686
687     m_Clients.push_back(stream);
688
689     listen(stream->getChannel());
690     return 0;
691
692 }
693
694 int IsoRecvHandler::unregisterStream(IsoRecvStream *stream)
695 {
696     assert(stream);
697     debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n");
698
699     for ( IsoRecvStreamVectorIterator it = m_Clients.begin();
700           it != m_Clients.end();
701           ++it )
702     {
703         IsoRecvStream* s = *it;
704         if ( s == stream ) {
705             unListen(s->getChannel());
706             m_Clients.erase(it);
707             return 0;
708         }
709     }
710
711     return -1; //not found
712
713 }
714
715 void IsoRecvHandler::listen(int channel) {
716     int retval;
717     debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n");
718
719     retval=raw1394_iso_recv_listen_channel(m_handle, channel);
720
721 }
722
723 void IsoRecvHandler::unListen(int channel) {
724     int retval;
725     debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n");
726
727     retval=raw1394_iso_recv_unlisten_channel(m_handle, channel);
728
729 }
730
731 int IsoRecvHandler::start(int cycle)
732 {
733     debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n");
734     return raw1394_iso_recv_start(m_handle, cycle, -1, 0);
735 }
736 #endif
Note: See TracBrowser for help on using the browser.