Changeset 7364c6ee in mainline
- Timestamp:
- 2012-07-05T22:16:06Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9d5244f
- Parents:
- 4bbfb93
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_audio_pcm_buffer.c
r4bbfb93 r7364c6ee 94 94 if (ret == EOK) { 95 95 void *dst = NULL; 96 // FIXME Do we need to know the flags?97 96 int ret = async_share_in_start_0_0(exch, buffer_size, &dst); 98 97 if (ret != EOK) { … … 238 237 size_t share_size = 0; 239 238 ipc_callid_t share_id = 0; 240 ddf_msg(LVL_DEBUG2, "Calling share receive."); 239 240 ddf_msg(LVL_DEBUG2, "Receiving share request."); 241 241 if (!async_share_in_receive(&share_id, &share_size)) { 242 242 ddf_msg(LVL_DEBUG, "Failed to share pcm buffer."); 243 if (pcm_iface->release_buffer) 244 pcm_iface->release_buffer(fun, id); 243 pcm_iface->release_buffer(fun, id); 245 244 async_answer_0(share_id, EPARTY); 246 245 return; 247 246 } 248 ddf_msg(LVL_DEBUG2, "Checking requested share size"); 247 248 ddf_msg(LVL_DEBUG2, "Checking requested share size."); 249 249 if (share_size != size) { 250 250 ddf_msg(LVL_DEBUG, "Incorrect pcm buffer size requested."); 251 if (pcm_iface->release_buffer) 252 pcm_iface->release_buffer(fun, id); 251 pcm_iface->release_buffer(fun, id); 253 252 async_answer_0(share_id, ELIMIT); 254 253 return; 255 254 } 256 ddf_msg(LVL_DEBUG2, "Calling share finalize"); 257 ret = async_share_in_finalize(share_id, buffer, 0); 255 256 ddf_msg(LVL_DEBUG2, "Calling share finalize."); 257 ret = async_share_in_finalize(share_id, buffer, AS_AREA_WRITE 258 | AS_AREA_READ); 258 259 if (ret != EOK) { 259 ddf_msg(LVL_DEBUG, "Failed to share buffer"); 260 if (pcm_iface->release_buffer) 261 pcm_iface->release_buffer(fun, id); 262 return; 263 264 } 260 ddf_msg(LVL_DEBUG, "Failed to share buffer."); 261 pcm_iface->release_buffer(fun, id); 262 return; 263 } 264 265 265 ddf_msg(LVL_DEBUG2, "Buffer shared with size %zu, creating callback.", 266 266 share_size); … … 280 280 ddf_msg(LVL_DEBUG, "Failed to set event callback."); 281 281 pcm_iface->release_buffer(fun, id); 282 } 283 async_answer_0(callid, ret); 282 async_answer_0(callid, ret); 283 return; 284 } 285 ddf_msg(LVL_DEBUG2, "Buffer and event session setup OK."); 286 async_answer_0(callid, EOK); 284 287 } 285 288 }
Note:
See TracChangeset
for help on using the changeset viewer.