Changeset 90f05b0f in mainline for uspace/lib/drv
- Timestamp:
- 2012-07-09T07:46:24Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 68d1313
- Parents:
- 0336354a
- Location:
- uspace/lib/drv
- Files:
-
- 2 edited
- 3 moved
-
Makefile (modified) (1 diff)
-
generic/dev_iface.c (modified) (1 diff)
-
generic/remote_audio_pcm.c (moved) (moved from uspace/lib/drv/generic/remote_audio_pcm_buffer.c ) (17 diffs)
-
include/audio_pcm_iface.h (moved) (moved from uspace/lib/drv/include/audio_pcm_buffer_iface.h ) (4 diffs)
-
include/remote_audio_pcm.h (moved) (moved from uspace/lib/drv/include/remote_audio_pcm_buffer.h ) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/Makefile
r0336354a r90f05b0f 39 39 generic/logbuf.c \ 40 40 generic/remote_audio_mixer.c \ 41 generic/remote_audio_pcm _buffer.c \41 generic/remote_audio_pcm.c \ 42 42 generic/remote_hw_res.c \ 43 43 generic/remote_char_dev.c \ -
uspace/lib/drv/generic/dev_iface.c
r0336354a r90f05b0f 47 47 #include "remote_pci.h" 48 48 #include "remote_audio_mixer.h" 49 #include "remote_audio_pcm _buffer.h"49 #include "remote_audio_pcm.h" 50 50 51 51 static const iface_dipatch_table_t remote_ifaces = { 52 52 .ifaces = { 53 53 [AUDIO_MIXER_IFACE] = &remote_audio_mixer_iface, 54 [AUDIO_PCM_BUFFER_IFACE] = &remote_audio_pcm_ buffer_iface,54 [AUDIO_PCM_BUFFER_IFACE] = &remote_audio_pcm_iface, 55 55 [HW_RES_DEV_IFACE] = &remote_hw_res_iface, 56 56 [CHAR_DEV_IFACE] = &remote_char_dev_iface, -
uspace/lib/drv/generic/remote_audio_pcm.c
r0336354a r90f05b0f 1 1 /* 2 * Copyright (c) 201 1Jan Vesely2 * Copyright (c) 2012 Jan Vesely 3 3 * All rights reserved. 4 4 * … … 39 39 #include <sys/mman.h> 40 40 41 #include "audio_pcm_ buffer_iface.h"41 #include "audio_pcm_iface.h" 42 42 #include "ddf/driver.h" 43 43 … … 55 55 * CLIENT SIDE 56 56 */ 57 int audio_pcm_ buffer_get_info_str(async_exch_t *exch, const char **name)57 int audio_pcm_get_info_str(async_exch_t *exch, const char **name) 58 58 { 59 59 if (!exch) … … 82 82 } 83 83 84 int audio_pcm_ buffer_get_buffer(async_exch_t *exch, void **buffer, size_t *size,84 int audio_pcm_get_buffer(async_exch_t *exch, void **buffer, size_t *size, 85 85 unsigned *id, async_client_conn_t event_rec, void* arg) 86 86 { … … 110 110 } 111 111 112 int audio_pcm_ buffer_release_buffer(async_exch_t *exch, unsigned id)112 int audio_pcm_release_buffer(async_exch_t *exch, unsigned id) 113 113 { 114 114 if (!exch) … … 118 118 } 119 119 120 int audio_pcm_ buffer_start_playback(async_exch_t *exch, unsigned id,120 int audio_pcm_start_playback(async_exch_t *exch, unsigned id, 121 121 unsigned parts, unsigned sample_rate, uint16_t sample_size, 122 122 uint8_t channels, bool sign) … … 131 131 } 132 132 133 int audio_pcm_ buffer_stop_playback(async_exch_t *exch, unsigned id)133 int audio_pcm_stop_playback(async_exch_t *exch, unsigned id) 134 134 { 135 135 if (!exch) … … 139 139 } 140 140 141 int audio_pcm_ buffer_start_record(async_exch_t *exch, unsigned id,141 int audio_pcm_start_record(async_exch_t *exch, unsigned id, 142 142 unsigned parts, unsigned sample_rate, uint16_t sample_size, 143 143 uint8_t channels, bool sign) … … 152 152 } 153 153 154 int audio_pcm_ buffer_stop_record(async_exch_t *exch, unsigned id)154 int audio_pcm_stop_record(async_exch_t *exch, unsigned id) 155 155 { 156 156 if (!exch) … … 183 183 184 184 /** Remote audio mixer interface structure. */ 185 remote_iface_t remote_audio_pcm_ buffer_iface = {185 remote_iface_t remote_audio_pcm_iface = { 186 186 .method_count = sizeof(remote_audio_pcm_iface_ops) / 187 187 sizeof(remote_audio_pcm_iface_ops[0]), … … 192 192 ipc_callid_t callid, ipc_call_t *call) 193 193 { 194 const audio_pcm_ buffer_iface_t *pcm_iface = iface;194 const audio_pcm_iface_t *pcm_iface = iface; 195 195 196 196 if (!pcm_iface->get_info_str) { … … 221 221 ipc_callid_t callid, ipc_call_t *call) 222 222 { 223 const audio_pcm_ buffer_iface_t *pcm_iface = iface;223 const audio_pcm_iface_t *pcm_iface = iface; 224 224 225 225 if (!pcm_iface->get_buffer || … … 294 294 ipc_callid_t callid, ipc_call_t *call) 295 295 { 296 const audio_pcm_ buffer_iface_t *pcm_iface = iface;296 const audio_pcm_iface_t *pcm_iface = iface; 297 297 298 298 const unsigned id = DEV_IPC_GET_ARG1(*call); … … 305 305 ipc_callid_t callid, ipc_call_t *call) 306 306 { 307 const audio_pcm_ buffer_iface_t *pcm_iface = iface;307 const audio_pcm_iface_t *pcm_iface = iface; 308 308 309 309 const unsigned id = DEV_IPC_GET_ARG1(*call); … … 323 323 ipc_callid_t callid, ipc_call_t *call) 324 324 { 325 const audio_pcm_ buffer_iface_t *pcm_iface = iface;325 const audio_pcm_iface_t *pcm_iface = iface; 326 326 327 327 const unsigned id = DEV_IPC_GET_ARG1(*call); … … 334 334 ipc_callid_t callid, ipc_call_t *call) 335 335 { 336 const audio_pcm_ buffer_iface_t *pcm_iface = iface;336 const audio_pcm_iface_t *pcm_iface = iface; 337 337 338 338 const unsigned id = DEV_IPC_GET_ARG1(*call); … … 352 352 ipc_callid_t callid, ipc_call_t *call) 353 353 { 354 const audio_pcm_ buffer_iface_t *pcm_iface = iface;354 const audio_pcm_iface_t *pcm_iface = iface; 355 355 356 356 const unsigned id = DEV_IPC_GET_ARG1(*call); -
uspace/lib/drv/include/audio_pcm_iface.h
r0336354a r90f05b0f 1 1 /* 2 * Copyright (c) 201 1Jan Vesely2 * Copyright (c) 2012 Jan Vesely 3 3 * All rights reserved. 4 4 * … … 34 34 */ 35 35 36 #ifndef LIBDRV_AUDIO_PCM_ BUFFER_IFACE_H_37 #define LIBDRV_AUDIO_PCM_ BUFFER_IFACE_H_36 #ifndef LIBDRV_AUDIO_PCM_IFACE_H_ 37 #define LIBDRV_AUDIO_PCM_IFACE_H_ 38 38 39 39 #include <async.h> … … 42 42 #include "ddf/driver.h" 43 43 44 int audio_pcm_ buffer_get_info_str(async_exch_t *, const char **);45 int audio_pcm_ buffer_get_buffer(async_exch_t *, void **, size_t *, unsigned *,44 int audio_pcm_get_info_str(async_exch_t *, const char **); 45 int audio_pcm_get_buffer(async_exch_t *, void **, size_t *, unsigned *, 46 46 async_client_conn_t, void *); 47 int audio_pcm_ buffer_release_buffer(async_exch_t *, unsigned);47 int audio_pcm_release_buffer(async_exch_t *, unsigned); 48 48 49 int audio_pcm_ buffer_start_playback(async_exch_t *, unsigned, unsigned,49 int audio_pcm_start_playback(async_exch_t *, unsigned, unsigned, 50 50 unsigned, uint16_t, uint8_t, bool); 51 int audio_pcm_ buffer_stop_playback(async_exch_t *, unsigned);51 int audio_pcm_stop_playback(async_exch_t *, unsigned); 52 52 53 int audio_pcm_ buffer_start_record(async_exch_t *, unsigned, unsigned,53 int audio_pcm_start_record(async_exch_t *, unsigned, unsigned, 54 54 unsigned, uint16_t, uint8_t, bool); 55 int audio_pcm_ buffer_stop_record(async_exch_t *, unsigned);55 int audio_pcm_stop_record(async_exch_t *, unsigned); 56 56 57 57 /** Audio pcm communication interface. */ … … 67 67 unsigned, unsigned, unsigned, bool); 68 68 int (*stop_record)(ddf_fun_t *, unsigned); 69 } audio_pcm_ buffer_iface_t;69 } audio_pcm_iface_t; 70 70 71 71 #endif -
uspace/lib/drv/include/remote_audio_pcm.h
r0336354a r90f05b0f 35 35 #define LIBDRV_REMOTE_AUDIO_PCM_H_ 36 36 37 extern remote_iface_t remote_audio_pcm_ buffer_iface;37 extern remote_iface_t remote_audio_pcm_iface; 38 38 39 39 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
