On Fri, Sep 18, 2009 at 1:11 AM, Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx> wrote: > Em Fri, 18 Sep 2009 00:40:34 -0400 > Devin Heitmueller <dheitmueller@xxxxxxxxxxxxxx> escreveu: > >> Hello Hans, >> >> If you can find a few minutes, please take a look at the following >> tree, where I added initial support for including the ALSA devices in >> the MC enumeration. I also did a bit of cleanup on your example tool, >> properly showing the fields associated with the given node type and >> subtype (before it was always showing fields for the V4L subtype). >> >> http://kernellabs.com/hg/~dheitmueller/v4l-dvb-mc-alsa/ >> >> I've implemented it for em28xx as a prototype, and will probably see >> how the code looks when calling it from au0828 and cx88 as well (to >> judge the quality of the abstraction). >> >> Comments welcome, of course... > > How do you expect that em28xx devices using snd-usb-audio to be enumerated? There are two basic issues your question raises: 1. Finding the correct ALSA device: I wrote some code a few weeks ago that does it by enumerating through the sound card entries and digging through the usb interface pointers to find the one that matches. I'm just not happy with the code yet and wasn't ready to show it to anybody. I've got the same basic issue with au0828, and I've been thinking about it for a while. Certainly the cases where we have vendor audio or DMA audio for PCI devices are much more straightforward. 2. The second issue has to do with the loading sequence. Because each interface is bound separately, I'm not confident I can setup the alsa device so early in the process, since in the case of the snd-usb-audio the driver hasn't been initialized against the device yet. I'm still trying to work out the optimal scheme for this - for example perhaps waiting until the media controller is opened for the first time before doing the lookup. In short, I am certainly aware of both issues and am actively working on finding an optimal solution. Either way though, the prototype code is good enough for us to start exercising the userland interface and evaluate how well it will integrate into applications for common use cases. Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html