asterisk-11.x-chan-dongle: fix audio endianess problem
authorDaniel Golle <[email protected]>
Wed, 24 Jun 2015 18:50:09 +0000 (20:50 +0200)
committerDaniel Golle <[email protected]>
Thu, 8 Oct 2015 13:18:28 +0000 (15:18 +0200)
commitf0bb800287e18dac443314f8b577fd9fd85faaf2
treef04095a09b33d145db24921dc8160df8d09070a1
parent2a342cd5bfe75e2da9a82ba0486d6aa4a852bb33
asterisk-11.x-chan-dongle: fix audio endianess problem

Github user @ljakob supplied a patch in
https://github.com/openwrt/telephony/issues/7
--
Hi, I've solved the problem myself - it was an endianness bug:

Here what gave me the correct clue:

    audio is broken in one direction only
    audio is fine if you disable any timing-source within asterisk (no good idea if you want to use IAX)
    audio was fine on my x86 box
    I had a long look into the code :)

The bug is in the audio handling of timing_write in channel.c, the data sent to the socket is not changed to the correct endianness if a timing device is used.

Here is my patch, it's untested (just one call yet) but it's trivial enough:
http://www.hugo.weite-welt.com/asterisk13_chan_dongle_endianess.patch
it is against asterisk13 branch in
https://github.com/oleg-krv/asterisk-chan-dongle.git
but should fit into other asterisk versions nicely
--
This commit imports the patch above to asterisk-11.x-chan-dongle.

Signed-off-by: Daniel Golle <[email protected]>
net/asterisk-11.x-chan-dongle/Makefile
net/asterisk-11.x-chan-dongle/patches/100-fix-audio-on-big-endian-systems.patch [new file with mode: 0644]