Changeset d86c9736 in mainline for uspace/lib/drv/generic/remote_audio_pcm.c
- Timestamp:
- 2012-08-19T14:35:32Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fa91c0f
- Parents:
- ad42844
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_audio_pcm.c
rad42844 rd86c9736 51 51 IPC_M_AUDIO_PCM_START_PLAYBACK, 52 52 IPC_M_AUDIO_PCM_STOP_PLAYBACK, 53 IPC_M_AUDIO_PCM_START_ RECORD,54 IPC_M_AUDIO_PCM_STOP_ RECORD,53 IPC_M_AUDIO_PCM_START_CAPTURE, 54 IPC_M_AUDIO_PCM_STOP_CAPTURE, 55 55 } audio_pcm_iface_funcs_t; 56 56 … … 219 219 } 220 220 221 int audio_pcm_start_ record(audio_pcm_sess_t *sess, unsigned frames,221 int audio_pcm_start_capture(audio_pcm_sess_t *sess, unsigned frames, 222 222 unsigned channels, unsigned sample_rate, pcm_sample_format_t format) 223 223 { … … 228 228 async_exch_t *exch = async_exchange_begin(sess); 229 229 const int ret = async_req_4_0(exch, 230 DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE), IPC_M_AUDIO_PCM_START_ RECORD,230 DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE), IPC_M_AUDIO_PCM_START_CAPTURE, 231 231 frames, sample_rate, packed); 232 232 async_exchange_end(exch); … … 234 234 } 235 235 236 int audio_pcm_stop_ record(audio_pcm_sess_t *sess)236 int audio_pcm_stop_capture(audio_pcm_sess_t *sess) 237 237 { 238 238 async_exch_t *exch = async_exchange_begin(sess); 239 239 const int ret = async_req_1_0(exch, 240 DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE), IPC_M_AUDIO_PCM_STOP_ RECORD);240 DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE), IPC_M_AUDIO_PCM_STOP_CAPTURE); 241 241 async_exchange_end(exch); 242 242 return ret; … … 253 253 static void remote_audio_pcm_start_playback(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *); 254 254 static void remote_audio_pcm_stop_playback(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *); 255 static void remote_audio_pcm_start_ record(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);256 static void remote_audio_pcm_stop_ record(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);255 static void remote_audio_pcm_start_capture(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *); 256 static void remote_audio_pcm_stop_capture(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *); 257 257 258 258 /** Remote audio pcm buffer interface operations. */ … … 265 265 [IPC_M_AUDIO_PCM_START_PLAYBACK] = remote_audio_pcm_start_playback, 266 266 [IPC_M_AUDIO_PCM_STOP_PLAYBACK] = remote_audio_pcm_stop_playback, 267 [IPC_M_AUDIO_PCM_START_ RECORD] = remote_audio_pcm_start_record,268 [IPC_M_AUDIO_PCM_STOP_ RECORD] = remote_audio_pcm_stop_record,267 [IPC_M_AUDIO_PCM_START_CAPTURE] = remote_audio_pcm_start_capture, 268 [IPC_M_AUDIO_PCM_STOP_CAPTURE] = remote_audio_pcm_stop_capture, 269 269 }; 270 270 … … 436 436 } 437 437 438 void remote_audio_pcm_start_ record(ddf_fun_t *fun, void *iface,438 void remote_audio_pcm_start_capture(ddf_fun_t *fun, void *iface, 439 439 ipc_callid_t callid, ipc_call_t *call) 440 440 { … … 446 446 const pcm_sample_format_t format = DEV_IPC_GET_ARG3(*call) & UINT16_MAX; 447 447 448 const int ret = pcm_iface->start_ record449 ? pcm_iface->start_ record(fun, frames, channels, rate, format)448 const int ret = pcm_iface->start_capture 449 ? pcm_iface->start_capture(fun, frames, channels, rate, format) 450 450 : ENOTSUP; 451 451 async_answer_0(callid, ret); 452 452 } 453 453 454 void remote_audio_pcm_stop_ record(ddf_fun_t *fun, void *iface,454 void remote_audio_pcm_stop_capture(ddf_fun_t *fun, void *iface, 455 455 ipc_callid_t callid, ipc_call_t *call) 456 456 { 457 457 const audio_pcm_iface_t *pcm_iface = iface; 458 458 459 const int ret = pcm_iface->stop_ record?460 pcm_iface->stop_ record(fun) : ENOTSUP;459 const int ret = pcm_iface->stop_capture ? 460 pcm_iface->stop_capture(fun) : ENOTSUP; 461 461 async_answer_0(callid, ret); 462 462 }
Note:
See TracChangeset
for help on using the changeset viewer.