On Thu, Oct 27, 2022 at 08:28:53PM +, Klemens Nanni wrote:
> On Thu, Oct 27, 2022 at 03:49:55PM +0200, Alexandre Ratchov wrote:
> > On Thu, Oct 27, 2022 at 01:09:57PM +, Klemens Nanni wrote:
> > > @@ -1859,6 +1857,9 @@ utvfu_audio_open(void *v, int flags)
> > > if
On Thu, Oct 27, 2022 at 03:49:55PM +0200, Alexandre Ratchov wrote:
> On Thu, Oct 27, 2022 at 01:09:57PM +, Klemens Nanni wrote:
> > @@ -1859,6 +1857,9 @@ utvfu_audio_open(void *v, int flags)
> > if (usbd_is_dying(sc->sc_udev))
> > return (EIO);
> >
> > + if ((flags &
On Thu, Oct 27, 2022 at 01:09:57PM +, Klemens Nanni wrote:
> @@ -1859,6 +1857,9 @@ utvfu_audio_open(void *v, int flags)
> if (usbd_is_dying(sc->sc_udev))
> return (EIO);
>
> + if ((flags & (FWRITE | FREAD)))
> + return (ENXIO);
> +
> if ((flags &
Make drivers which do *not* adverise AUDIO_PROP_FULLDPLEX return ENXIO
in their open() if full-duplex mode was requested.
This way, sys/dev/audio.c:audio_open() will fail immediately rather than
later through the to-be-removed get_props() check.
utvfu(4) seems to be the only driver that