Re: [Line6linux-devel] Status of line6 staging cleanup
Status: Pre-Alpha
Brought to you by:
mgrabner
From: Markus G. <gr...@ic...> - 2012-11-15 00:11:50
|
On Wednesday 14 November 2012 08:45:24 Stefan Hajnoczi wrote: > I have begun cleaning up the staging driver so it can be merged by the > ALSA maintainers. > > The first level of cleanups is to satisfy checkpatch.pl. These are > mostly trivial changes and don't require much discussion. > > Next I've begun trimming redundant code. Some of the debugging > Kconfig options appear to be superceded by generic dumping tools like > dyndbg, usbmon, amidi/aseqdump so I am sending patches to drop them. > If you feel they should be kept please respond to the patches. Ok, I'll take a look. > The real issue is what to do with all the sysfs attributes. They > cannot be merged without further work, but I feel it is a mistake to > have them in the first place: > > The sysfs attributes involve MIDI commands and some state. If we > leave this to userspace then the kernel driver can focus on PCM and > MIDI I/O. The code will become much smaller and simpler because we > can drop all the peeking into MIDI buffers and the housekeeping that > goes along with that. > > Letting userspace handle MIDI means that line6linux development > becomes accessible to a wider group of developers - people not > comfortable with C or driver hacking. It encourages people to explore > their devices and contribute code. I agree with all of that. Let me point to a document which I started to write a year ago when we first briefly discussed this: https://line6linux.svn.sourceforge.net/svnroot/line6linux/apps/branches/qtbased/doc/design.tex The sysfs attributes are ugly, but very convenient for development and testing. I don't want to remove them without having a similarly convenient replacement, that's why I started to write some code according to the ideas discussed in the abovementioned document. Feel free to comment on this! One particular question is how to best control the driver's behaviour (e.g., the midi masks) from user mode. I can imagine at least two methods: *) using ioctl() calls *) defining a virtual MIDI device for communication with the driver Are there more options, and what would be considered best practise in this case? > That said, I don't want to break the userspace tools that you have > written. Can you point me to userspace tools that would need to be > fixed before we drop sysfs attributes? Some of the scripts under https://line6linux.svn.sourceforge.net/svnroot/line6linux/driver/trunk (in particular the test suite) make use of the sysfs attributes, but I'm prepared to rewrite the relevant parts once a better method is available :-) Kind regards, Markus -- Markus Grabner Institute for Computer Graphics and Vision Graz University of Technology, Inffeldgasse 16a/II, 8010 Graz, Austria WWW: http://www.icg.tugraz.at/Members/grabner |