Changes in uspace/drv/audio/hdaudio/pcm_iface.c [4a5ae542:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/pcm_iface.c
r4a5ae542 rb7fd2a0 47 47 #include "stream.h" 48 48 49 static int hda_get_info_str(ddf_fun_t *, const char **);49 static errno_t hda_get_info_str(ddf_fun_t *, const char **); 50 50 static unsigned hda_query_cap(ddf_fun_t *, audio_cap_t); 51 static int hda_test_format(ddf_fun_t *, unsigned *, unsigned *,51 static errno_t hda_test_format(ddf_fun_t *, unsigned *, unsigned *, 52 52 pcm_sample_format_t *); 53 static int hda_get_buffer(ddf_fun_t *, void **, size_t *);54 static int hda_get_buffer_position(ddf_fun_t *, size_t *);55 static int hda_set_event_session(ddf_fun_t *, async_sess_t *);53 static errno_t hda_get_buffer(ddf_fun_t *, void **, size_t *); 54 static errno_t hda_get_buffer_position(ddf_fun_t *, size_t *); 55 static errno_t hda_set_event_session(ddf_fun_t *, async_sess_t *); 56 56 static async_sess_t *hda_get_event_session(ddf_fun_t *); 57 static int hda_release_buffer(ddf_fun_t *);58 static int hda_start_playback(ddf_fun_t *, unsigned, unsigned, unsigned,57 static errno_t hda_release_buffer(ddf_fun_t *); 58 static errno_t hda_start_playback(ddf_fun_t *, unsigned, unsigned, unsigned, 59 59 pcm_sample_format_t); 60 static int hda_stop_playback(ddf_fun_t *, bool);61 static int hda_start_capture(ddf_fun_t *, unsigned, unsigned, unsigned,60 static errno_t hda_stop_playback(ddf_fun_t *, bool); 61 static errno_t hda_start_capture(ddf_fun_t *, unsigned, unsigned, unsigned, 62 62 pcm_sample_format_t); 63 static int hda_stop_capture(ddf_fun_t *, bool);63 static errno_t hda_stop_capture(ddf_fun_t *, bool); 64 64 65 65 audio_pcm_iface_t hda_pcm_iface = { … … 90 90 } 91 91 92 static int hda_get_info_str(ddf_fun_t *fun, const char **name)92 static errno_t hda_get_info_str(ddf_fun_t *fun, const char **name) 93 93 { 94 94 ddf_msg(LVL_NOTE, "hda_get_info_str()"); … … 120 120 return 16384; 121 121 default: 122 return ENOTSUP;123 } 124 } 125 126 static int hda_test_format(ddf_fun_t *fun, unsigned *channels,122 return -1; 123 } 124 } 125 126 static errno_t hda_test_format(ddf_fun_t *fun, unsigned *channels, 127 127 unsigned *rate, pcm_sample_format_t *format) 128 128 { 129 int rc = EOK;129 errno_t rc = EOK; 130 130 131 131 ddf_msg(LVL_NOTE, "hda_test_format(%u, %u, %d)\n", … … 150 150 } 151 151 152 static int hda_get_buffer(ddf_fun_t *fun, void **buffer, size_t *size)153 { 154 hda_t *hda = fun_to_hda(fun); 155 int rc;152 static errno_t hda_get_buffer(ddf_fun_t *fun, void **buffer, size_t *size) 153 { 154 hda_t *hda = fun_to_hda(fun); 155 errno_t rc; 156 156 157 157 hda_lock(hda); … … 183 183 } 184 184 185 static int hda_get_buffer_position(ddf_fun_t *fun, size_t *pos)185 static errno_t hda_get_buffer_position(ddf_fun_t *fun, size_t *pos) 186 186 { 187 187 ddf_msg(LVL_NOTE, "hda_get_buffer_position()"); … … 189 189 } 190 190 191 static int hda_set_event_session(ddf_fun_t *fun, async_sess_t *sess)191 static errno_t hda_set_event_session(ddf_fun_t *fun, async_sess_t *sess) 192 192 { 193 193 hda_t *hda = fun_to_hda(fun); … … 215 215 } 216 216 217 static int hda_release_buffer(ddf_fun_t *fun)217 static errno_t hda_release_buffer(ddf_fun_t *fun) 218 218 { 219 219 hda_t *hda = fun_to_hda(fun); … … 234 234 } 235 235 236 static int hda_start_playback(ddf_fun_t *fun, unsigned frames,236 static errno_t hda_start_playback(ddf_fun_t *fun, unsigned frames, 237 237 unsigned channels, unsigned rate, pcm_sample_format_t format) 238 238 { 239 239 hda_t *hda = fun_to_hda(fun); 240 int rc;240 errno_t rc; 241 241 242 242 ddf_msg(LVL_NOTE, "hda_start_playback()"); … … 275 275 } 276 276 277 static int hda_stop_playback(ddf_fun_t *fun, bool immediate)277 static errno_t hda_stop_playback(ddf_fun_t *fun, bool immediate) 278 278 { 279 279 hda_t *hda = fun_to_hda(fun); … … 293 293 } 294 294 295 static int hda_start_capture(ddf_fun_t *fun, unsigned frames, unsigned channels,295 static errno_t hda_start_capture(ddf_fun_t *fun, unsigned frames, unsigned channels, 296 296 unsigned rate, pcm_sample_format_t format) 297 297 { 298 298 hda_t *hda = fun_to_hda(fun); 299 int rc;299 errno_t rc; 300 300 301 301 ddf_msg(LVL_NOTE, "hda_start_capture()"); … … 334 334 } 335 335 336 static int hda_stop_capture(ddf_fun_t *fun, bool immediate)336 static errno_t hda_stop_capture(ddf_fun_t *fun, bool immediate) 337 337 { 338 338 hda_t *hda = fun_to_hda(fun);
Note:
See TracChangeset
for help on using the changeset viewer.