Index: roard/driver_ao.c
===================================================================
--- roard/driver_ao.c	(revision 5012)
+++ roard/driver_ao.c	(revision 5056)
@@ -32,4 +32,8 @@
  if ( _driver_ao_usage_counter++ == 0 )
   ao_initialize();
+
+#ifdef ROAR_HAVE_AO_APPEND_GLOBAL_OPTION
+ ao_append_global_option("client_name", "roard");
+#endif
 }
 
@@ -44,4 +48,5 @@
  ao_sample_format     format;
  int driver;
+ int autoconfig = 0;
 
  ROAR_WARN("The libao driver is obsolete, use another!");
@@ -49,4 +54,8 @@
  if ( fh != -1 )
   return -1;
+
+ if ( sstream != NULL ) {
+  autoconfig = streams_get_flag(ROAR_STREAM(sstream)->id, ROAR_FLAG_AUTOCONF);
+ }
 
  driver_ao_init();
@@ -94,11 +103,24 @@
    break;
   default:
-   ROAR_ERR("Can not open audio device via libao: codec not supported. You may want to try -oO codec=pcm");
-   driver_ao_uninit();
-   return -1;
-  break;
+    if ( autoconfig ) {
+     format.byte_format = AO_FMT_NATIVE;
+     info->codec = ROAR_CODEC_DEFAULT;
+    } else {
+     ROAR_ERR("Can not open audio device via libao: codec not supported. You may want to try -oO codec=pcm");
+     driver_ao_uninit();
+     return -1;
+    }
+   break;
  }
 
  aodevice = ao_open_live(driver, &format, NULL /* no options */);
+
+ if ( aodevice == NULL && autoconfig ) {
+  format.byte_format = AO_FMT_NATIVE;
+  format.bits        = 16;
+  info->codec        = ROAR_CODEC_DEFAULT;
+  info->bits         = 16;
+  aodevice = ao_open_live(driver, &format, NULL /* no options */);
+ }
 
  if ( aodevice == NULL ) {
Index: roard/driver_artsc.c
===================================================================
--- roard/driver_artsc.c	(revision 4809)
+++ roard/driver_artsc.c	(revision 5056)
@@ -51,4 +51,5 @@
 int     driver_artsc_open_vio(struct roar_vio_calls * inst, char * device, struct roar_audio_info * info, int fh, struct roar_stream_server * sstream) {
  struct roar_artsc * self = NULL;
+ int autoconfig           = 0;
 
  (void)sstream;
@@ -56,4 +57,8 @@
  if ( fh != -1 || device != NULL )
   return -1;
+
+ if ( sstream != NULL ) {
+  autoconfig = streams_get_flag(ROAR_STREAM(sstream)->id, ROAR_FLAG_AUTOCONF);
+ }
 
  self = roar_mm_malloc(sizeof(struct roar_artsc));
@@ -73,4 +78,9 @@
  self->info   = info;
  self->stream = arts_play_stream(info->rate, info->bits, info->channels, "roard");
+
+ if ( self->stream == NULL && autoconfig ) {
+  info->bits   = 16;
+  self->stream = arts_play_stream(info->rate, info->bits, info->channels, "roard");
+ }
 
  if ( self->stream == NULL ) {
Index: roard/driver_portaudio.c
===================================================================
--- roard/driver_portaudio.c	(revision 5012)
+++ roard/driver_portaudio.c	(revision 5056)
@@ -35,10 +35,15 @@
  long flags = PABLIO_WRITE;
 #elif defined(ROAR_HAVE_PA19_VERSION_19)
+ PaStreamParameters params;
+#endif
  PaError err;
- PaStreamParameters params;
-#endif
+ int autoconfig = 0;
 
  if ( fh != -1 )
   return -1;
+
+ if ( sstream != NULL ) {
+  autoconfig = streams_get_flag(ROAR_STREAM(sstream)->id, ROAR_FLAG_AUTOCONF);
+ }
 
  switch (info->bits) {
@@ -56,27 +61,54 @@
       break;
      default:
-       return -1;
+       if ( autoconfig ) {
+        info->codec = ROAR_CODEC_DEFAULT;
+        fmt = paInt8;
+       } else {
+        return -1;
+       }
       break;
     }
    break;
   case 16:
-    if ( info->codec != ROAR_CODEC_DEFAULT )
-     return -1;
+    if ( info->codec != ROAR_CODEC_DEFAULT ) {
+     if ( autoconfig ) {
+      info->codec = ROAR_CODEC_DEFAULT;
+     } else {
+      return -1;
+     }
+    }
     fmt = paInt16;
    break;
 #ifdef paPackedInt24
   case 24:
-    if ( info->codec != ROAR_CODEC_DEFAULT )
+    if ( info->codec != ROAR_CODEC_DEFAULT ) {
+     if ( autoconfig ) {
+      info->codec = ROAR_CODEC_DEFAULT;
+     } else {
+      return -1;
+     }
+    }
+    fmt = paPackedInt24;
+   break;
+#endif
+  case 32:
+    if ( info->codec != ROAR_CODEC_DEFAULT ) {
+     if ( autoconfig ) {
+      info->codec = ROAR_CODEC_DEFAULT;
+     } else {
+      return -1;
+     }
+    }
+    fmt = paInt32;
+   break;
+  default:
+    if ( autoconfig ) {
+     info->codec = ROAR_CODEC_DEFAULT;
+     info->bits  = 16;
+     fmt = paInt16;
+    } else {
      return -1;
-    fmt = paPackedInt24;
-   break;
-#endif
-  case 32:
-    if ( info->codec != ROAR_CODEC_DEFAULT )
-     return -1;
-    fmt = paInt32;
-   break;
-  default:
-    return -1;
+    }
+   break;
  }
 
@@ -100,10 +132,30 @@
   case 2: flags |= PABLIO_STEREO; break;
   default:
-    roar_mm_free(self);
-    Pa_Terminate();
-    return -1;
- }
-
- if ( OpenAudioStream(&(self->ostream), info->rate, fmt, flags) != paNoError ) {
+    if ( autoconfig ) {
+     info->channels = 2;
+     flags |= PABLIO_STEREO;
+    } else {
+     roar_mm_free(self);
+     Pa_Terminate();
+     return -1;
+    }
+ }
+
+ err = OpenAudioStream(&(self->ostream), info->rate, fmt, flags);
+
+ if ( err != paNoError && autoconfig ) {
+  if ( (flags & PABLIO_MONO) == PABLIO_MONO ) {
+   flags -= PABLIO_MONO;
+   flags |= PABLIO_STEREO;
+   info->channels = 2;
+  }
+  fmt         = paInt16;
+  info->codec = ROAR_CODEC_DEFAULT;
+  info->bits  = 16;
+
+  err = OpenAudioStream(&(self->ostream), info->rate, fmt, flags);
+ }
+
+ if ( err != paNoError ) {
   roar_mm_free(self);
   Pa_Terminate();
@@ -133,4 +185,22 @@
                     );
 
+ if ( err != paNoError && autoconfig ) {
+  params.sampleFormat = paInt16;
+  params.channelCount = 2;
+  info->codec         = ROAR_CODEC_DEFAULT;
+  info->bits          = 16;
+  info->channels      = 2;
+
+  err = Pa_OpenStream(&(self->stream),
+                      NULL,
+                      &params,
+                      info->rate,
+                      128 /*FIXME:frames*/,
+                      paClipOff,
+                      NULL,
+                      NULL
+                     );
+ }
+
  if ( err != paNoError ) {
   ROAR_ERR("driver_portaudio_open(*): Could not open PortAudio device: \"%s\".", Pa_GetErrorText(err));
Index: roard/driver_pulsesimple.c
===================================================================
--- roard/driver_pulsesimple.c	(revision 5012)
+++ roard/driver_pulsesimple.c	(revision 5056)
@@ -34,6 +34,15 @@
  pa_stream_direction_t dir = PA_STREAM_PLAYBACK;
  pa_sample_spec        ss;
+ int autoconfig = 0;
+ int needauto   = 0;
 
 //    pa_sample_format_t format;     /**< The sample format */
+
+ if ( fh != -1 )
+  return -1;
+
+ if ( sstream != NULL ) {
+  autoconfig = streams_get_flag(ROAR_STREAM(sstream)->id, ROAR_FLAG_AUTOCONF);
+ }
 
  switch (info->codec) {
@@ -50,5 +59,5 @@
       break;
      default:
-       return -1;
+       needauto = 1;
       break;
     }
@@ -60,5 +69,5 @@
       break;
      default:
-       return -1;
+       needauto = 1;
       break;
     }
@@ -70,10 +79,20 @@
      ss.format = PA_SAMPLE_U8;
     } else {
-     return -1;
+     needauto = 1;
     }
    break;
   default:
-    return -1;
+    needauto = 1;
    break;
+ }
+
+ if ( needauto ) {
+  if ( !autoconfig ) {
+   return -1;
+  }
+
+  info->bits = 16;
+  info->codec = ROAR_CODEC_DEFAULT;
+  ss.format = PA_SAMPLE_S16NE;
  }
 
@@ -85,4 +104,12 @@
 
  self->handle = pa_simple_new(device, "roard", dir, subdev, "RoarAudio Sound Server", &ss, NULL, NULL, &pulseerror);
+
+ if ( self->handle == NULL && autoconfig ) {
+  info->bits = 16;
+  info->codec = ROAR_CODEC_DEFAULT;
+  ss.format = PA_SAMPLE_S16NE;
+
+  self->handle = pa_simple_new(device, "roard", dir, subdev, "RoarAudio Sound Server", &ss, NULL, NULL, &pulseerror);
+ }
 
  if ( self->handle == NULL ) {
Index: roard/driver_roar.c
===================================================================
--- roard/driver_roar.c	(revision 4708)
+++ roard/driver_roar.c	(revision 5056)
@@ -47,4 +47,10 @@
 
  if ( roar_vio_simple_stream(inst, info->rate, info->channels, info->bits, info->codec, device, dir, "roard") == -1 ) {
+  if ( streams_get_flag(ROAR_STREAM(sstream)->id, ROAR_FLAG_AUTOCONF) ) {
+   roar_profile2info(info, "default");
+   if ( roar_vio_simple_stream(inst, info->rate, info->channels, info->bits, info->codec, device, dir, "roard") == -1 ) {
+    return -1;
+   }
+  }
   return -1;
  }
Index: roard/driver_rsound.c
===================================================================
--- roard/driver_rsound.c	(revision 5012)
+++ roard/driver_rsound.c	(revision 5056)
@@ -75,4 +75,8 @@
  tmp = -1; // unknown by RSound
 
+ if ( info->bits > 16 && streams_get_flag(ROAR_STREAM(sstream)->id, ROAR_FLAG_AUTOCONF) ) {
+  info->bits = 32;
+ }
+
  switch (info->codec) {
   case ROAR_CODEC_PCM_S_LE:
@@ -80,4 +84,7 @@
      case  8: tmp = RSD_S8;     break;
      case 16: tmp = RSD_S16_LE; break;
+#ifdef RSD_S32_LE
+     case 32: tmp = RSD_S32_LE; break;
+#endif
     }
    break;
@@ -86,4 +93,7 @@
      case  8: tmp = RSD_S8;     break;
      case 16: tmp = RSD_S16_BE; break;
+#ifdef RSD_S32_BE
+     case 32: tmp = RSD_S32_BE; break;
+#endif
     }
    break;
@@ -97,4 +107,7 @@
      case  8: tmp = RSD_U8;     break;
      case 16: tmp = RSD_U16_LE; break;
+#ifdef RSD_U32_LE
+     case 32: tmp = RSD_U32_LE; break;
+#endif
     }
    break;
@@ -103,4 +116,7 @@
      case  8: tmp = RSD_U8;     break;
      case 16: tmp = RSD_U16_BE; break;
+#ifdef RSD_U32_BE
+     case 32: tmp = RSD_U32_BE; break;
+#endif
     }
    break;
@@ -111,4 +127,12 @@
    break;
  }
+
+#ifdef RSD_S16_NE
+ if ( tmp == -1 && streams_get_flag(ROAR_STREAM(sstream)->id, ROAR_FLAG_AUTOCONF) ) {
+  info->bits  = 16;
+  info->codec = ROAR_CODEC_DEFAULT;
+  tmp         = RSD_S16_NE;
+ }
+#endif
 
  if ( tmp == -1 ) {
Index: roard/driver_wmm.c
===================================================================
--- roard/driver_wmm.c	(revision 5012)
+++ roard/driver_wmm.c	(revision 5056)
@@ -215,7 +215,7 @@
 
   mmres =
-    waveOutOpen(&self->hwo,
+    waveOutOpen(&(self->hwo),
                 self->id,
-                &self->wavefmt,
+                &(self->wavefmt),
                 (DWORD_PTR)0/* waveOutProc */,
                 (DWORD_PTR)self,
