Index: uspace/app/wavplay/dplay.c
===================================================================
--- uspace/app/wavplay/dplay.c	(revision a99cbc1e2f454ad3c85123d255ae6bc002a5085c)
+++ uspace/app/wavplay/dplay.c	(revision e1724290c4104a6acf5a433238f7faa147e83cb6)
@@ -345,5 +345,7 @@
 	}
 	printf("Playing on device: %s.\n", device);
-	if (audio_pcm_query_cap(session, AUDIO_CAP_PLAYBACK) <= 0) {
+	sysarg_t val;
+	ret = audio_pcm_query_cap(session, AUDIO_CAP_PLAYBACK, &val);
+	if (ret != EOK || !val) {
 		printf("Device %s does not support playback\n", device);
 		ret = ENOTSUP;
@@ -386,8 +388,10 @@
 		goto cleanup;
 	}
-	if (audio_pcm_query_cap(pb.device, AUDIO_CAP_BUFFER_POS) > 0) {
+	ret = audio_pcm_query_cap(pb.device, AUDIO_CAP_BUFFER_POS, &val);
+	if (ret == EOK && val) {
 		play(&pb);
 	} else {
-		if (audio_pcm_query_cap(pb.device, AUDIO_CAP_INTERRUPT) > 0)
+		ret = audio_pcm_query_cap(pb.device, AUDIO_CAP_INTERRUPT, &val);
+		if (ret == EOK && val)
 			play_fragment(&pb);
 		else
Index: uspace/app/wavplay/drec.c
===================================================================
--- uspace/app/wavplay/drec.c	(revision a99cbc1e2f454ad3c85123d255ae6bc002a5085c)
+++ uspace/app/wavplay/drec.c	(revision e1724290c4104a6acf5a433238f7faa147e83cb6)
@@ -176,4 +176,5 @@
 	int ret = EOK;
 	audio_pcm_sess_t *session = NULL;
+	sysarg_t val;
 	if (str_cmp(device, "default") == 0) {
 		session = audio_pcm_open_default();
@@ -186,5 +187,6 @@
 	}
 	printf("Recording on device: %s.\n", device);
-	if (audio_pcm_query_cap(session, AUDIO_CAP_CAPTURE) <= 0) {
+	ret = audio_pcm_query_cap(session, AUDIO_CAP_CAPTURE, &val);
+	if (ret != EOK || !val) {
 		printf("Device %s does not support recording\n", device);
 		ret = ENOTSUP;
@@ -225,5 +227,6 @@
 		goto cleanup;
 	}
-	if (audio_pcm_query_cap(rec.device, AUDIO_CAP_INTERRUPT) > 0)
+	ret = audio_pcm_query_cap(rec.device, AUDIO_CAP_INTERRUPT, &val);
+	if (ret == EOK && val)
 		record_fragment(&rec, format);
 	else
Index: uspace/lib/drv/generic/remote_audio_pcm.c
===================================================================
--- uspace/lib/drv/generic/remote_audio_pcm.c	(revision a99cbc1e2f454ad3c85123d255ae6bc002a5085c)
+++ uspace/lib/drv/generic/remote_audio_pcm.c	(revision e1724290c4104a6acf5a433238f7faa147e83cb6)
@@ -221,18 +221,15 @@
  * @param sess Audio device session.
  * @param cap  Audio device capability.
- * @param val  Place to store queried value.
- *
- * @return Error code.
- */
-int audio_pcm_query_cap(audio_pcm_sess_t *sess, audio_cap_t cap)
-{
-	async_exch_t *exch = async_exchange_begin(sess);
-	sysarg_t value = 0;
+ * @param[out] val  Place to store queried value.
+ *
+ * @return Error code.
+ */
+int audio_pcm_query_cap(audio_pcm_sess_t *sess, audio_cap_t cap, sysarg_t *value)
+{
+	async_exch_t *exch = async_exchange_begin(sess);
 	const int ret = async_req_2_1(exch,
 	    DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE), IPC_M_AUDIO_PCM_QUERY_CAPS,
-	    cap, &value);
-	async_exchange_end(exch);
-	if (ret == EOK)
-		return value;
+	    cap, value);
+	async_exchange_end(exch);
 	return ret;
 }
Index: uspace/lib/drv/include/audio_pcm_iface.h
===================================================================
--- uspace/lib/drv/include/audio_pcm_iface.h	(revision a99cbc1e2f454ad3c85123d255ae6bc002a5085c)
+++ uspace/lib/drv/include/audio_pcm_iface.h	(revision e1724290c4104a6acf5a433238f7faa147e83cb6)
@@ -83,5 +83,5 @@
 int audio_pcm_test_format(audio_pcm_sess_t *, unsigned *, unsigned *,
     pcm_sample_format_t *);
-int audio_pcm_query_cap(audio_pcm_sess_t *, audio_cap_t);
+int audio_pcm_query_cap(audio_pcm_sess_t *, audio_cap_t, sysarg_t *);
 int audio_pcm_register_event_callback(audio_pcm_sess_t *,
     async_port_handler_t, void *);
Index: uspace/srv/audio/hound/audio_device.c
===================================================================
--- uspace/srv/audio/hound/audio_device.c	(revision a99cbc1e2f454ad3c85123d255ae6bc002a5085c)
+++ uspace/srv/audio/hound/audio_device.c	(revision e1724290c4104a6acf5a433238f7faa147e83cb6)
@@ -121,5 +121,7 @@
 {
 	assert(dev);
-	if (audio_pcm_query_cap(dev->sess, AUDIO_CAP_CAPTURE))
+	sysarg_t val;
+	int rc = audio_pcm_query_cap(dev->sess, AUDIO_CAP_CAPTURE, &val);
+	if (rc == EOK && val)
 		return &dev->source;
 	return NULL;
@@ -135,5 +137,7 @@
 {
 	assert(dev);
-	if (audio_pcm_query_cap(dev->sess, AUDIO_CAP_PLAYBACK))
+	sysarg_t val;
+	int rc = audio_pcm_query_cap(dev->sess, AUDIO_CAP_PLAYBACK, &val);
+	if (rc == EOK && val)
 		return &dev->sink;
 	return NULL;
