Changeset d86c9736 in mainline for uspace/lib/drv


Ignore:
Timestamp:
2012-08-19T14:35:32Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fa91c0f
Parents:
ad42844
Message:

Rename record → capture.

Location:
uspace/lib/drv
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_audio_pcm.c

    rad42844 rd86c9736  
    5151        IPC_M_AUDIO_PCM_START_PLAYBACK,
    5252        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,
    5555} audio_pcm_iface_funcs_t;
    5656
     
    219219}
    220220
    221 int audio_pcm_start_record(audio_pcm_sess_t *sess, unsigned frames,
     221int audio_pcm_start_capture(audio_pcm_sess_t *sess, unsigned frames,
    222222    unsigned channels, unsigned sample_rate, pcm_sample_format_t format)
    223223{
     
    228228        async_exch_t *exch = async_exchange_begin(sess);
    229229        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,
    231231            frames, sample_rate, packed);
    232232        async_exchange_end(exch);
     
    234234}
    235235
    236 int audio_pcm_stop_record(audio_pcm_sess_t *sess)
     236int audio_pcm_stop_capture(audio_pcm_sess_t *sess)
    237237{
    238238        async_exch_t *exch = async_exchange_begin(sess);
    239239        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);
    241241        async_exchange_end(exch);
    242242        return ret;
     
    253253static void remote_audio_pcm_start_playback(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
    254254static 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 *);
     255static void remote_audio_pcm_start_capture(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
     256static void remote_audio_pcm_stop_capture(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
    257257
    258258/** Remote audio pcm buffer interface operations. */
     
    265265        [IPC_M_AUDIO_PCM_START_PLAYBACK] = remote_audio_pcm_start_playback,
    266266        [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,
    269269};
    270270
     
    436436}
    437437
    438 void remote_audio_pcm_start_record(ddf_fun_t *fun, void *iface,
     438void remote_audio_pcm_start_capture(ddf_fun_t *fun, void *iface,
    439439    ipc_callid_t callid, ipc_call_t *call)
    440440{
     
    446446        const pcm_sample_format_t format = DEV_IPC_GET_ARG3(*call) & UINT16_MAX;
    447447
    448         const int ret = pcm_iface->start_record
    449             ? 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)
    450450            : ENOTSUP;
    451451        async_answer_0(callid, ret);
    452452}
    453453
    454 void remote_audio_pcm_stop_record(ddf_fun_t *fun, void *iface,
     454void remote_audio_pcm_stop_capture(ddf_fun_t *fun, void *iface,
    455455    ipc_callid_t callid, ipc_call_t *call)
    456456{
    457457        const audio_pcm_iface_t *pcm_iface = iface;
    458458
    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;
    461461        async_answer_0(callid, ret);
    462462}
  • uspace/lib/drv/include/audio_pcm_iface.h

    rad42844 rd86c9736  
    4545
    4646typedef enum {
    47         AUDIO_CAP_RECORD,
     47        AUDIO_CAP_CAPTURE,
    4848        AUDIO_CAP_PLAYBACK,
    4949        AUDIO_CAP_MAX_BUFFER,
     
    5656enum {
    5757        PCM_EVENT_FRAMES_PLAYED = IPC_FIRST_USER_METHOD,
    58         PCM_EVENT_FRAMES_RECORDED,
     58        PCM_EVENT_FRAMES_CAPTURED,
    5959        PCM_EVENT_PLAYBACK_TERMINATED,
    60         PCM_EVENT_RECORDING_TERMINATED
     60        PCM_EVENT_CAPTURE_TERMINATED
    6161};
    6262
     
    8080int audio_pcm_stop_playback(audio_pcm_sess_t *);
    8181
    82 int audio_pcm_start_record(audio_pcm_sess_t *, unsigned,
     82int audio_pcm_start_capture(audio_pcm_sess_t *, unsigned,
    8383    unsigned, unsigned, pcm_sample_format_t);
    84 int audio_pcm_stop_record(audio_pcm_sess_t *);
     84int audio_pcm_stop_capture(audio_pcm_sess_t *);
    8585
    8686/** Audio pcm communication interface. */
     
    9696            unsigned, unsigned, pcm_sample_format_t);
    9797        int (*stop_playback)(ddf_fun_t *);
    98         int (*start_record)(ddf_fun_t *, unsigned,
     98        int (*start_capture)(ddf_fun_t *, unsigned,
    9999            unsigned, unsigned, pcm_sample_format_t);
    100         int (*stop_record)(ddf_fun_t *);
     100        int (*stop_capture)(ddf_fun_t *);
    101101} audio_pcm_iface_t;
    102102
Note: See TracChangeset for help on using the changeset viewer.