Changeset 660
- Timestamp:
- 10/18/07 17:51:38 (15 years ago)
- Files:
-
- trunk/libffado/src/motu/motu_avdevice.cpp (modified) (3 diffs)
- trunk/libffado/src/motu/motu_avdevice.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/motu/motu_avdevice.cpp
r659 r660 191 191 , m_iso_recv_channel ( -1 ) 192 192 , m_iso_send_channel ( -1 ) 193 , m_bandwidth ( -1 ) 193 , m_rx_bandwidth ( -1 ) 194 , m_tx_bandwidth ( -1 ) 194 195 , m_receiveProcessor ( 0 ) 195 196 , m_transmitProcessor ( 0 ) … … 481 482 // * DATA_PREFIX = 0.16 us 482 483 // * DATA_END = 0.26 us 483 484 484 // These numbers are the worst-case figures given in the ieee1394 485 485 // standard. This gives approximately 0.5 us of overheads per packet - … … 492 492 // 192 kHz for the traveler) but now do this based on the actual device 493 493 // state by utilising the result from getEventSize() and remembering 494 // that each packet has an 8 byte CIP header. Note that m_bandwidth is 495 // a *per stream* bandwidth - it must be allocated for both the transmit 496 // and receive streams. 497 signed int max_event_size = event_size_out>event_size_in?event_size_out:event_size_in; 494 // that each packet has an 8 byte CIP header. Note that bandwidth is 495 // allocated on a *per stream* basis - it must be allocated for both the 496 // transmit and receive streams. While most MOTU modules are close to 497 // symmetric in terms of the number of in/out channels there are 498 // exceptions, so we deal with receive and transmit bandwidth separately. 498 499 signed int n_events_per_packet = samp_freq<=48000?8:(samp_freq<=96000?16:32); 499 m_bandwidth = 25 + (n_events_per_packet*max_event_size); 500 m_rx_bandwidth = 25 + (n_events_per_packet*event_size_in); 501 m_tx_bandwidth = 25 + (n_events_per_packet*event_size_out); 500 502 501 503 // Assign iso channels if not already done 502 504 if (m_iso_recv_channel < 0) 503 m_iso_recv_channel = m_p1394Service->allocateIsoChannelGeneric(m_ bandwidth);505 m_iso_recv_channel = m_p1394Service->allocateIsoChannelGeneric(m_rx_bandwidth); 504 506 505 507 if (m_iso_send_channel < 0) 506 m_iso_send_channel = m_p1394Service->allocateIsoChannelGeneric(m_ bandwidth);508 m_iso_send_channel = m_p1394Service->allocateIsoChannelGeneric(m_tx_bandwidth); 507 509 508 510 debugOutput(DEBUG_LEVEL_VERBOSE, "recv channel = %d, send channel = %d\n", trunk/libffado/src/motu/motu_avdevice.h
r659 r660 164 164 struct VendorModelEntry * m_model; 165 165 signed int m_iso_recv_channel, m_iso_send_channel; 166 signed int m_ bandwidth;166 signed int m_rx_bandwidth, m_tx_bandwidth; 167 167 168 168 Streaming::MotuReceiveStreamProcessor *m_receiveProcessor;