Subject: Re: usb control endpoint exclusive access
To: None <wulf@ping.net.au>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-kern
Date: 05/18/2005 18:21:34
Berndt Josef Wulf wrote:
> I worked around this problem by removing the AUOPEN_READ restriction as shown
> below:
>
> --- /sys/dev/audio.c.orig 2005-05-17 10:24:44.000000000 +0930
> +++ /sys/dev/audio.c 2005-05-17 10:27:13.000000000 +0930
> @@ -1288,9 +1288,12 @@
> DPRINTF(("audio_open: flags=0x%x sc=%p hdl=%p\n",
> flags, sc, sc->hw_hdl));
>
> - if ((sc->sc_open & (AUOPEN_READ|AUOPEN_WRITE)) != 0)
> + if ((sc->sc_open & (AUOPEN_WRITE)) != 0)
> return EBUSY;
>
> +// if ((sc->sc_open & (AUOPEN_READ)) != 0)
> +// return EBUSY;
> +
> if (hw->open != NULL) {
> error = hw->open(sc->hw_hdl, flags);
> if (error)
>
> This is not the correct way, however, it lets me run the GnuRadio
> gr-audio-oss module unmodified enabling me to execute applications that issue
> separate open() calls for read and write access without any noticeable impact
> on the system.
No, it's not the correct way. But maybe a hack like this is all right.
It would allow a few moer Linux programs to run. I'll look into it.
I guess then when we get the new audio driver with kernel mixing
this problem will be fixed the right way.
-- Lennart