Changeset f2a92b0 in mainline for uspace/drv/audio/sb16/dsp.c
- Timestamp:
- 2012-08-30T12:10:06Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5337491
- Parents:
- 5eed99d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/sb16/dsp.c
r5eed99d rf2a92b0 71 71 [DSP_PLAYBACK_TERMINATE] = "PLAYBACK TERMINATE", 72 72 [DSP_CAPTURE_TERMINATE] = "CAPTURE TERMINATE", 73 [DSP_STOPPED] = "STOPPED",74 73 [DSP_READY] = "READY", 75 74 [DSP_NO_BUFFER] = "NO BUFFER", … … 262 261 async_exchange_end(dsp->event_exchange); 263 262 dsp->event_exchange = NULL; 264 dsp_change_state(dsp, DSP_ STOPPED);263 dsp_change_state(dsp, DSP_READY); 265 264 break; 266 265 case DSP_PLAYBACK_TERMINATE: … … 268 267 async_exchange_end(dsp->event_exchange); 269 268 dsp->event_exchange = NULL; 270 dsp_change_state(dsp, DSP_ STOPPED);269 dsp_change_state(dsp, DSP_READY); 271 270 break; 272 271 default: … … 384 383 { 385 384 assert(dsp); 386 if (dsp->state != DSP_READY && dsp->state != DSP_STOPPED)385 if (dsp->state != DSP_READY) 387 386 return EINVAL; 388 387 assert(dsp->buffer.data); … … 400 399 assert(dsp); 401 400 402 if (!dsp->buffer.data) 403 return EINVAL; 404 405 if (dsp->state != DSP_READY && dsp->state != DSP_STOPPED) 401 if (!dsp->buffer.data || dsp->state != DSP_READY) 406 402 return EINVAL; 407 403 … … 457 453 dsp_reset(dsp); 458 454 ddf_log_debug("Stopped playback"); 459 dsp_change_state(dsp, DSP_ STOPPED);455 dsp_change_state(dsp, DSP_READY); 460 456 return EOK; 461 457 } … … 476 472 { 477 473 assert(dsp); 478 if (!dsp->buffer.data) 479 return EINVAL; 480 if (dsp->state != DSP_READY && dsp->state != DSP_STOPPED) 474 if (!dsp->buffer.data || dsp->state != DSP_READY) 481 475 return EINVAL; 482 476 … … 530 524 dsp_reset(dsp); 531 525 ddf_log_debug("Stopped capture fragment"); 532 dsp_change_state(dsp, DSP_ STOPPED);526 dsp_change_state(dsp, DSP_READY); 533 527 return EOK; 534 528 }
Note:
See TracChangeset
for help on using the changeset viewer.