Index: uspace/lib/drv/generic/remote_audio_pcm.c
===================================================================
--- uspace/lib/drv/generic/remote_audio_pcm.c	(revision 1912b4519763bcbb573d6ccbc668efc042d978fa)
+++ uspace/lib/drv/generic/remote_audio_pcm.c	(revision c799138bf81eb70094913af3d4fab04d7d8b72a2)
@@ -36,4 +36,5 @@
 #include <ddf/log.h>
 #include <errno.h>
+#include <macros.h>
 #include <str.h>
 #include <as.h>
@@ -58,4 +59,9 @@
 } audio_pcm_iface_funcs_t;
 
+/**
+ * Get human readable capability name.
+ * @param cap audio capability.
+ * @return Valid string
+ */
 const char *audio_pcm_cap_str(audio_cap_t cap)
 {
@@ -69,5 +75,5 @@
 		[AUDIO_CAP_INTERRUPT_MAX_FRAMES] = "MAXIMUM FRAGMENT SIZE",
 	};
-	if (cap > (sizeof(caps) / sizeof(*caps)))
+	if (cap >= ARRAY_SIZE(caps))
 		return "UNKNOWN CAP";
 	return caps[cap];
@@ -75,4 +81,9 @@
 }
 
+/**
+ * Get human readable event name.
+ * @param event Audio device event
+ * @return Valid string
+ */
 const char *audio_pcm_event_str(pcm_event_t event)
 {
@@ -85,5 +96,5 @@
 		[PCM_EVENT_CAPTURE_TERMINATED] = "CAPTURE TERMINATED",
 	};
-	if (event > (sizeof(events) / sizeof(*events)))
+	if (event >= ARRAY_SIZE(events))
 		return "UNKNOWN EVENT";
 	return events[event];
@@ -123,4 +134,5 @@
 	return session;
 }
+
 /**
  * Open audio session with device identified by location service string.
