Changes in uspace/lib/drv/generic/remote_audio_mixer.c [33b8d024:7f80313] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_audio_mixer.c
r33b8d024 r7f80313 94 94 * @return Error code. 95 95 */ 96 errno_t audio_mixer_get_info(async_exch_t *exch,char **name, unsigned *items)96 int audio_mixer_get_info(async_exch_t *exch, const char **name, unsigned *items) 97 97 { 98 98 if (!exch) 99 99 return EINVAL; 100 100 sysarg_t name_size, itemc; 101 const errno_t ret = async_req_1_2(exch, DEV_IFACE_ID(AUDIO_MIXER_IFACE),101 const int ret = async_req_1_2(exch, DEV_IFACE_ID(AUDIO_MIXER_IFACE), 102 102 IPC_M_AUDIO_MIXER_GET_INFO, &name_size, &itemc); 103 103 if (ret == EOK && name) { … … 109 109 return ENOMEM; 110 110 } 111 const errno_t ret =111 const int ret = 112 112 async_data_read_start(exch, name_place, name_size); 113 113 if (ret != EOK) { … … 130 130 * @return Error code. 131 131 */ 132 errno_t audio_mixer_get_item_info(async_exch_t *exch, unsigned item,133 c har **name, unsigned *levels)132 int audio_mixer_get_item_info(async_exch_t *exch, unsigned item, 133 const char **name, unsigned *levels) 134 134 { 135 135 if (!exch) 136 136 return EINVAL; 137 137 sysarg_t name_size, lvls; 138 const errno_t ret = async_req_2_2(exch, DEV_IFACE_ID(AUDIO_MIXER_IFACE),138 const int ret = async_req_2_2(exch, DEV_IFACE_ID(AUDIO_MIXER_IFACE), 139 139 IPC_M_AUDIO_MIXER_GET_ITEM_INFO, item, &name_size, &lvls); 140 140 if (ret == EOK && name) { … … 146 146 return ENOMEM; 147 147 } 148 const errno_t ret =148 const int ret = 149 149 async_data_read_start(exch, name_place, name_size); 150 150 if (ret != EOK) { … … 166 166 * @return Error code. 167 167 */ 168 errno_t audio_mixer_set_item_level(async_exch_t *exch, unsigned item,168 int audio_mixer_set_item_level(async_exch_t *exch, unsigned item, 169 169 unsigned level) 170 170 { … … 183 183 * @return Error code. 184 184 */ 185 errno_t audio_mixer_get_item_level(async_exch_t *exch, unsigned item,185 int audio_mixer_get_item_level(async_exch_t *exch, unsigned item, 186 186 unsigned *level) 187 187 { … … 189 189 return EINVAL; 190 190 sysarg_t current; 191 const errno_t ret = async_req_2_1(exch, DEV_IFACE_ID(AUDIO_MIXER_IFACE),191 const int ret = async_req_2_1(exch, DEV_IFACE_ID(AUDIO_MIXER_IFACE), 192 192 IPC_M_AUDIO_MIXER_GET_ITEM_LEVEL, item, ¤t); 193 193 if (ret == EOK && level) … … 229 229 const char *name = NULL; 230 230 unsigned items = 0; 231 const errno_t ret = mixer_iface->get_info(fun, &name, &items);231 const int ret = mixer_iface->get_info(fun, &name, &items); 232 232 const size_t name_size = name ? str_size(name) + 1 : 0; 233 233 async_answer_2(callid, ret, name_size, items); … … 261 261 const char *name = NULL; 262 262 unsigned values = 0; 263 const errno_t ret = mixer_iface->get_item_info(fun, item, &name, &values);263 const int ret = mixer_iface->get_item_info(fun, item, &name, &values); 264 264 const size_t name_size = name ? str_size(name) + 1 : 0; 265 265 async_answer_2(callid, ret, name_size, values); … … 291 291 const unsigned item = DEV_IPC_GET_ARG1(*call); 292 292 const unsigned value = DEV_IPC_GET_ARG2(*call); 293 const errno_t ret = mixer_iface->set_item_level(fun, item, value);293 const int ret = mixer_iface->set_item_level(fun, item, value); 294 294 async_answer_0(callid, ret); 295 295 } … … 306 306 const unsigned item = DEV_IPC_GET_ARG1(*call); 307 307 unsigned current = 0; 308 const errno_t ret =308 const int ret = 309 309 mixer_iface->get_item_level(fun, item, ¤t); 310 310 async_answer_1(callid, ret, current);
Note:
See TracChangeset
for help on using the changeset viewer.