Re: [Alsa-devel] Re: [linux-audio-user] USB sound

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [Alsa-devel] Re: [linux-audio-user] USB sound
From: Takashi Iwai (tiwai_AT_suse.de)
Date: Mon Jul 01 2002 - 13:24:09 EEST


At Sun, 30 Jun 2002 03:18:52 +0900,
Patrick Shirkey wrote:
>
> I have moved this to alsa-devel as it seems more relevant to discuss there.
>
> Speaker to Vegetables wrote:
> > Not to be overly pedantic or anything, but putting stuff in the kernel
> > that doesn't have to be there would be the unprofessional thing.
>
> But it will be a driver module right?
>
> > Stuff
> > that goes in the kernel is harder to install and usually harder to use.
>
> huh?
>
> > More importantly, bugs in code that goes in the OS kernel can easily
> > crash the whole computer, while userland code seldom crashes anything
> > beyond its own little process.
>
> I don't think it will be included in the kernel until it is sufficiently
> tested and then if there is a bug it will be found much quicker.
>
> >The golden reason for putting anything
> > in a kernel-level driver is when that's the only way to get it to
> > perform well enough.
> >
>
> Good point but then if then we shouldn't have included ALSA if that is
> true. The ALSA code base is large and having the usb midi module as a
> userland app seems to me to go against the precendant set by the rest of
> the modules.

it depends on how the interrupt is handled, and how much data is sent
to or received from the device.

usually a hardware asserts interrupts and the driver handles them to
process the data.
in the case of usb midi, there is already a usb devfs layer.
this replaces the interrupts and other hardware-related things with
the standard poll and ioctls.
and obviously the amount of data for midi is far less than audio.

another reason pushing me against the implementation of kernel driver
is that usb midi specification is not followed by all vendors.
apparently, the spec is half-finished. there is little devices which
can be handeld properly by the existing usb-midi kernel driver without
any workaround.

unfortunately i myself don't have a midi usb device yet, so i cannot
say 100% surely on how much latency this solution works.
but i think that the scheduled thread should work with enough small
latency comparable with a kernel module.

Takashi


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Mon Jul 01 2002 - 13:24:41 EEST