On Sun, Dec 28, 2025 at 06:22:56PM +0100, Alexandre Ratchov wrote:
> On Sat, Dec 27, 2025 at 07:33:33PM -0500, Josh Rickmar wrote:
> > I just picked up this audio interface for some recording tasks, and
> > gave it a spin on OpenBSD.  Unfortunately, playback through the
> > headphone outputs is unusable due to frequent interface resets.
> > 
> > When I open a file in VLC, unless audio was already playing, the
> > device is currently stopped, and takes a couple seconds before I hear
> > the relays in the device click and then I can hear the playback.  When
> > I pause the playback in VLC, the device stops, and resuming playback
> > must start the device again (with playback only heard after another
> > couple seconds).
> > 
> > If I keep another file playing in a second VLC instance, I can pause
> > and unpause the first VLC without any resets/stuttering.
> > 
> > aucat has the same behavior when nothing else is currently playing
> > audio.  I don't hear the first few seconds of the WAV file until the
> > device has finished starting.
> > 
> 
> Do you mean that if you let 'aucat -i /dev/zero' (for example) run in
> the background, then the interface is usable on a mostly idle system?

Yes, this works as well, until the system load increases.

> 
> > The device (during audio playback audio in VLC) also frequently resets
> > during light browsing in chrome (opening new tabs, following links),
> > but I don't always see messages in the sndiod -ddd logs during these
> > stutters.  (This might be a separate issue.)
> > 
> 
> [...]
> 
> > rsnd/1: 48000Hz, s24le4msb, play 0:17, rec 0:19, 2 blocks of 409 frames
> >                                                  ^^^^^^^^^^^^^^^^^^^^^^
> 
> This interface has a lot of channels, so large blocks don't fit in the
> the 64kB of memory preallocated for the ring buffer; that's why the
> driver uses this strange block size. That can't cause significant
> stability issues though.
> 
> Could you try this diff to increase it?

This is a big improvement.  I still hear short static where it used to
reset under load, but the interface remains stable while using chrome.

> 
> Index: audio.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/audio.c,v
> diff -u -p -u -p -r1.213 audio.c
> --- audio.c   18 Nov 2025 09:30:27 -0000      1.213
> +++ audio.c   28 Dec 2025 17:17:33 -0000
> @@ -59,7 +59,7 @@
>  #define AUDIO_DEV(n)         (minor(n) & 0xf0)
>  #define AUDIO_DEV_AUDIO              0       /* minor of /dev/audio0 */
>  #define AUDIO_DEV_AUDIOCTL   0xc0    /* minor of /dev/audioctl */
> -#define AUDIO_BUFSZ          65536   /* buffer size in bytes */
> +#define AUDIO_BUFSZ          0x40000 /* buffer size in bytes */
>  
>  /*
>   * mixer entries added by the audio(4) layer
> 

Reply via email to