Index: uspace/lib/pcm/src/format.c
===================================================================
--- uspace/lib/pcm/src/format.c	(revision fe0b448b9aa3eff83c270c507c2e31d0eadbded9)
+++ uspace/lib/pcm/src/format.c	(revision f1438e5b77d3cae999c82f40303ef03f3048cb5f)
@@ -90,4 +90,10 @@
     unsigned frame, unsigned channel, const pcm_format_t *f);
 
+/**
+ * Compare PCM format attribtues.
+ * @param a Format description.
+ * @param b Format description.
+ * @return True if a and b describe the same format, false otherwise.
+ */
 bool pcm_format_same(const pcm_format_t *a, const pcm_format_t* b)
 {
@@ -100,4 +106,10 @@
 }
 
+/**
+ * Fill audio buffer with silence in the specified format.
+ * @param dst Destination audio buffer.
+ * @param size Size of the destination audio buffer.
+ * @param f Pointer to the format description.
+ */
 void pcm_format_silence(void *dst, size_t size, const pcm_format_t *f)
 {
@@ -146,8 +158,30 @@
 }
 
+/**
+ * Mix audio data of the same format and size.
+ * @param dst Destination buffer
+ * @param src Source buffer
+ * @param size Size of both the destination and the source buffer
+ * @param f Pointer to the format descriptor.
+ * @return Error code.
+ */
 int pcm_format_mix(void *dst, const void *src, size_t size, const pcm_format_t *f)
 {
 	return pcm_format_convert_and_mix(dst, size, src, size, f, f);
 }
+
+/**
+ * Add and mix audio data.
+ * @param dst Destination audio buffer
+ * @param dst_size Size of the destination buffer
+ * @param src Source audio buffer
+ * @param src_size Size of the source buffer.
+ * @param sf Pointer to the source format descriptor.
+ * @param df Pointer to the destination format descriptor.
+ * @return Error code.
+ *
+ * Buffers must contain entire frames. Destination buffer is always filled.
+ * If there are not enough data in the source buffer silent data is assumed.
+ */
 int pcm_format_convert_and_mix(void *dst, size_t dst_size, const void *src,
     size_t src_size, const pcm_format_t *sf, const pcm_format_t *df)
@@ -160,5 +194,5 @@
 
 	const size_t dst_frame_size = pcm_format_frame_size(df);
-	if ((src_size % dst_frame_size) != 0)
+	if ((dst_size % dst_frame_size) != 0)
 		return EINVAL;
 
@@ -226,5 +260,13 @@
 }
 
-/** Converts all sample formats to float <-1,1> */
+/**
+ * Converts all sample formats to float <-1,1>
+ * @param buffer Audio data
+ * @param size Size of the buffer
+ * @param frame Index of the frame to read
+ * @param channel Channel within the frame
+ * @param f Pointer to a format descriptor
+ * @return Normalized sample <-1,1>, 0.0 if the data could not be read
+ */
 static float get_normalized_sample(const void *buffer, size_t size,
     unsigned frame, unsigned channel, const pcm_format_t *f)
