Esempio n. 1
0
RPC_Result_t RPC_PACKET_SendData(UInt8 rpcClientID,
				 PACKET_InterfaceType_t interfaceType,
				 UInt8 channel,
				 PACKET_BufHandle_t dataBufHandle)
{
	IPC_ReturnCode_T ipcError = IPC_ERROR;
	UInt8 *pCid =
	    (UInt8 *)IPC_BufferHeaderSizeSet((IPC_Buffer) dataBufHandle, 4);

	/*fixes compiler warnings */
	if (rpcClientID) ;

	if (pCid) {
		pCid[0] = channel;
		if (sCPResetting) {
			_DBG_(RPC_TRACE
			      ("RPC_PACKET_SendData: cp resetting, ignore send\n"));
			ipcError = IPC_ERROR;
		} else
			ipcError =
			    IPC_SendBuffer((IPC_Buffer) dataBufHandle,
					   IPC_PRIORITY_DEFAULT);
	}

	return (ipcError == IPC_OK) ? RPC_RESULT_OK : RPC_RESULT_ERROR;
}
Esempio n. 2
0
RPC_Result_t RPC_PACKET_SendData(UInt8 rpcClientID, PACKET_InterfaceType_t interfaceType, UInt8 channel, PACKET_BufHandle_t dataBufHandle)
{
	IPC_ReturnCode_T ipcError;

	UInt8* pCid = (UInt8*)IPC_BufferHeaderSizeSet((IPC_Buffer)dataBufHandle , 4);
	pCid[0] = channel;

	if (rpcClientID) {} //fixes compiler warnings
	
	ipcError = IPC_SendBuffer((IPC_Buffer)dataBufHandle, IPC_PRIORITY_DEFAULT);

	return (ipcError == IPC_OK) ? RPC_RESULT_OK : RPC_RESULT_ERROR;
}
int brcm_ipc_aud_control_send(const void * const buff, UInt32 len)
{
        IPC_Buffer buffer;

        buffer = IPC_AllocateBuffer(brcm_ApAudioPool);

        if (buffer) {
                if (0 == (IPC_BufferSetDataSize(buffer, len))) {
                        return 1;
                }

                memcpy(IPC_BufferDataPointer(buffer), buff, len);
                IPC_SendBuffer(buffer, IPC_PRIORITY_DEFAULT);

        } else {
                pr_info(__AUD"IPC_AudioControlSend: Pool Empty\n");
                return 1;
        }
        return 0;
}