All of lore.kernel.org
 help / color / mirror / Atom feed
* Media Controller initial support for ALSA devices
@ 2009-09-18  4:38 Devin Heitmueller
  0 siblings, 0 replies; 6+ messages in thread
From: Devin Heitmueller @ 2009-09-18  4:38 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Linux Media Mailing List

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.

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...

Devin

-- 
Devin J. Heitmueller
http://www.devinheitmueller.com
AIM: devinheitmueller

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Media Controller initial support for ALSA devices
  2009-09-19  8:57 ` Hans Verkuil
@ 2009-09-21 19:16   ` Devin Heitmueller
  0 siblings, 0 replies; 6+ messages in thread
From: Devin Heitmueller @ 2009-09-21 19:16 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Linux Media Mailing List

On Sat, Sep 19, 2009 at 4:57 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> On Friday 18 September 2009 06:40:34 Devin Heitmueller wrote:
>> 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...
>
> Looks good. But rather than adding v4l2_device_register_alsa_node you should
> add a v4l2_device_register_entity. I intended to do that, but never got around
> to it. The entity struct is just part of the larger struct v4l2_alsa_device
> and you can go from one to the other using container_of.
>
> This way you don't need to make v4l2_device_register_fb_node and dvb_node, etc.
> A single generic register_entity is sufficient.
>
> Note that I am leaning more to replacing the v4l2 prefix by a media prefix.
> It's not really very v4l2-specific anymore. I think that most of what the
> media controller does can be generalized completely and used by pretty much
> anything that has complex mesh-like relationships. Too early to say for sure,
> though.

Hello Hans,

I'm not against substituting v4l2_device_register_alsa_node for
v4l2_device_register_entity, provided you really believe that there
won't need to be any additional properties.  Right now the ALSA struct
just has the entity struct and the v4l2_device pointer for the parent.
 If you really believe we won't need anything else, then I can change
it accordingly.

I'll see about whipping up something this week.  It would be good
though if I can get this to a point where you pull in the changes to
your mc tree, so that I don't get out of sync when you start making
more changes yourself.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Media Controller initial support for ALSA devices
  2009-09-18  4:40 Devin Heitmueller
  2009-09-18  5:11 ` Mauro Carvalho Chehab
@ 2009-09-19  8:57 ` Hans Verkuil
  2009-09-21 19:16   ` Devin Heitmueller
  1 sibling, 1 reply; 6+ messages in thread
From: Hans Verkuil @ 2009-09-19  8:57 UTC (permalink / raw)
  To: Devin Heitmueller; +Cc: Linux Media Mailing List

On Friday 18 September 2009 06:40:34 Devin Heitmueller wrote:
> 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...

Looks good. But rather than adding v4l2_device_register_alsa_node you should
add a v4l2_device_register_entity. I intended to do that, but never got around
to it. The entity struct is just part of the larger struct v4l2_alsa_device
and you can go from one to the other using container_of.

This way you don't need to make v4l2_device_register_fb_node and dvb_node, etc.
A single generic register_entity is sufficient.

Note that I am leaning more to replacing the v4l2 prefix by a media prefix.
It's not really very v4l2-specific anymore. I think that most of what the
media controller does can be generalized completely and used by pretty much
anything that has complex mesh-like relationships. Too early to say for sure,
though.

Regards,

	Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Media Controller initial support for ALSA devices
  2009-09-18  5:11 ` Mauro Carvalho Chehab
@ 2009-09-18  7:16   ` Devin Heitmueller
  0 siblings, 0 replies; 6+ messages in thread
From: Devin Heitmueller @ 2009-09-18  7:16 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Hans Verkuil, Linux Media Mailing List

On Fri, Sep 18, 2009 at 1:11 AM, Mauro Carvalho Chehab
<mchehab@infradead.org> wrote:
> Em Fri, 18 Sep 2009 00:40:34 -0400
> Devin Heitmueller <dheitmueller@kernellabs.com> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Media Controller initial support for ALSA devices
  2009-09-18  4:40 Devin Heitmueller
@ 2009-09-18  5:11 ` Mauro Carvalho Chehab
  2009-09-18  7:16   ` Devin Heitmueller
  2009-09-19  8:57 ` Hans Verkuil
  1 sibling, 1 reply; 6+ messages in thread
From: Mauro Carvalho Chehab @ 2009-09-18  5:11 UTC (permalink / raw)
  To: Devin Heitmueller; +Cc: Hans Verkuil, Linux Media Mailing List

Em Fri, 18 Sep 2009 00:40:34 -0400
Devin Heitmueller <dheitmueller@kernellabs.com> 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?



Cheers,
Mauro

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Media Controller initial support for ALSA devices
@ 2009-09-18  4:40 Devin Heitmueller
  2009-09-18  5:11 ` Mauro Carvalho Chehab
  2009-09-19  8:57 ` Hans Verkuil
  0 siblings, 2 replies; 6+ messages in thread
From: Devin Heitmueller @ 2009-09-18  4:40 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Linux Media Mailing List

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...

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-09-21 19:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-18  4:38 Media Controller initial support for ALSA devices Devin Heitmueller
2009-09-18  4:40 Devin Heitmueller
2009-09-18  5:11 ` Mauro Carvalho Chehab
2009-09-18  7:16   ` Devin Heitmueller
2009-09-19  8:57 ` Hans Verkuil
2009-09-21 19:16   ` Devin Heitmueller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.