All of lore.kernel.org
 help / color / mirror / Atom feed
* dvb: one demux per tuner or one demux per demod?
@ 2011-05-24 10:55 Rémi Denis-Courmont
  2011-05-24 12:05 ` Steve Kerrison
  0 siblings, 1 reply; 7+ messages in thread
From: Rémi Denis-Courmont @ 2011-05-24 10:55 UTC (permalink / raw)
  To: linux-media; +Cc: vlc-devel

   Hello,



Been testing the bleeding-edge Hauppauge 290E (em28174 + Sony cxd2820r)

from Antti Palosaari and Steve Kerrison, now in linux-media GIT tree.



It seems the device creates two frontends and only one demux/dvr nodes.

Are they not supposed to be one demux per frontend? Or how is user-space

supposed to map the demux/dvr and the frontend, on a multi-proto card? on a

multi-tuner card?



Best regards,



-- 

Rémi Denis-Courmont

http://www.remlab.net/

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

* Re: dvb: one demux per tuner or one demux per demod?
  2011-05-24 10:55 dvb: one demux per tuner or one demux per demod? Rémi Denis-Courmont
@ 2011-05-24 12:05 ` Steve Kerrison
  2011-05-24 12:28   ` Devin Heitmueller
  2011-05-24 15:59   ` Rémi Denis-Courmont
  0 siblings, 2 replies; 7+ messages in thread
From: Steve Kerrison @ 2011-05-24 12:05 UTC (permalink / raw)
  To: Rémi Denis-Courmont; +Cc: linux-media, vlc-devel

Hi Rémi,

The cxd2820r supports DVB-T/T2 and also DVB-C. As such antti coded up a
multiple front end (MFE) implementation for em28xx then attaches the
cxd2820r in both modes.

I believe you can only use one frontend at once per adapter (this is
certainly enforced in the cxd2820r module), so I don't see how it would
cause a problem for mappings. I think a dual tuner device would register
itself as two adapters, wouldn't it?

But I'm new at this, so forgive me if I've overlooked something or
misunderstood the issue you've raised.

Regards,
-- 
Steve Kerrison MEng Hons.
http://www.stevekerrison.com/ 

On Tue, 2011-05-24 at 12:55 +0200, Rémi Denis-Courmont wrote:
> Hello,
> 
> Been testing the bleeding-edge Hauppauge 290E (em28174 + Sony cxd2820r)
> from Antti Palosaari and Steve Kerrison, now in linux-media GIT tree.
> 
> It seems the device creates two frontends and only one demux/dvr nodes.
> Are they not supposed to be one demux per frontend? Or how is user-space
> supposed to map the demux/dvr and the frontend, on a multi-proto card? on a
> multi-tuner card?
> 
> Best regards,
> 


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

* Re: dvb: one demux per tuner or one demux per demod?
  2011-05-24 12:05 ` Steve Kerrison
@ 2011-05-24 12:28   ` Devin Heitmueller
  2011-05-24 12:45     ` Steve Kerrison
  2011-05-24 13:00     ` Antti Palosaari
  2011-05-24 15:59   ` Rémi Denis-Courmont
  1 sibling, 2 replies; 7+ messages in thread
From: Devin Heitmueller @ 2011-05-24 12:28 UTC (permalink / raw)
  To: Steve Kerrison, Antti Palosaari
  Cc: Rémi Denis-Courmont, linux-media, vlc-devel

2011/5/24 Steve Kerrison <steve@stevekerrison.com>:
> Hi Rémi,
>
> The cxd2820r supports DVB-T/T2 and also DVB-C. As such antti coded up a
> multiple front end (MFE) implementation for em28xx then attaches the
> cxd2820r in both modes.
>
> I believe you can only use one frontend at once per adapter (this is
> certainly enforced in the cxd2820r module), so I don't see how it would
> cause a problem for mappings. I think a dual tuner device would register
> itself as two adapters, wouldn't it?
>
> But I'm new at this, so forgive me if I've overlooked something or
> misunderstood the issue you've raised.

Oh wow, is that what Antti did?  I didn't really give much thought but
I can appreciate why he did it (the DVB 3.x API won't allow a single
frontend to advertise support for DVB-C and DVB-T).

This is one of the big things that S2API fixes (through S2API you can
specify the modulation that you want).  Do we really want to be
advertising two frontends that point to the same demod, when they
cannot be used in parallel?  This seems doomed to create problems with
applications not knowing that they are in fact the same frontend.

I'm tempted to say that this patch should be scapped and we should
simply say that you cannot use DVB-C on this device unless you are
using S2API.  That would certainly be cleaner but it comes at the cost
of DVB-C not working with tools that haven't been converted over to
S2API yet.

Devin

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

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

* Re: dvb: one demux per tuner or one demux per demod?
  2011-05-24 12:28   ` Devin Heitmueller
@ 2011-05-24 12:45     ` Steve Kerrison
  2011-05-24 13:00     ` Antti Palosaari
  1 sibling, 0 replies; 7+ messages in thread
From: Steve Kerrison @ 2011-05-24 12:45 UTC (permalink / raw)
  To: Devin Heitmueller
  Cc: Antti Palosaari, Rémi Denis-Courmont, linux-media, vlc-devel

Hi Devin,

> Oh wow, is that what Antti did?  I didn't really give much thought but
> I can appreciate why he did it (the DVB 3.x API won't allow a single
> frontend to advertise support for DVB-C and DVB-T).

Yup, here's a quote from his initial pull request. I guess it doesn't
make completely clear why he did what he did unless you knew in advance
that the demod did DVB-T and DVB-C.

> Main part of this patch series is new demod driver for Sony CXD2820R. 
> Other big part is multi frontend (MFE) support for em28xx driver. I 
> don't have any other MFE device, so I cannot say if it is implemented 
> correctly or not. At least it seems to work. MFE locking is done in 
> demod driver. If there is some problems let me know and I will try to 
> fix those - I think there is no such big major problems still.

Back to your comments:

> This is one of the big things that S2API fixes (through S2API you can
> specify the modulation that you want).  Do we really want to be
> advertising two frontends that point to the same demod, when they
> cannot be used in parallel?  This seems doomed to create problems with
> applications not knowing that they are in fact the same frontend.

Agreed, but I had thought that with a single adapter with two frontends
it would be possible to obey the rules and only use one at once. If
frontend0 is in use, then if you try to open either frontend0 or
frontend1, you should get device busy... so I don't see it causing
massive issues.

Like you say, though, S2API is probably the better approach, with the
frontend advertising its supported modulations and selecting one as
required.

> I'm tempted to say that this patch should be scapped and we should
> simply say that you cannot use DVB-C on this device unless you are
> using S2API.  That would certainly be cleaner but it comes at the cost
> of DVB-C not working with tools that haven't been converted over to
> S2API yet.

Seeing as the 290e is the only cxd2820r based device supported in Linux
right now, combined with the fact that it isn't even advertised as a
DVB-C device by PCTV Systems, that's probably an acceptable hit to take.

I'd be interested to see what Antti thinks though. :)

Regards,
-- 
Steve Kerrison MEng Hons.
http://www.stevekerrison.com/ 

On Tue, 2011-05-24 at 08:28 -0400, Devin Heitmueller wrote:
> 2011/5/24 Steve Kerrison <steve@stevekerrison.com>:
> > Hi Rémi,
> >
> > The cxd2820r supports DVB-T/T2 and also DVB-C. As such antti coded up a
> > multiple front end (MFE) implementation for em28xx then attaches the
> > cxd2820r in both modes.
> >
> > I believe you can only use one frontend at once per adapter (this is
> > certainly enforced in the cxd2820r module), so I don't see how it would
> > cause a problem for mappings. I think a dual tuner device would register
> > itself as two adapters, wouldn't it?
> >
> > But I'm new at this, so forgive me if I've overlooked something or
> > misunderstood the issue you've raised.
> 
> Oh wow, is that what Antti did?  I didn't really give much thought but
> I can appreciate why he did it (the DVB 3.x API won't allow a single
> frontend to advertise support for DVB-C and DVB-T).
> 
> This is one of the big things that S2API fixes (through S2API you can
> specify the modulation that you want).  Do we really want to be
> advertising two frontends that point to the same demod, when they
> cannot be used in parallel?  This seems doomed to create problems with
> applications not knowing that they are in fact the same frontend.
> 
> I'm tempted to say that this patch should be scapped and we should
> simply say that you cannot use DVB-C on this device unless you are
> using S2API.  That would certainly be cleaner but it comes at the cost
> of DVB-C not working with tools that haven't been converted over to
> S2API yet.
> 
> Devin
> 


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

* Re: dvb: one demux per tuner or one demux per demod?
  2011-05-24 12:28   ` Devin Heitmueller
  2011-05-24 12:45     ` Steve Kerrison
@ 2011-05-24 13:00     ` Antti Palosaari
  2011-05-25 14:51       ` Rémi Denis-Courmont
  1 sibling, 1 reply; 7+ messages in thread
From: Antti Palosaari @ 2011-05-24 13:00 UTC (permalink / raw)
  To: Devin Heitmueller
  Cc: Steve Kerrison, Rémi Denis-Courmont, linux-media, vlc-devel

On 05/24/2011 03:28 PM, Devin Heitmueller wrote:
> 2011/5/24 Steve Kerrison<steve@stevekerrison.com>:
>> Hi Rémi,
>>
>> The cxd2820r supports DVB-T/T2 and also DVB-C. As such antti coded up a
>> multiple front end (MFE) implementation for em28xx then attaches the
>> cxd2820r in both modes.
>>
>> I believe you can only use one frontend at once per adapter (this is
>> certainly enforced in the cxd2820r module), so I don't see how it would
>> cause a problem for mappings. I think a dual tuner device would register
>> itself as two adapters, wouldn't it?
>>
>> But I'm new at this, so forgive me if I've overlooked something or
>> misunderstood the issue you've raised.
>
> Oh wow, is that what Antti did?  I didn't really give much thought but
> I can appreciate why he did it (the DVB 3.x API won't allow a single
> frontend to advertise support for DVB-C and DVB-T).

Yes I did, since I didn't know there is better way. Is there any other 
driver which implements it differently? I think all current MFE drivers 
does it like I did. For example look NetUP cx23885 + stv0367.

/dev/dvb/adapter0/
crw-rw----+ 1 root video 212, 2 May 24 15:51 demux0
crw-rw----+ 1 root video 212, 3 May 24 15:51 dvr0
crw-rw----+ 1 root video 212, 0 May 24 15:51 frontend0
crw-rw----+ 1 root video 212, 1 May 24 15:51 frontend1
crw-rw----+ 1 root video 212, 4 May 24 15:51 net0

> This is one of the big things that S2API fixes (through S2API you can
> specify the modulation that you want).  Do we really want to be
> advertising two frontends that point to the same demod, when they
> cannot be used in parallel?  This seems doomed to create problems with
> applications not knowing that they are in fact the same frontend.

I was in understanding it is MFE when there is multiple frontends in 
same adapter. In that case only one adapter can be used at time. I added 
lock to cxd2820r driver, which probably is in wrong place (I think it 
should be interface-driver or core which locks).

> I'm tempted to say that this patch should be scapped and we should
> simply say that you cannot use DVB-C on this device unless you are
> using S2API.  That would certainly be cleaner but it comes at the cost
> of DVB-C not working with tools that haven't been converted over to
> S2API yet.

reagrds,
Antti
-- 
http://palosaari.fi/

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

* Re: dvb: one demux per tuner or one demux per demod?
  2011-05-24 12:05 ` Steve Kerrison
  2011-05-24 12:28   ` Devin Heitmueller
@ 2011-05-24 15:59   ` Rémi Denis-Courmont
  1 sibling, 0 replies; 7+ messages in thread
From: Rémi Denis-Courmont @ 2011-05-24 15:59 UTC (permalink / raw)
  To: Steve Kerrison; +Cc: linux-media, vlc-devel

    Hello,

----- Message d'origine -----
> I believe you can only use one frontend at once per adapter (this is
> certainly enforced in the cxd2820r module), so I don't see how it would
> cause a problem for mappings. I think a dual tuner device would register
> itself as two adapters, wouldn't it?

That would be one scheme: there would only ever be one demux per adapter then. But from archives of this very mailing list, I gather that say HVR 3000 shows up as two frontends (DVB-T and DVB-S) with a demux each... Not consistent if true (I do not have such a device to check).

For seamless setup in userspace, I need a consistent mapping scheme, whatever that is. Ideally, I would be able to distinguish multiproto frontends from dual tuners from dual tuners with dual antenna. At the very least, I need a way to find the demux that corresponds to a frontend. And until DMX_OUT_TSDEMUX_TAP works correctly, to a dvr.

Otherwise, user needs to configure frontend AND demux, which is really unfriendly and error-prone.

-- 
Rémi

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

* Re: dvb: one demux per tuner or one demux per demod?
  2011-05-24 13:00     ` Antti Palosaari
@ 2011-05-25 14:51       ` Rémi Denis-Courmont
  0 siblings, 0 replies; 7+ messages in thread
From: Rémi Denis-Courmont @ 2011-05-25 14:51 UTC (permalink / raw)
  To: linux-media; +Cc: vlc-devel

Le mardi 24 mai 2011 16:00:14 Antti Palosaari, vous avez écrit :
> Yes I did, since I didn't know there is better way. Is there any other
> driver which implements it differently? I think all current MFE drivers
> does it like I did. For example look NetUP cx23885 + stv0367.
> 
> /dev/dvb/adapter0/
> crw-rw----+ 1 root video 212, 2 May 24 15:51 demux0
> crw-rw----+ 1 root video 212, 3 May 24 15:51 dvr0
> crw-rw----+ 1 root video 212, 0 May 24 15:51 frontend0
> crw-rw----+ 1 root video 212, 1 May 24 15:51 frontend1
> crw-rw----+ 1 root video 212, 4 May 24 15:51 net0

So there is always only one demux per adapter then? That would work for me, 
but it contradicts the example code at Documentation/DocBook/dvb/examples.xml

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis

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

end of thread, other threads:[~2011-05-25 14:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24 10:55 dvb: one demux per tuner or one demux per demod? Rémi Denis-Courmont
2011-05-24 12:05 ` Steve Kerrison
2011-05-24 12:28   ` Devin Heitmueller
2011-05-24 12:45     ` Steve Kerrison
2011-05-24 13:00     ` Antti Palosaari
2011-05-25 14:51       ` Rémi Denis-Courmont
2011-05-24 15:59   ` Rémi Denis-Courmont

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.