Index: roard/container_framework.c
===================================================================
--- roard/container_framework.c	(revision 5276)
+++ roard/container_framework.c	(revision 5278)
@@ -197,5 +197,5 @@
 }
 
-off_t   cont_fw_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
+roar_off_t   cont_fw_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence);
 
 int     cont_fw_sync    (struct roar_vio_calls * vio) {
@@ -233,5 +233,5 @@
 }
 
-int     cont_fw_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     cont_fw_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 
 // VIO Parent:
@@ -260,5 +260,5 @@
 }
 
-off_t   cont_pvio_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   cont_pvio_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  return roar_vio_lseek(&(((struct cont_fw_parent_inst*)(vio->inst))->stream.stream->vio), offset, whence);
 }
@@ -268,5 +268,5 @@
 }
 
-int     cont_pvio_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     cont_pvio_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  return roar_vio_ctl(&(((struct cont_fw_parent_inst*)(vio->inst))->stream.stream->vio), cmd, data);
 }
Index: roard/driver.c
===================================================================
--- roard/driver.c	(revision 5276)
+++ roard/driver.c	(revision 5278)
@@ -317,5 +317,5 @@
 #endif
 
-int  driver_dummy_ctl(struct roar_vio_calls * vio, int cmd, void * data) {
+int  driver_dummy_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  switch (cmd) {
   case ROAR_VIO_CTL_NONBLOCK:
Index: roard/driver_alsa.c
===================================================================
--- roard/driver_alsa.c	(revision 5276)
+++ roard/driver_alsa.c	(revision 5278)
@@ -324,5 +324,5 @@
  */
 
-int driver_alsa_ctl(struct roar_vio_calls * vio, int cmd, void * data) {
+int driver_alsa_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  roar_alsa_t       * device    = vio->inst;
  snd_pcm_sframes_t alsa_delay;
Index: roard/driver_artsc.c
===================================================================
--- roard/driver_artsc.c	(revision 5276)
+++ roard/driver_artsc.c	(revision 5278)
@@ -156,5 +156,5 @@
 }
 
-int     driver_artsc_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     driver_artsc_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_artsc * self = vio->inst;
  ssize_t bps;
Index: roard/driver_dmx.c
===================================================================
--- roard/driver_dmx.c	(revision 5242)
+++ roard/driver_dmx.c	(revision 5278)
@@ -66,5 +66,5 @@
   return -1;
 
- if ( roar_vio_lseek(vio, 0, SEEK_SET) == (off_t)-1 )
+ if ( roar_vio_lseek(vio, 0, SEEK_SET) == (roar_off_t)-1 )
   return -1;
 
@@ -72,5 +72,5 @@
 }
 
-int driver_dmx_ctl(struct roar_vio_calls * vio, int cmd, void * data) {
+int driver_dmx_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
 
  if ( vio == NULL )
Index: roard/driver_jack.c
===================================================================
--- roard/driver_jack.c	(revision 5276)
+++ roard/driver_jack.c	(revision 5278)
@@ -163,5 +163,5 @@
 }
 
-int     driver_jack_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     driver_jack_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct driver_jack * self = vio->inst;
  // function for a lot control features.
@@ -184,4 +184,5 @@
     *(int*)data = FH...;
 */
+    roar_err_set(ROAR_ERROR_NOTSUP);
     return -1;
    break;
@@ -191,34 +192,42 @@
    break;
   case ROAR_VIO_CTL_NONBLOCK:
- // control if read and write calls should block untill all data is read or written.
- // state is in *(int*)data and could be:
- //  ROAR_SOCKET_BLOCK    - Block untill the data is read or written
- //  ROAR_SOCKET_NONBLOCK - Return as soon as possible
+    // control if read and write calls should block untill all data is read or written.
+    // state is in *(int*)data and could be:
+    //  ROAR_SOCKET_BLOCK    - Block untill the data is read or written
+    //  ROAR_SOCKET_NONBLOCK - Return as soon as possible
+    roar_err_set(ROAR_ERROR_NOTSUP);
+    return -1;
    break;
   case ROAR_VIO_CTL_GET_AUINFO:
   case ROAR_VIO_CTL_SET_AUINFO:
     // get or set audio info, data is a struct roar_audio_info*.
+    roar_err_set(ROAR_ERROR_NOTSUP);
     return -1;
    break;
   case ROAR_VIO_CTL_GET_DBLKSIZE:
   case ROAR_VIO_CTL_SET_DBLKSIZE:
-     // get or set block size used, data is uint_least32_t*, number of bytes.
+    // get or set block size used, data is uint_least32_t*, number of bytes.
+    roar_err_set(ROAR_ERROR_NOTSUP);
     return -1;
    break;
   case ROAR_VIO_CTL_GET_DBLOCKS:
   case ROAR_VIO_CTL_SET_DBLOCKS:
-     // get or set number of blocks used, data is uint_least32_t*.
+    // get or set number of blocks used, data is uint_least32_t*.
+    roar_err_set(ROAR_ERROR_NOTSUP);
     return -1;
    break;
   case ROAR_VIO_CTL_SET_SSTREAM:
     // set server stream object for this stream, data is struct roar_stream_server*
+    roar_err_set(ROAR_ERROR_NOTSUP);
     return -1;
    break;
   case ROAR_VIO_CTL_SET_SSTREAMID:
     // set stream ID for this stream, data is int*
+    roar_err_set(ROAR_ERROR_NOTSUP);
     return -1;
    break;
   case ROAR_VIO_CTL_SET_VOLUME:
     // set volume for this device, data is struct roar_mixer_settings*
+    roar_err_set(ROAR_ERROR_NOTSUP);
     return -1;
    break;
@@ -226,10 +235,11 @@
     // get delay of this stream, data is uint_least32_t*, in bytes
     // there is more about delay. please ask.
-    return -1;
-   break;
-  default:
-    return -1;
-   break;
- }
+    roar_err_set(ROAR_ERROR_NOTSUP);
+    return -1;
+   break;
+ }
+
+ roar_err_set(ROAR_ERROR_BADRQC);
+ return -1;
 }
 
Index: roard/driver_oss.c
===================================================================
--- roard/driver_oss.c	(revision 5276)
+++ roard/driver_oss.c	(revision 5278)
@@ -455,5 +455,5 @@
 }
 
-int driver_oss_ctl(struct roar_vio_calls * vio, int cmd, void * data) {
+int driver_oss_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct driver_oss * self = vio->inst;
 #ifdef SNDCTL_DSP_GETODELAY
Index: roard/driver_pulsesimple.c
===================================================================
--- roard/driver_pulsesimple.c	(revision 5276)
+++ roard/driver_pulsesimple.c	(revision 5278)
@@ -159,5 +159,5 @@
 }
 
-int     driver_pulsesimple_ctl          (struct roar_vio_calls * vio, int cmd, void * data) {
+int     driver_pulsesimple_ctl          (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct driver_pulsesimple * self = vio->inst;
 
Index: roard/driver_pwmled.c
===================================================================
--- roard/driver_pwmled.c	(revision 5276)
+++ roard/driver_pwmled.c	(revision 5278)
@@ -122,5 +122,5 @@
 }
 
-int driver_pwmled_ctl(struct roar_vio_calls * vio, int cmd, void * data) {
+int driver_pwmled_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct driver_pwmled * self = vio->inst;
 
Index: roard/driver_sndio.c
===================================================================
--- roard/driver_sndio.c	(revision 5276)
+++ roard/driver_sndio.c	(revision 5278)
@@ -37,5 +37,4 @@
  vio->sync     = driver_sndio_sync;
  vio->ctl      = driver_sndio_ctl;
- vio->nonblock = driver_dummy_nonblock;
 
  vio->inst     = (void*) inst;
@@ -230,5 +229,5 @@
 #define no_data(x) x: if ( data != NULL ) return -1;
 
-int     driver_sndio_ctl          (struct roar_vio_calls * vio, int cmd, void * data) {
+int     driver_sndio_ctl          (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct driver_sndio * self = vio->inst;
  unsigned d;
Index: roard/include/container_framework.h
===================================================================
--- roard/include/container_framework.h	(revision 4708)
+++ roard/include/container_framework.h	(revision 5278)
@@ -82,8 +82,7 @@
 ssize_t cont_fw_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t cont_fw_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   cont_fw_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     cont_fw_nonblock(struct roar_vio_calls * vio, int state);
+roar_off_t   cont_fw_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence);
 int     cont_fw_sync    (struct roar_vio_calls * vio);
-int     cont_fw_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     cont_fw_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     cont_fw_close   (struct roar_vio_calls * vio);
 
@@ -92,8 +91,7 @@
 ssize_t cont_pvio_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t cont_pvio_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   cont_pvio_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     cont_pvio_nonblock(struct roar_vio_calls * vio, int state);
+roar_off_t   cont_pvio_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence);
 int     cont_pvio_sync    (struct roar_vio_calls * vio);
-int     cont_pvio_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     cont_pvio_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     cont_pvio_close   (struct roar_vio_calls * vio);
 
Index: roard/include/driver.h
===================================================================
--- roard/include/driver.h	(revision 5276)
+++ roard/include/driver.h	(revision 5278)
@@ -159,5 +159,5 @@
 #endif
 
-int  driver_dummy_ctl(struct roar_vio_calls * vio, int cmd, void * data);
+int  driver_dummy_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 
 #endif
Index: roard/include/driver_alsa.h
===================================================================
--- roard/include/driver_alsa.h	(revision 4708)
+++ roard/include/driver_alsa.h	(revision 5278)
@@ -41,5 +41,5 @@
 int     driver_alsa_close   (struct roar_vio_calls * vio);
 int     driver_alsa_sync    (struct roar_vio_calls * vio);
-int     driver_alsa_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     driver_alsa_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 
 #endif
Index: roard/include/driver_artsc.h
===================================================================
--- roard/include/driver_artsc.h	(revision 4809)
+++ roard/include/driver_artsc.h	(revision 5278)
@@ -35,6 +35,5 @@
 ssize_t driver_artsc_write   (struct roar_vio_calls * vio, void *buf, size_t count);
 int     driver_artsc_close   (struct roar_vio_calls * vio);
-int     driver_artsc_nonblock(struct roar_vio_calls * vio, int state);
-int     driver_artsc_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     driver_artsc_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 
 #endif
Index: roard/include/driver_dmx.h
===================================================================
--- roard/include/driver_dmx.h	(revision 4708)
+++ roard/include/driver_dmx.h	(revision 5278)
@@ -35,5 +35,5 @@
 int driver_dmx_open_vio  (struct roar_vio_calls * inst, char * device, struct roar_audio_info * info, int fh, struct roar_stream_server * sstream);
 ssize_t driver_dmx_write (struct roar_vio_calls * vio,  void *buf, size_t count);
-int     driver_dmx_ctl   (struct roar_vio_calls * vio,  int cmd, void * data);
+int     driver_dmx_ctl   (struct roar_vio_calls * vio,  roar_vio_ctl_t cmd, void * data);
 
 #endif
Index: roard/include/driver_jack.h
===================================================================
--- roard/include/driver_jack.h	(revision 4825)
+++ roard/include/driver_jack.h	(revision 5278)
@@ -38,7 +38,6 @@
 ssize_t driver_jack_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t driver_jack_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-int     driver_jack_nonblock(struct roar_vio_calls * vio, int state);
 int     driver_jack_sync    (struct roar_vio_calls * vio);
-int     driver_jack_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     driver_jack_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     driver_jack_close   (struct roar_vio_calls * vio);
 
Index: roard/include/driver_oss.h
===================================================================
--- roard/include/driver_oss.h	(revision 5276)
+++ roard/include/driver_oss.h	(revision 5278)
@@ -42,5 +42,5 @@
 int driver_oss_close(DRIVER_USERDATA_T   inst);
 int driver_oss_sync(struct roar_vio_calls * vio);
-int driver_oss_ctl(struct roar_vio_calls * vio, int cmd, void * data);
+int driver_oss_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 
 ssize_t driver_oss_write    (struct roar_vio_calls * vio, void *buf, size_t count);
Index: roard/include/driver_portaudio.h
===================================================================
--- roard/include/driver_portaudio.h	(revision 4858)
+++ roard/include/driver_portaudio.h	(revision 5278)
@@ -49,6 +49,4 @@
 ssize_t driver_portaudio_write        (struct roar_vio_calls * vio, void *buf, size_t count);
 int     driver_portaudio_sync         (struct roar_vio_calls * vio);
-int     driver_portaudio_ctl          (struct roar_vio_calls * vio, int cmd, void * data);
-int     driver_portaudio_nonblock     (struct roar_vio_calls * vio, int state);
 
 #endif
Index: roard/include/driver_pulsesimple.h
===================================================================
--- roard/include/driver_pulsesimple.h	(revision 4708)
+++ roard/include/driver_pulsesimple.h	(revision 5278)
@@ -41,5 +41,5 @@
 ssize_t driver_pulsesimple_write        (struct roar_vio_calls * vio, void *buf, size_t count);
 int     driver_pulsesimple_sync         (struct roar_vio_calls * vio);
-int     driver_pulsesimple_ctl          (struct roar_vio_calls * vio, int cmd, void * data);
+int     driver_pulsesimple_ctl          (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 
 
Index: roard/include/driver_pwmled.h
===================================================================
--- roard/include/driver_pwmled.h	(revision 4708)
+++ roard/include/driver_pwmled.h	(revision 5278)
@@ -42,5 +42,5 @@
 int driver_pwmled_open_vio  (struct roar_vio_calls * inst, char * device, struct roar_audio_info * info, int fh, struct roar_stream_server * sstream);
 ssize_t driver_pwmled_write (struct roar_vio_calls * vio,  void *buf, size_t count);
-int     driver_pwmled_ctl   (struct roar_vio_calls * vio,  int cmd, void * data);
+int     driver_pwmled_ctl   (struct roar_vio_calls * vio,  roar_vio_ctl_t cmd, void * data);
 int     driver_pwmled_close (struct roar_vio_calls * vio);
 
Index: roard/include/driver_sndio.h
===================================================================
--- roard/include/driver_sndio.h	(revision 4708)
+++ roard/include/driver_sndio.h	(revision 5278)
@@ -46,5 +46,5 @@
 ssize_t driver_sndio_write        (struct roar_vio_calls * vio, void *buf, size_t count);
 int     driver_sndio_sync         (struct roar_vio_calls * vio);
-int     driver_sndio_ctl          (struct roar_vio_calls * vio, int cmd, void * data);
+int     driver_sndio_ctl          (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 
 
Index: roard/include/driver_sysclock.h
===================================================================
--- roard/include/driver_sysclock.h	(revision 4897)
+++ roard/include/driver_sysclock.h	(revision 5278)
@@ -35,5 +35,4 @@
 int     driver_sysclock_open_vio(struct roar_vio_calls * inst, char * device, struct roar_audio_info * info, int fh, struct roar_stream_server * sstream);
 int     driver_sysclock_close   (struct roar_vio_calls * vio);
-int     driver_sysclock_nonblock(struct roar_vio_calls * vio, int state);
 ssize_t driver_sysclock_write   (struct roar_vio_calls * vio, void *buf, size_t count);
 
Index: roard/include/midi.h
===================================================================
--- roard/include/midi.h	(revision 5276)
+++ roard/include/midi.h	(revision 5278)
@@ -174,6 +174,4 @@
 // dummys:
 int     midi_vio_set_dummy(int stream);
-int     midi_vio_ctl(struct roar_vio_calls * vio, int cmd, void * data);
-int     midi_vio_ok(struct roar_vio_calls * vio, ...);
 
 #endif
Index: roard/midi.c
===================================================================
--- roard/midi.c	(revision 5276)
+++ roard/midi.c	(revision 5278)
@@ -1049,4 +1049,14 @@
 // VIO:
 
+static int midi_vio_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
+ if ( cmd == ROAR_VIO_CTL_NONBLOCK )
+  return 0;
+ return -1;
+}
+
+static int     midi_vio_ok(struct roar_vio_calls * vio, ...) {
+ return 0;
+}
+
 int     midi_vio_set_dummy(int stream) {
  struct roar_stream_server * ss;
@@ -1065,14 +1075,4 @@
 }
 
-int midi_vio_ctl(struct roar_vio_calls * vio, int cmd, void * data) {
- if ( cmd == ROAR_VIO_CTL_NONBLOCK )
-  return 0;
- return -1;
-}
-
-int     midi_vio_ok(struct roar_vio_calls * vio, ...) {
- return 0;
-}
-
 #endif
 
Index: roard/sources.c
===================================================================
--- roard/sources.c	(revision 5276)
+++ roard/sources.c	(revision 5278)
@@ -323,5 +323,5 @@
   }
 
-  if ( roar_vio_lseek(vio, -len, SEEK_CUR) == (off_t)-1 ) {
+  if ( roar_vio_lseek(vio, -len, SEEK_CUR) == (roar_off_t)-1 ) {
    _ret(-1);
   }
@@ -418,5 +418,5 @@
 }
 
-static int  sources_radionoise_ctl(struct roar_vio_calls * vio, int cmd, void * data) {
+static int  sources_radionoise_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  if ( cmd == ROAR_VIO_CTL_NONBLOCK )
   return 0;
