sbc: store 0x0000 as frame header

This commit is contained in:
Matthias Ringwald 2016-07-26 09:24:58 +02:00
parent 7294d0093f
commit 5fff3cef91

View File

@ -84,8 +84,10 @@ void EncPacking(SBC_ENC_PARAMS *pstrEncParams)
pu8PacketPtr = pstrEncParams->pu8NextPacket; /*Initialize the ptr*/ pu8PacketPtr = pstrEncParams->pu8NextPacket; /*Initialize the ptr*/
/* BK4BTSTACK_CHANGE START */ /* BK4BTSTACK_CHANGE START */
uint8_t * reserved_ptr = (void*) 0;
if (pstrEncParams->mSBCEnabled){ if (pstrEncParams->mSBCEnabled){
*pu8PacketPtr++ = (UINT8)0xAD; /*Sync word*/ *pu8PacketPtr++ = (UINT8)0xAD; /*Sync word*/
reserved_ptr = pu8PacketPtr;
} else { } else {
*pu8PacketPtr++ = (UINT8)0x9C; /*Sync word*/ *pu8PacketPtr++ = (UINT8)0x9C; /*Sync word*/
} }
@ -237,6 +239,15 @@ void EncPacking(SBC_ENC_PARAMS *pstrEncParams)
u8CRC = 0x0F; u8CRC = 0x0F;
s32LoopCount = s32Sb >> 1; s32LoopCount = s32Sb >> 1;
/* BK4BTSTACK_CHANGE START */
if (reserved_ptr){
// overwrite fixed values for mSBC before CRC calculation
*reserved_ptr++ = 0;
*reserved_ptr = 0;
}
/* BK4BTSTACK_CHANGE END */
/* /*
The loops is run from the start of the packet till the scale factor The loops is run from the start of the packet till the scale factor
parameters. In case of JS, 'join' parameter is included in the packet parameters. In case of JS, 'join' parameter is included in the packet