Bug 95738

Summary: big endian support in webrtc-audio-processing
Product: PulseAudio Reporter: than <than>
Component: modulesAssignee: pulseaudio-bugs
Status: RESOLVED MOVED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart, rdieter
Version: unspecified   
Hardware: PowerPC   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: patch for big endian support

Description than 2016-05-24 13:50:52 UTC
Created attachment 124025 [details] [review]
patch for big endian support

the current webrtc-audio-processing doesn't support the big endian platform.
https://bugzilla.redhat.com/show_bug.cgi?id=1336466

i attach a patch for big endian platform.
Comment 1 Arun Raghavan 2016-06-01 10:17:36 UTC
Thanks for this. Could I possibly persuade you to try to get this included in the webrtc upstream? That's where we take this code from.

  https://chromium.googlesource.com/external/webrtc/+/master/
  https://webrtc.org/contributing/
Comment 2 Felipe Sateler 2016-06-08 13:45:40 UTC
The attached patch does not fix the issue fully:


https://buildd.debian.org/status/logs.php?pkg=webrtc-audio-processing&ver=0.2-2&suite=experimental
Comment 3 than 2016-06-08 14:48:04 UTC
(In reply to Arun Raghavan from comment #1)
> Thanks for this. Could I possibly persuade you to try to get this included
> in the webrtc upstream? That's where we take this code from.
> 
>   https://chromium.googlesource.com/external/webrtc/+/master/
>   https://webrtc.org/contributing/

sure, i will try.
Comment 4 than 2016-06-08 14:49:07 UTC
(In reply to Felipe Sateler from comment #2)
> The attached patch does not fix the issue fully:
> 
> 
> https://buildd.debian.org/status/logs.php?pkg=webrtc-audio-processing&ver=0.
> 2-2&suite=experimental

it's another issue. please try following patch which should fix your issue


diff -up webrtc-audio-processing-0.2/webrtc/typedefs.h.typedef webrtc-audio-processing-0.2/webrtc/typedefs.h
--- webrtc-audio-processing-0.2/webrtc/typedefs.h.typedef       2016-05-12 09:08:53.885000410 -0500
+++ webrtc-audio-processing-0.2/webrtc/typedefs.h       2016-05-12 09:12:38.006851953 -0500
@@ -48,7 +48,19 @@
 #define WEBRTC_ARCH_32_BITS
 #define WEBRTC_ARCH_LITTLE_ENDIAN
 #else
-#error Please add support for your architecture in typedefs.h
+/* instead of failing, use typical unix defines... */
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define WEBRTC_ARCH_BIG_ENDIAN
+#else
+#error __BYTE_ORDER__ is not defined
+#endif
+#if defined(__LP64__)
+#define WEBRTC_ARCH_64_BITS
+#else
+#define WEBRTC_ARCH_32_BITS
+#endif
 #endif
 
 #if !(defined(WEBRTC_ARCH_LITTLE_ENDIAN) ^ defined(WEBRTC_ARCH_BIG_ENDIAN))
Comment 5 Felipe Sateler 2016-06-15 13:46:07 UTC
@than

Thanks, that fixes the big endian issues.
Comment 6 GitLab Migration User 2018-07-30 09:56:20 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/127.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.