From: "Michael Bourgeous" Subject: Re: [Pkg-alsa-devel] Bug#436502: alsa-tools -> usx2yloader Date: Fri, 14 Sep 2007 02:45:57 -0600 Message-ID: <8e4fc8270709140145u2dc5a2cbq2f9fba4c77f2c692@mail.gmail.com> References: <20070911152102.GA17585@frodo.home.lxtec.de> <20070912205256.GR4125@frodo.home.lxtec.de> <8e4fc8270709130123x39b33a1fkd4dae9d018bb4c65@mail.gmail.com> <20070913093252.GA7645@aragorn.home.lxtec.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_773_3329632.1189759557446" Return-path: Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.186]) by alsa0.perex.cz (Postfix) with ESMTP id 4FF3524478 for ; Fri, 14 Sep 2007 10:45:58 +0200 (CEST) Received: by mu-out-0910.google.com with SMTP id w8so1055486mue for ; Fri, 14 Sep 2007 01:45:57 -0700 (PDT) In-Reply-To: <20070913093252.GA7645@aragorn.home.lxtec.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Michael Bourgeous , pkg-alsa-devel@lists.alioth.debian.org, alsa-devel , Karsten Wiese , 436502@ List-Id: alsa-devel@alsa-project.org ------=_Part_773_3329632.1189759557446 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 9/13/07, Elimar Riesebieter wrote: > On Thu, 13 Sep 2007 the mental interface of > Michael Bourgeous told: > > A better option might be a patch to us428control to add a daemonize > > switch (which, of course, could be as simple as fclose()-ing stdin, > > stdout, and stderr, and dealing with any I/O functions accordingly). > > Hmm, from my patch tascam_fw and tascam_fpga are installed to > /lib/udev. The udev rules are calling these scripts which are almost > doing what your udev rule is doing manualy, isn't it? > There is one user [0], who came along with an rule similar to the > attached which still works. My intention is not do rewrite > usx2yloaders, but optimize it for distribution. > > I don't know whether upstream is active to help? A statement from > Karsten Wiese would be helpfull at that point ;) > > But if your rule works for sure, I can distribute it with your > allowness. There are still ugly sh -c calls I don't understand yet. > > [0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=361558 > > Thanks for your competent input ;) > > Elimar > The sh -c was necessary to keep udev from hanging when loading the US-224 and US-428 (because of us428control). I don't remember why I chose not to use the existing scripts, but one thing I don't like about those scripts is that they will load the firmware for /all/ Tascam USB devices, not just the one currently being probed by udev. This could either confuse udev or try to load the firmware multiple times for each device, possibly resulting in errors. Unfortunately, all of the utilities involved (fxload, usx2yloader, us428control) expect the old hotplug-style device path (/proc/bus/usb/111/222) instead of the sysfs/udev-style path (what a mess this udev switch still causes). I just spent the last three hours trying to fix this problem, and I can only come to the conclusion that udev is horribly broken. For example, my firmware load rule gets called not only when the USB device comes on, but each time ALSA adds a new device from the usx2y (i.e. control, mixer, PCM, etc.), resulting in a lot of wasted time, and many erroneous calls to usx2yloader. Moreover, the rule gets called once for every device /removed/, even though it says ACTION="add". Finally, it seems that every now and then, udev tries the whole process over again, even though the firmware is loaded and us428control is running. Why do we have to keep breaking things that work? At any rate, I've made a slightly improved version of my previous script, which you may distribute under any free license, if it is found to be better than the alternatives. Mike Bourgeous ------=_Part_773_3329632.1189759557446 Content-Type: application/octet-stream; name="55-tascam.rules" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="55-tascam.rules" X-Attachment-Id: f_f6kfz74v IyBUYXNjYW0gVVMteDJ5IEZpcm13YXJlIFNjcmlwdCBieSBNaWtlIEJvdXJnZW91cyA8bml0cm9n ZW4gYXQgdXNlcnMuc291cmNlZm9yZ2UubmV0PgojIEJhc2VkIG9uIGh0dHA6Ly93d3cuYXN0cm8u Y2FsdGVjaC5lZHUvfm1jcy90YXNjYW1fdXMxMjIvaW5kZXguaHRtbAoKIyBGb3JnZXQgYWJvdXQg dHJ5aW5nIHRvIGxvYWQgdGhlIGZpcm13YXJlIGZvciBqdXN0IHRoZSBkZXZpY2UgYmVpbmcgcHJv YmVkLCB1bmxlc3MKIyB5b3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BTWVNG U3tpZFByb2R1Y3R9PT0iODAwNyIsIFNZU0ZTe2lkVmVuZG9yfT09IjE2MDQiLCBcCglSVU4rPSIv YmluL3NoIC1jICcvdXNyL2Jpbi91c3gyeWxvYWRlciciCgoKCiMgdmltOiBzeW50YXg9c2gKCg== ------=_Part_773_3329632.1189759557446 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel ------=_Part_773_3329632.1189759557446--