gstalsasink: iec61937 (Non-linear PCM bitstreams) not correctly working
Submitted by Arnaud Pouliquen
Link to original bug (#757258)
Description
Created attachment 314333
iec61937 incoherent endianness in playload
I'm trying to enable the x-ac3 passtrough for sti platform.
This platform is little endian.
Applying patch described in Bug 721740, I'm facing endianness issue.
I have detected 2 problems:
- gstalsa.c: gst_audio_iec61937_payload
Issue seems introduced in https://bugzilla.gnome.org/show_bug.cgi?id=678021
Some source code still under "#if G_BYTE_ORDER == G_BIG_ENDIAN" while another part tests the endianness provided as parameter.
=> patch proposed to solve the issue : iec61937 incoherent endianness in playload
2)gstalsasink.c: set_hwparams
format detected can be S16_LE or S16_BE.
Bytes swapp should depend on platform endianness but also output indianness
=> Patch proposed to solve the issue: alsasink: endianess fix for iec61937
With this both patches I'm able to play on hw (S16_LE) and plughw (S16_BE) alsa devices.
Please notice that i have tried to not impact big endian architecture. But i
tested only with little endian architecture...
An extra question is:
Are all codec big endian formated?
If not, it seems that something is missing to take into account the source endianness in case of pass through.
Attachment 314333, "iec61937 incoherent endianness in playload":
iec61937-incoherent-endianness-in-playload.patch