Index: uspace/lib/pcm/include/pcm/format.h
===================================================================
--- uspace/lib/pcm/include/pcm/format.h	(revision a8e87da39f884f635b581514fbd5bb13bb7d6db6)
+++ uspace/lib/pcm/include/pcm/format.h	(revision b1dfe130f588aa94da97a7dffd925e164fc597c9)
@@ -41,4 +41,5 @@
 #include <pcm/sample_format.h>
 
+/** Linear PCM audio parameters */
 typedef struct {
 	unsigned channels;
@@ -50,4 +51,9 @@
 extern const pcm_format_t AUDIO_FORMAT_ANY;
 
+/**
+ * Frame size helper function.
+ * @param a pointer to a PCM format structure.
+ * @return Size in bytes.
+ */
 static inline size_t pcm_format_frame_size(const pcm_format_t *a)
 {
@@ -55,4 +61,10 @@
 }
 
+/**
+ * Convert byte size to frame count.
+ * @param size Byte-size.
+ * @param a pointer to a PCM format structure.
+ * @return Frame count.
+ */
 static inline size_t pcm_format_size_to_frames(size_t size,
     const pcm_format_t *a)
@@ -62,5 +74,11 @@
 }
 
-static inline suseconds_t pcm_format_size_to_usec(size_t size,
+/**
+ * Convert byte size to audio playback time.
+ * @param size Byte-size.
+ * @param a pointer to a PCM format structure.
+ * @return Number of microseconds.
+ */
+static inline useconds_t pcm_format_size_to_usec(size_t size,
     const pcm_format_t *a)
 {
@@ -70,4 +88,10 @@
 
 bool pcm_format_same(const pcm_format_t *a, const pcm_format_t* b);
+
+/**
+ * Helper function, compares with ANY metaformat.
+ * @param f pointer to format structure.
+ * @return True if @p f points to ANY format, false otherwise.
+ */
 static inline bool pcm_format_is_any(const pcm_format_t *f)
 {
Index: uspace/lib/pcm/include/pcm/sample_format.h
===================================================================
--- uspace/lib/pcm/include/pcm/sample_format.h	(revision a8e87da39f884f635b581514fbd5bb13bb7d6db6)
+++ uspace/lib/pcm/include/pcm/sample_format.h	(revision b1dfe130f588aa94da97a7dffd925e164fc597c9)
@@ -40,4 +40,5 @@
 #include <time.h>
 
+/** Known and supported PCM sample formats */
 typedef enum {
 	PCM_SAMPLE_UINT8,
@@ -63,4 +64,9 @@
 } pcm_sample_format_t;
 
+/**
+ * Query if the format uses signed values.
+ * @param format PCM sample format.
+ * @return True if the format uses signed values, false otherwise.
+ */
 static inline bool pcm_sample_format_is_signed(pcm_sample_format_t format)
 {
@@ -91,4 +97,9 @@
 }
 
+/**
+ * Query byte-size of samples.
+ * @param format PCM sample format.
+ * @return Size in bytes of a single sample.
+ */
 static inline size_t pcm_sample_format_size(pcm_sample_format_t format)
 {
@@ -122,4 +133,10 @@
 }
 
+/**
+ * Query sie of the entire frame.
+ * @param channels Number of samples in every frame.
+ * @param format PCM sample format.
+ * @return Size in bytes.
+ */
 static inline size_t pcm_sample_format_frame_size(unsigned channels,
     pcm_sample_format_t format)
@@ -128,4 +145,11 @@
 }
 
+/**
+ * Count number of frames that fit into a buffer (even incomplete frames).
+ * @param size Size of the buffer.
+ * @param channels Number of samples in every frame.
+ * @param format PCM sample format.
+ * @return Number of frames (even incomplete).
+ */
 static inline size_t pcm_sample_format_size_to_frames(size_t size,
     unsigned channels, pcm_sample_format_t format)
@@ -135,12 +159,25 @@
 }
 
+/**
+ * Convert byte size to time.
+ * @param size Size of the buffer.
+ * @param sample_rate Samples per second.
+ * @param channels Number of samples in every frame.
+ * @param format PCM sample format.
+ * @return Number of useconds of audio data.
+ */
 static inline useconds_t pcm_sample_format_size_to_usec(size_t size,
     unsigned sample_rate, unsigned channels, pcm_sample_format_t format)
 {
-	const long long frames =
+	const unsigned long long frames =
 	    pcm_sample_format_size_to_frames(size, channels, format);
 	return (frames * 1000000ULL) / sample_rate;
 }
 
+/**
+ * Get readable name of a sample format.
+ * @param format PCM sample format.
+ * @return Valid string representation.
+ */
 static inline const char * pcm_sample_format_str(pcm_sample_format_t format)
 {
Index: uspace/lib/pcm/src/format.c
===================================================================
--- uspace/lib/pcm/src/format.c	(revision a8e87da39f884f635b581514fbd5bb13bb7d6db6)
+++ uspace/lib/pcm/src/format.c	(revision b1dfe130f588aa94da97a7dffd925e164fc597c9)
@@ -75,4 +75,5 @@
 #define to(x, type, endian) (float)(host2 ## type ## _ ## endian(x))
 
+/** Default linear PCM format */
 const pcm_format_t AUDIO_FORMAT_DEFAULT = {
 	.channels = 2,
@@ -81,4 +82,7 @@
 	};
 
+/** Special ANY PCM format.
+ * This format is used if the real format is no know or important.
+ */
 const pcm_format_t AUDIO_FORMAT_ANY = {
 	.channels = 0,
