Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/audio/hound/hound.c

    rb7fd2a0 r8a637a4  
    110110}
    111111
    112 static errno_t hound_disconnect_internal(hound_t *hound, const char* source_name, const char* sink_name);
     112static int hound_disconnect_internal(hound_t *hound, const char* source_name, const char* sink_name);
    113113
    114114/**
     
    162162 * @return Error code.
    163163 */
    164 errno_t hound_init(hound_t *hound)
     164int hound_init(hound_t *hound)
    165165{
    166166        assert(hound);
     
    180180 * @return Error code.
    181181 */
    182 errno_t hound_add_ctx(hound_t *hound, hound_ctx_t *ctx)
     182int hound_add_ctx(hound_t *hound, hound_ctx_t *ctx)
    183183{
    184184        log_info("Trying to add context %p", ctx);
     
    189189        list_append(&ctx->link, &hound->contexts);
    190190        fibril_mutex_unlock(&hound->list_guard);
    191         errno_t ret = EOK;
     191        int ret = EOK;
    192192        if (ret == EOK && ctx->source)
    193193                ret = hound_add_source(hound, ctx->source);
     
    208208 * @return Error code.
    209209 */
    210 errno_t hound_remove_ctx(hound_t *hound, hound_ctx_t *ctx)
     210int hound_remove_ctx(hound_t *hound, hound_ctx_t *ctx)
    211211{
    212212        assert(hound);
     
    254254 * @return Error code.
    255255 */
    256 errno_t hound_add_device(hound_t *hound, service_id_t id, const char *name)
     256int hound_add_device(hound_t *hound, service_id_t id, const char *name)
    257257{
    258258        log_verbose("Adding device \"%s\", service: %zu", name, id);
     
    283283        }
    284284
    285         const errno_t ret = audio_device_init(dev, id, name);
     285        const int ret = audio_device_init(dev, id, name);
    286286        if (ret != EOK) {
    287287                log_debug("Failed to initialize new audio device: %s",
     
    296296        audio_source_t *source = audio_device_get_source(dev);
    297297        if (source) {
    298                 const errno_t ret = hound_add_source(hound, source);
     298                const int ret = hound_add_source(hound, source);
    299299                if (ret != EOK) {
    300300                        log_debug("Failed to add device source: %s",
     
    308308        audio_sink_t *sink = audio_device_get_sink(dev);
    309309        if (sink) {
    310                 const errno_t ret = hound_add_sink(hound, sink);
     310                const int ret = hound_add_sink(hound, sink);
    311311                if (ret != EOK) {
    312312                        log_debug("Failed to add device sink: %s",
     
    330330 * @return Error code.
    331331 */
    332 errno_t hound_add_source(hound_t *hound, audio_source_t *source)
     332int hound_add_source(hound_t *hound, audio_source_t *source)
    333333{
    334334        assert(hound);
     
    354354 * @return Error code.
    355355 */
    356 errno_t hound_add_sink(hound_t *hound, audio_sink_t *sink)
     356int hound_add_sink(hound_t *hound, audio_sink_t *sink)
    357357{
    358358        assert(hound);
     
    378378 * @return Error code.
    379379 */
    380 errno_t hound_remove_source(hound_t *hound, audio_source_t *source)
     380int hound_remove_source(hound_t *hound, audio_source_t *source)
    381381{
    382382        assert(hound);
     
    395395 * @return Error code.
    396396 */
    397 errno_t hound_remove_sink(hound_t *hound, audio_sink_t *sink)
     397int hound_remove_sink(hound_t *hound, audio_sink_t *sink)
    398398{
    399399        assert(hound);
     
    413413 * @return Error code.
    414414 */
    415 errno_t hound_list_sources(hound_t *hound, const char ***list, size_t *size)
     415int hound_list_sources(hound_t *hound, const char ***list, size_t *size)
    416416{
    417417        assert(hound);
     
    428428        }
    429429        const char **names = calloc(count, sizeof(char *));
    430         errno_t ret = names ? EOK : ENOMEM;
     430        int ret = names ? EOK : ENOMEM;
    431431        for (unsigned long i = 0; i < count && ret == EOK; ++i) {
    432432                link_t *slink = list_nth(&hound->sources, i);
     
    455455 * @return Error code.
    456456 */
    457 errno_t hound_list_sinks(hound_t *hound, const char ***list, size_t *size)
     457int hound_list_sinks(hound_t *hound, const char ***list, size_t *size)
    458458{
    459459        assert(hound);
     
    470470        }
    471471        const char **names = calloc(count, sizeof(char *));
    472         errno_t ret = names ? EOK : ENOMEM;
     472        int ret = names ? EOK : ENOMEM;
    473473        for (size_t i = 0; i < count && ret == EOK; ++i) {
    474474                link_t *slink = list_nth(&hound->sinks, i);
     
    501501 * identifiers with the same index are connected.
    502502 */
    503 errno_t hound_list_connections(hound_t *hound, const char ***sources,
     503int hound_list_connections(hound_t *hound, const char ***sources,
    504504    const char ***sinks, size_t *size)
    505505{
     
    516516 * @return Error code.
    517517 */
    518 errno_t hound_connect(hound_t *hound, const char* source_name, const char* sink_name)
     518int hound_connect(hound_t *hound, const char* source_name, const char* sink_name)
    519519{
    520520        assert(hound);
     
    555555 * @return Error code.
    556556 */
    557 errno_t hound_disconnect(hound_t *hound, const char* source_name, const char* sink_name)
    558 {
    559         assert(hound);
    560         fibril_mutex_lock(&hound->list_guard);
    561         const errno_t ret = hound_disconnect_internal(hound, source_name, sink_name);
     557int hound_disconnect(hound_t *hound, const char* source_name, const char* sink_name)
     558{
     559        assert(hound);
     560        fibril_mutex_lock(&hound->list_guard);
     561        const int ret = hound_disconnect_internal(hound, source_name, sink_name);
    562562        fibril_mutex_unlock(&hound->list_guard);
    563563        return ret;
     
    573573 * This function has to be called with the list_guard lock held.
    574574 */
    575 static errno_t hound_disconnect_internal(hound_t *hound, const char* source_name,
     575static int hound_disconnect_internal(hound_t *hound, const char* source_name,
    576576    const char* sink_name)
    577577{
Note: See TracChangeset for help on using the changeset viewer.