Changeset 5337491 in mainline


Ignore:
Timestamp:
2012-08-30T12:17:36Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e98a8c4
Parents:
f2a92b0
Message:

libdrv, audio_pcm: Use return value for capability values.

Location:
uspace/lib/drv
Files:
2 edited

Legend:

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

    rf2a92b0 r5337491  
    154154 * @return Error code.
    155155 */
    156 int audio_pcm_query_cap(audio_pcm_sess_t *sess, audio_cap_t cap, unsigned *val)
    157 {
    158         if (!val)
    159                 return EINVAL;
     156int audio_pcm_query_cap(audio_pcm_sess_t *sess, audio_cap_t cap)
     157{
    160158        async_exch_t *exch = async_exchange_begin(sess);
    161159        sysarg_t value = 0;
     
    163161            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE), IPC_M_AUDIO_PCM_QUERY_CAPS,
    164162            cap, &value);
     163        async_exchange_end(exch);
    165164        if (ret == EOK)
    166                 *val = value;
    167         async_exchange_end(exch);
     165                return value;
    168166        return ret;
    169167}
  • uspace/lib/drv/include/audio_pcm_iface.h

    rf2a92b0 r5337491  
    7272int audio_pcm_test_format(audio_pcm_sess_t *, unsigned *, unsigned *,
    7373    pcm_sample_format_t *);
    74 int audio_pcm_query_cap(audio_pcm_sess_t *, audio_cap_t, unsigned *);
     74int audio_pcm_query_cap(audio_pcm_sess_t *, audio_cap_t);
    7575int audio_pcm_register_event_callback(audio_pcm_sess_t *,
    7676    async_client_conn_t, void *);
Note: See TracChangeset for help on using the changeset viewer.