Index: uspace/drv/audio/sb16/dsp.c
===================================================================
--- uspace/drv/audio/sb16/dsp.c	(revision 346643c2f57ffde73d6cc28deeda63ae2db724b7)
+++ uspace/drv/audio/sb16/dsp.c	(revision 9b2ac3d03cc02fb5c915ea8a9e6e333456f091c4)
@@ -33,4 +33,5 @@
  */
 
+#include <bool.h>
 #include <devman.h>
 #include <device/hw_res.h>
@@ -38,5 +39,5 @@
 #include <libarch/barrier.h>
 #include <str_error.h>
-#include <bool.h>
+#include <audio_pcm_iface.h>
 
 #include "dma.h"
@@ -162,4 +163,5 @@
 	dsp->event_exchange = NULL;
 	dsp->sb_dev = dev;
+	dsp->status = DSP_STOPPED;
 	sb_dsp_reset(dsp);
 	/* "DSP takes about 100 microseconds to initialize itself" */
@@ -188,5 +190,20 @@
 	assert(dsp);
 	if (dsp->event_exchange) {
-		async_msg_0(dsp->event_exchange, IPC_FIRST_USER_METHOD);
+		switch (dsp->status) {
+		case DSP_PLAYBACK:
+			async_msg_0(dsp->event_exchange,
+			    PCM_EVENT_PLAYBACK_DONE);
+			break;
+		case DSP_RECORDING:
+			async_msg_0(dsp->event_exchange,
+			    PCM_EVENT_RECORDING_DONE);
+			break;
+		default:
+		case DSP_STOPPED:
+			ddf_log_warning("Interrupt while DSP stopped and "
+			    "event exchange present. Terminating exchange");
+			async_exchange_end(dsp->event_exchange);
+			dsp->event_exchange = NULL;
+		}
 	} else {
 		ddf_log_warning("Interrupt with no event consumer.");
@@ -316,5 +333,5 @@
 	    sampling_rate / (dsp->active.samples * channels));
 
-	dsp->active.playing = true;
+	dsp->status = DSP_PLAYBACK;
 
 	return EOK;
@@ -326,6 +343,9 @@
 	if (id != BUFFER_ID)
 		return ENOENT;
+	sb_dsp_write(dsp, DMA_16B_EXIT);
+	ddf_log_debug("Stopping playback on buffer %u.", id);
+	async_msg_0(dsp->event_exchange, PCM_EVENT_PLAYBACK_TERMINATED);
 	async_exchange_end(dsp->event_exchange);
-	sb_dsp_write(dsp, DMA_16B_EXIT);
+	dsp->event_exchange = NULL;
 	return EOK;
 }
@@ -389,5 +409,5 @@
 	    "(~1/%u sec)", dsp->active.samples,
 	    sampling_rate / (dsp->active.samples * channels));
-	dsp->active.playing = false;
+	dsp->status = DSP_RECORDING;
 
 	return EOK;
@@ -399,6 +419,9 @@
 	if (id != BUFFER_ID)
 		return ENOENT;
+	sb_dsp_write(dsp, DMA_16B_EXIT);
+	ddf_log_debug("Stopping playback on buffer %u.", id);
+	async_msg_0(dsp->event_exchange, PCM_EVENT_RECORDING_TERMINATED);
 	async_exchange_end(dsp->event_exchange);
-	sb_dsp_write(dsp, DMA_16B_EXIT);
+	dsp->event_exchange = NULL;
 	return EOK;
 }
Index: uspace/drv/audio/sb16/dsp.h
===================================================================
--- uspace/drv/audio/sb16/dsp.h	(revision 346643c2f57ffde73d6cc28deeda63ae2db724b7)
+++ uspace/drv/audio/sb16/dsp.h	(revision 9b2ac3d03cc02fb5c915ea8a9e6e333456f091c4)
@@ -57,6 +57,10 @@
 		uint8_t mode;
 		uint16_t samples;
-		bool playing;
 	} active;
+	enum {
+		DSP_PLAYBACK,
+		DSP_RECORDING,
+		DSP_STOPPED,
+	} status;
 	async_sess_t *event_session;
 	async_exch_t *event_exchange;
