From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kees Cook Date: Tue, 07 Aug 2007 19:36:33 +0000 Subject: Re: work-around for video4linux sysfs Message-Id: <20070807193633.GM9617@outflux.net> List-Id: References: <20070731195136.GW9881@outflux.net> In-Reply-To: <20070731195136.GW9881@outflux.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Tue, Aug 07, 2007 at 11:24:34AM +0200, Kay Sievers wrote: > > This is related > > to how some v4l drivers deal with multiple output modes from the same > > card[1] (e.g. MPEG2 encoder output, YUV output, audio only output, etc, > > are associated with an offset minor number). It's really ugly. :( > > Then the kernel should provide a unique "function" string, which can be > used to name the device. What is the best place for me to start learning how to plumb such a thing into v4l? I haven't poked at sysfs from kernel space before, and as I understand, the v4l driver development is rather fragmented, so I guess I'm asking both a "technical howto" and a "political howto" for getting it done. I agree, though, this is the only correct approach. > If we can have multiple, say "video3", "video4", "video5" at the same > device, the kernel should export a unique string in sysfs/ or uevent > env, for every of these devices based on the function, like: "yuv:, > "enc", "audio", ... which we can append to the name: > pci-0000:01:06.0-video-yuv -> ../../video0 > pci-0000:01:07.0-video-enc -> ../../video1 > > Otherwise how is userspace expected to find the other nodes? It sounds > pretty weird to limit the persistent nodes to the "first" device. Agreed; that was just a hack for the most common use-case I had encountered with the v4l link collisions: for ivtv, MythTV always wants the encoder devices, which happens to be the first one instantiated. Thanks for dealing with me and this mess. :) -Kees -- Kees Cook @outflux.net ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel