Lines Matching refs:data

36 bool AudioProtocol::handleReply(const uint32_t* data, AudioParam* param)
38 if (!checkHeaderId(data, mCommand)) {
41 if (data[1] != 0) { // no endian change for 0
42 LOGE("error in reply %d", ntohl(data[1]));
45 if (data[2] != 0) {
46 LOGE("payload length %d not zero", ntohl(data[2]));
52 bool AudioProtocol::handleReplyHeader(ClientSocket& socket, uint32_t* data, CommandId& id)
54 if (!socket.readData((char*)data, REPLY_HEADER_SIZE)) {
58 uint32_t command = ntohl(data[0]);
60 LOGE("Wrong header %x %x", command, data[0]);
65 LOGE("Wrong header %x %x", command, data[0]);
69 LOGE("Wrong header %x %x", command, data[0]);
77 bool AudioProtocol::checkHeaderId(const uint32_t* data, uint32_t command)
79 if (ntohl(data[0]) != ((command & 0xffff) | 0x43210000)) {
80 LOGE("wrong reply ID 0x%x", ntohl(data[0]));
88 * param0 u32 data id
103 * param0 u32 data id
149 bool CmdStartRecording::handleReply(const uint32_t* data, AudioParam* param)
151 if (!checkHeaderId(data, ECmdStartRecording)) {
154 if (data[1] != 0) { // no endian change for 0
155 LOGE("error in reply %d", ntohl(data[1]));
158 int len = ntohl(data[2]);
160 LOGE("received data %d exceeding buffer capacity %d", len, param->mBuffer->getCapacity());
169 LOGI("received data %d from device", len);
175 bool CmdGetDeviceInfo::handleReply(const uint32_t* data, AudioParam* param)
177 if (!checkHeaderId(data, ECmdGetDeviceInfo)) {
180 if (data[1] != 0) { // no endian change for 0
181 LOGE("error in reply %d", ntohl(data[1]));
184 int len = ntohl(data[2]);
191 LOGI("received data %s from device", infoString.get());