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


Ignore:
Timestamp:
2018-01-04T20:50:52Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
e211ea04
Parents:
facacc71
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:47:53)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:50:52)
Message:

Use errno_t in all uspace and kernel code.

Change type of every variable, parameter and return value that holds an
<errno.h> constant to either errno_t (the usual case), or sys_errno_t
(some places in kernel). This is for the purpose of self-documentation,
as well as for type-checking with a bit of type definition hackery.

After this commit, HelenOS is free of code that mixes error codes with non-error
values on the assumption that error codes are negative.

File:
1 edited

Legend:

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

    rfacacc71 r46577995  
    7676} sb_dsp_t;
    7777
    78 int sb_dsp_init(sb_dsp_t *dsp, sb16_regs_t *regs, ddf_dev_t *dev,
     78errno_t sb_dsp_init(sb_dsp_t *dsp, sb16_regs_t *regs, ddf_dev_t *dev,
    7979    int dma8, int dma16);
    8080void sb_dsp_interrupt(sb_dsp_t *dsp);
    8181unsigned sb_dsp_query_cap(sb_dsp_t *dsp, audio_cap_t cap);
    82 int sb_dsp_get_buffer_position(sb_dsp_t *dsp, size_t *size);
    83 int sb_dsp_test_format(sb_dsp_t *dsp, unsigned *channels, unsigned *rate,
     82errno_t sb_dsp_get_buffer_position(sb_dsp_t *dsp, size_t *size);
     83errno_t sb_dsp_test_format(sb_dsp_t *dsp, unsigned *channels, unsigned *rate,
    8484  pcm_sample_format_t *format);
    85 int sb_dsp_get_buffer(sb_dsp_t *dsp, void **buffer, size_t *size);
    86 int sb_dsp_set_event_session(sb_dsp_t *dsp, async_sess_t *session);
     85errno_t sb_dsp_get_buffer(sb_dsp_t *dsp, void **buffer, size_t *size);
     86errno_t sb_dsp_set_event_session(sb_dsp_t *dsp, async_sess_t *session);
    8787async_sess_t * sb_dsp_get_event_session(sb_dsp_t *dsp);
    88 int sb_dsp_release_buffer(sb_dsp_t *dsp);
    89 int sb_dsp_start_playback(sb_dsp_t *dsp, unsigned frames,
     88errno_t sb_dsp_release_buffer(sb_dsp_t *dsp);
     89errno_t sb_dsp_start_playback(sb_dsp_t *dsp, unsigned frames,
    9090    unsigned channels, unsigned sample_rate, pcm_sample_format_t format);
    91 int sb_dsp_stop_playback(sb_dsp_t *dsp, bool immediate);
    92 int sb_dsp_start_capture(sb_dsp_t *dsp, unsigned frames,
     91errno_t sb_dsp_stop_playback(sb_dsp_t *dsp, bool immediate);
     92errno_t sb_dsp_start_capture(sb_dsp_t *dsp, unsigned frames,
    9393    unsigned channels, unsigned sample_rate, pcm_sample_format_t format);
    94 int sb_dsp_stop_capture(sb_dsp_t *dsp, bool immediate);
     94errno_t sb_dsp_stop_capture(sb_dsp_t *dsp, bool immediate);
    9595
    9696#endif
Note: See TracChangeset for help on using the changeset viewer.