Ignore:
Timestamp:
2017-12-08T21:03:35Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
86bbca4
Parents:
a99cbc1e
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-08 02:50:42)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-08 21:03:35)
Message:

Let audio_pcm_query_cap() return value separately from error code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_audio_pcm.c

    ra99cbc1e re172429  
    221221 * @param sess Audio device session.
    222222 * @param cap  Audio device capability.
    223  * @param val  Place to store queried value.
    224  *
    225  * @return Error code.
    226  */
    227 int audio_pcm_query_cap(audio_pcm_sess_t *sess, audio_cap_t cap)
    228 {
    229         async_exch_t *exch = async_exchange_begin(sess);
    230         sysarg_t value = 0;
     223 * @param[out] val  Place to store queried value.
     224 *
     225 * @return Error code.
     226 */
     227int audio_pcm_query_cap(audio_pcm_sess_t *sess, audio_cap_t cap, sysarg_t *value)
     228{
     229        async_exch_t *exch = async_exchange_begin(sess);
    231230        const int ret = async_req_2_1(exch,
    232231            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE), IPC_M_AUDIO_PCM_QUERY_CAPS,
    233             cap, &value);
    234         async_exchange_end(exch);
    235         if (ret == EOK)
    236                 return value;
     232            cap, value);
     233        async_exchange_end(exch);
    237234        return ret;
    238235}
Note: See TracChangeset for help on using the changeset viewer.