Changeset d86c9736 in mainline for uspace/drv/audio/sb16/dsp.c


Ignore:
Timestamp:
2012-08-19T14:35:32Z (12 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.

File:
1 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;
Note: See TracChangeset for help on using the changeset viewer.