Changeset 847 for trunk/libffado
- Timestamp:
- 01/14/08 10:59:06 (15 years ago)
- Files:
-
- trunk/libffado/config.h.in (modified) (1 diff)
- trunk/libffado/SConstruct (modified) (3 diffs)
- trunk/libffado/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp (modified) (12 diffs)
- trunk/libffado/src/libutil/ByteSwap.h (added)
- trunk/libffado/tests/SConscript (modified) (1 diff)
- trunk/libffado/tests/test-bufferops.cpp (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/config.h.in
r833 r847 31 31 //#define USE_SSE $USE_SSE 32 32 #define USE_SSE 0 33 //#define USE_SSE2 $USE_SSE2 34 #define USE_SSE2 0 33 35 34 36 #define CACHEDIR "~/.ffado" trunk/libffado/SConstruct
r836 r847 290 290 291 291 build_host_supports_sse = 0 292 build_host_supports_sse2 = 0 292 293 293 294 if config[config_kernel] == 'linux' : … … 302 303 if "sse" in x86_flags: 303 304 build_host_supports_sse = 1 305 if "sse2" in x86_flags: 306 build_host_supports_sse2 = 1 304 307 if "3dnow" in x86_flags: 305 308 opt_flags.append ("-m3dnow") … … 315 318 env['USE_SSE'] = 1 316 319 320 if ((env['DIST_TARGET'] == 'i686') or (env['DIST_TARGET'] == 'x86_64')) \ 321 and build_host_supports_sse2 and env['ENABLE_OPTIMIZATIONS']: 322 opt_flags.extend (["-msse2"]) 323 env['USE_SSE2'] = 1 324 317 325 # end of processor-specific section 318 326 if env['ENABLE_OPTIMIZATIONS']: trunk/libffado/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp
r833 r847 36 36 #include <netinet/in.h> 37 37 #include <assert.h> 38 39 #include "libutil/ByteSwap.h" 38 40 39 41 #define AMDTP_FLOAT_MULTIPLIER 2147483392.0 … … 417 419 } 418 420 encodeMidiPorts((quadlet_t *)data, offset, nevents); 421 byteSwapToBus(((quadlet_t *)data), nevents * m_dimension); 419 422 return true; 420 423 } … … 429 432 encodeAudioPortsSilence((quadlet_t *)data, offset, nevents); 430 433 encodeMidiPortsSilence((quadlet_t *)data, offset, nevents); 434 byteSwapToBus(((quadlet_t *)data), nevents * m_dimension); 431 435 return true; 432 436 } … … 453 457 for (j = 0;j < nevents; j += 1) 454 458 { 455 *target_event = htonl( 0x40000000 );459 *target_event = 0x40000000; 456 460 target_event += m_dimension; 457 461 __builtin_prefetch(target_event, 1, 0); // prefetch events for write, no temporal locality … … 491 495 float v = (*buffer) * AMDTP_FLOAT_MULTIPLIER; 492 496 unsigned int tmp = ((int) v); 493 *target_event = htonl ( ( tmp >> 8 ) | 0x40000000 );497 *target_event = ( tmp >> 8 ) | 0x40000000; 494 498 buffer++; 495 499 __builtin_prefetch(buffer, 0, 0); // prefetch events for read, no temporal locality … … 500 504 for (j = 0;j < nevents; j += 1) 501 505 { 502 *target_event = htonl( 0x40000000 );506 *target_event = 0x40000000; 503 507 target_event += m_dimension; 504 508 __builtin_prefetch(target_event, 1, 0); // prefetch events for write, no temporal locality … … 536 540 for (j = 0; j < nevents; j += 1) 537 541 { 538 *target_event = htonl(((*buffer) & 0x00FFFFFF) | 0x40000000);542 *target_event = ((*buffer) & 0x00FFFFFF) | 0x40000000; 539 543 buffer++; 540 544 __builtin_prefetch(buffer, 0, 0); // prefetch events for read, no temporal locality … … 546 550 for (j = 0;j < nevents; j += 1) 547 551 { 548 *target_event = htonl( 0x40000000 );552 *target_event = 0x40000000; 549 553 target_event += m_dimension; 550 554 __builtin_prefetch(target_event, 1, 0); // prefetch events for write, no temporal locality … … 574 578 target_event = (quadlet_t *) (data + ((j * m_dimension) + p.position)); 575 579 __builtin_prefetch(target_event, 1, 0); // prefetch events for write, no temporal locality 576 *target_event = htonl(IEC61883_AM824_SET_LABEL(0, IEC61883_AM824_LABEL_MIDI_NO_DATA));580 *target_event = IEC61883_AM824_SET_LABEL(0, IEC61883_AM824_LABEL_MIDI_NO_DATA); 577 581 } 578 582 } … … 609 613 tmpval = ((*buffer)<<16) & 0x00FF0000; 610 614 tmpval = IEC61883_AM824_SET_LABEL(tmpval, IEC61883_AM824_LABEL_MIDI_1X); 611 *target_event = htonl(tmpval);615 *target_event = tmpval; 612 616 613 617 // debugOutput ( DEBUG_LEVEL_VERBOSE, "MIDI port %s, pos=%u, loc=%u, nevents=%u, dim=%d\n", … … 619 623 // or because this would exceed the maximum rate 620 624 // FIXME: this can be ifdef optimized since it's a constant 621 *target_event = htonl(IEC61883_AM824_SET_LABEL(0, IEC61883_AM824_LABEL_MIDI_NO_DATA));625 *target_event = IEC61883_AM824_SET_LABEL(0, IEC61883_AM824_LABEL_MIDI_NO_DATA); 622 626 } 623 627 buffer+=8; … … 627 631 target_event = (quadlet_t *) (data + ((j * m_dimension) + p.position)); 628 632 __builtin_prefetch(target_event, 1, 0); // prefetch events for write, no temporal locality 629 *target_event = htonl(IEC61883_AM824_SET_LABEL(0, IEC61883_AM824_LABEL_MIDI_NO_DATA));633 *target_event = IEC61883_AM824_SET_LABEL(0, IEC61883_AM824_LABEL_MIDI_NO_DATA); 630 634 } 631 635 } trunk/libffado/tests/SConscript
r843 r847 51 51 "test-ieee1394service" : "test-ieee1394service.cpp", 52 52 "test-streamdump" : "test-streamdump.cpp", 53 "test-bufferops" : "test-bufferops.cpp", 53 54 } 54 55