Changeset d86c9736 in mainline for uspace/drv/audio


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/drv/audio/sb16
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/audio/sb16/dsp.c

    rad42844 rd86c9736  
    215215        }
    216216
    217         if (dsp->status == DSP_RECORDING) {
     217        if (dsp->status == DSP_CAPTURE) {
    218218                sb_dsp_start_active(dsp, SINGLE_DMA_16B_AD);
    219219        }
     
    232232                            PCM_EVENT_FRAMES_PLAYED, dsp->active.frame_count);
    233233                        break;
    234                 case DSP_RECORDING:
     234                case DSP_CAPTURE:
    235235                        async_msg_1(dsp->event_exchange,
    236                             PCM_EVENT_FRAMES_RECORDED, dsp->active.frame_count);
     236                            PCM_EVENT_FRAMES_CAPTURED, dsp->active.frame_count);
    237237                        break;
    238238                default:
     
    251251{
    252252        switch(cap) {
    253         case AUDIO_CAP_RECORD:
     253        case AUDIO_CAP_CAPTURE:
    254254        case AUDIO_CAP_PLAYBACK:
    255255        case AUDIO_CAP_INTERRUPT:
     
    393393}
    394394
    395 int sb_dsp_start_record(sb_dsp_t *dsp, unsigned frames,
     395int sb_dsp_start_capture(sb_dsp_t *dsp, unsigned frames,
    396396    unsigned channels, unsigned sampling_rate, pcm_sample_format_t format)
    397397{
     
    401401
    402402        /* Check supported parameters */
    403         ddf_log_debug("Requested record: %u frames, %uHz, %s, %u channel(s).",
     403        ddf_log_debug("Requested capture: %u frames, %uHz, %s, %u channel(s).",
    404404            frames, sampling_rate, pcm_sample_format_str(format), channels);
    405405        if (sb_dsp_test_format(dsp, &channels, &sampling_rate, &format) != EOK)
     
    433433            "(~1/%u sec)", dsp->active.samples,
    434434            sampling_rate / (dsp->active.samples * channels));
    435         dsp->status = DSP_RECORDING;
    436 
    437         return EOK;
    438 }
    439 
    440 int sb_dsp_stop_record(sb_dsp_t *dsp)
     435        dsp->status = DSP_CAPTURE;
     436
     437        return EOK;
     438}
     439
     440int sb_dsp_stop_capture(sb_dsp_t *dsp)
    441441{
    442442        assert(dsp);
    443443        sb_dsp_write(dsp, DMA_16B_EXIT);
    444         ddf_log_debug("Stopped recording");
    445         async_msg_0(dsp->event_exchange, PCM_EVENT_RECORDING_TERMINATED);
     444        ddf_log_debug("Stopped capture");
     445        async_msg_0(dsp->event_exchange, PCM_EVENT_CAPTURE_TERMINATED);
    446446        async_exchange_end(dsp->event_exchange);
    447447        dsp->event_exchange = NULL;
  • uspace/drv/audio/sb16/dsp.h

    rad42844 rd86c9736  
    6363        enum {
    6464                DSP_PLAYBACK,
    65                 DSP_RECORDING,
     65                DSP_CAPTURE,
    6666                DSP_STOPPED,
    6767        } status;
     
    8383    unsigned channels, unsigned sample_rate, pcm_sample_format_t format);
    8484int sb_dsp_stop_playback(sb_dsp_t *dsp);
    85 int sb_dsp_start_record(sb_dsp_t *dsp, unsigned frames,
     85int sb_dsp_start_capture(sb_dsp_t *dsp, unsigned frames,
    8686    unsigned channels, unsigned sample_rate, pcm_sample_format_t format);
    87 int sb_dsp_stop_record(sb_dsp_t *dsp);
     87int sb_dsp_stop_capture(sb_dsp_t *dsp);
    8888
    8989#endif
  • uspace/drv/audio/sb16/pcm_iface.c

    rad42844 rd86c9736  
    104104}
    105105
    106 static int sb_start_record(ddf_fun_t *fun, unsigned frames,
     106static int sb_start_capture(ddf_fun_t *fun, unsigned frames,
    107107    unsigned channels, unsigned sample_rate, pcm_sample_format_t format)
    108108{
     
    110110        assert(fun->driver_data);
    111111        sb_dsp_t *dsp = fun->driver_data;
    112         return sb_dsp_start_record(
     112        return sb_dsp_start_capture(
    113113            dsp, frames, channels, sample_rate, format);
    114114}
    115115
    116 static int sb_stop_record(ddf_fun_t *fun)
     116static int sb_stop_capture(ddf_fun_t *fun)
    117117{
    118118        assert(fun);
    119119        assert(fun->driver_data);
    120120        sb_dsp_t *dsp = fun->driver_data;
    121         return sb_dsp_stop_record(dsp);
     121        return sb_dsp_stop_capture(dsp);
    122122}
    123123
     
    134134        .stop_playback = sb_stop_playback,
    135135
    136         .start_record = sb_start_record,
    137         .stop_record = sb_stop_record
     136        .start_capture = sb_start_capture,
     137        .stop_capture = sb_stop_capture,
    138138};
    139139/**
Note: See TracChangeset for help on using the changeset viewer.