Changeset fb6c98f in mainline for uspace/drv/audio/sb16/dsp.h


Ignore:
Timestamp:
2012-08-20T14:03:19Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6f57933
Parents:
018ab50
Message:

sb16: Improve state management and use it to reject invalid requests.

File:
1 edited

Legend:

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

    r018ab50 rfb6c98f  
    4242
    4343#include "registers.h"
     44typedef enum {
     45        DSP_PLAYBACK_ACTIVE_EVENTS,
     46        DSP_CAPTURE_ACTIVE_EVENTS,
     47        DSP_PLAYBACK_NOEVENTS,
     48        DSP_CAPTURE_NOEVENTS,
     49        DSP_STOPPED,
     50        DSP_READY,
     51        DSP_NO_BUFFER,
     52} dsp_state_t;
    4453
    4554typedef struct sb_dsp_t {
     
    6170                unsigned frame_count;
    6271        } active;
    63         enum {
    64                 DSP_PLAYBACK,
    65                 DSP_CAPTURE,
    66                 DSP_STOPPED,
    67         } status;
     72        dsp_state_t state;
    6873        async_sess_t *event_session;
    6974        async_exch_t *event_exchange;
Note: See TracChangeset for help on using the changeset viewer.