Changeset d86c9736 in mainline for uspace/drv/audio/sb16/dsp.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/drv/audio/sb16/dsp.c
rad42844 rd86c9736 215 215 } 216 216 217 if (dsp->status == DSP_ RECORDING) {217 if (dsp->status == DSP_CAPTURE) { 218 218 sb_dsp_start_active(dsp, SINGLE_DMA_16B_AD); 219 219 } … … 232 232 PCM_EVENT_FRAMES_PLAYED, dsp->active.frame_count); 233 233 break; 234 case DSP_ RECORDING:234 case DSP_CAPTURE: 235 235 async_msg_1(dsp->event_exchange, 236 PCM_EVENT_FRAMES_ RECORDED, dsp->active.frame_count);236 PCM_EVENT_FRAMES_CAPTURED, dsp->active.frame_count); 237 237 break; 238 238 default: … … 251 251 { 252 252 switch(cap) { 253 case AUDIO_CAP_ RECORD:253 case AUDIO_CAP_CAPTURE: 254 254 case AUDIO_CAP_PLAYBACK: 255 255 case AUDIO_CAP_INTERRUPT: … … 393 393 } 394 394 395 int sb_dsp_start_ record(sb_dsp_t *dsp, unsigned frames,395 int sb_dsp_start_capture(sb_dsp_t *dsp, unsigned frames, 396 396 unsigned channels, unsigned sampling_rate, pcm_sample_format_t format) 397 397 { … … 401 401 402 402 /* 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).", 404 404 frames, sampling_rate, pcm_sample_format_str(format), channels); 405 405 if (sb_dsp_test_format(dsp, &channels, &sampling_rate, &format) != EOK) … … 433 433 "(~1/%u sec)", dsp->active.samples, 434 434 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 440 int sb_dsp_stop_capture(sb_dsp_t *dsp) 441 441 { 442 442 assert(dsp); 443 443 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); 446 446 async_exchange_end(dsp->event_exchange); 447 447 dsp->event_exchange = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.