2021-06-23 06:17:29

by YP WU

[permalink] [raw]
Subject: How to use "DTV_FE_CAPABILITY" command for Frontend.h of Linux DVB

Hello, dvb frontend maintainer:
I work at mediatek company. Currently I develop TV with Linux DVB system.
I would like to implement the following LNB use cases: user space would like to know if frontend device node have LNB or not.
I want to use "DTV_FE_CAPABILITY" to represent above LNB capability, but I am afraid that my usage is not suitable to the original definition.
So I would like to consult the following quesitons:
1. The use case for DTV_FE_CAPABILITY in DVB property command.
2. Does it have any restriction for using this command?
3. What’s your suggestion for using this command?

File path: include/uapi/linux/dvb/Frontend.h
#define DTV_FE_CAPABILITY 16

Sorry to bother you and thanks for your helps.
BRs,
YP


2021-06-23 07:35:25

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: How to use "DTV_FE_CAPABILITY" command for Frontend.h of Linux DVB

Hi,

Em Wed, 23 Jun 2021 14:15:51 +0800
YP WU <[email protected]> escreveu:

> Hello, dvb frontend maintainer:
> I work at mediatek company. Currently I develop TV with Linux DVB system.
> I would like to implement the following LNB use cases: user space would like to know if frontend device node have LNB or not.


I need to understand more about the use case.

The main scenario of userspace needing to know about LNB is on Satellite
systems. For those, knowing that the standard is DVB-S/S2, ISDB-S, ... is
enough to know that a LNB should be controlled.

However, userspace needs more than the Kernel can provide, as the LNB is
an external component, located at the satellite dish.

Such kind of LNB may implement DiSEqC in order to allow certain control
from the device powering them, but there are several LNB types that
don't provide any control.

Even when those that implement DiSEqC 1.x, there's no way to query the
LNB properties.

Only after DiSEqC 2.x, there's a way for the LNB to send data back to
the digital TV receiver.

Also, some satellite systems are configured as multipoint. On those,
the LNBf power/control can be done by a centralized equipment. Depending
on the type of arrangement, the LNB control can be set to OFF, as all
channels are received on different intermediate frequencies.

Due to such huge differences, and the lack of a way for the Kernel
to retrieve the satellite configuration, what happens is the
other way around: it should be up to userspace to tell the Kernel
about it, asking it to turn on/off the LNB power, set the DC voltage
and send/receive DiSEqC commands.

-

That's said, a few devices may have a low noise amplifier that
could be turned on in order to boost the signal gain. The
DTV_LNA is meant to control it.

Currently, the only way to know if LNA is there is to try to
set it, and check for the return code.


> I want to use "DTV_FE_CAPABILITY" to represent above LNB capability, but I am afraid that my usage is not suitable to the original definition.
> So I would like to consult the following quesitons:
> 1. The use case for DTV_FE_CAPABILITY in DVB property command.
> 2. Does it have any restriction for using this command?
> 3. What’s your suggestion for using this command?
>
> File path: include/uapi/linux/dvb/Frontend.h
> #define DTV_FE_CAPABILITY 16
>

We need to better implement DVB capabilities at the subsystem.

The DTV_FE_CAPABILITY property is meant to duplicate the DVBv3
FE_GET_INFO capabilites (fe_caps), but there are very few bits
left there. They aren't enough to provide all possible capabilities
of a DVB system.

I mean, for instance a DVB-S2 device may support only a subset
of DVB-S2 modulation types. They may eventually not support PLP,
and so on. The number of possible combinations is a way larger
than a 32-bits caps could possible support.

We had some upstream discussions about how to improve it in the
past, but nothing got merged.

IMO, if you're willing to work on a better way to report the
device's capabilities, we should probably implement a new DTV
property.

Thanks,
Mauro

2021-07-02 09:33:01

by YP WU

[permalink] [raw]
Subject: Re: How to use "DTV_FE_CAPABILITY" command for Frontend.h of Linux DVB

Hello, Mr.Mauro,
<I need to understand more about the use case.
-> About use case, I describe below:

For our design of kernel, demod/tuner and LNB are registered to different frontend device nodes.
We want to implement property command to know if the frontend device node is LNB device or demod/tuner device.
If it is LNB device node, the value would return true
If it is demod/tuner device node, the value would return false.

Do you have better idea or suggestion for our usage?
Please let me know if your have better suggestion.
Very thank you for your help.

BRs,
YP

2021-07-09 15:49:05

by YP WU

[permalink] [raw]
Subject: Re: How to use "DTV_FE_CAPABILITY" command for Frontend.h of Linux DVB

>From: YP WU <[email protected]>
>>To: <[email protected]>
>>Cc: <[email protected]>, <[email protected]>,
>> <[email protected]>, <[email protected]>,
>> <[email protected]>, <[email protected]>,
>> <[email protected]>, <[email protected]>,
>> <[email protected]>
>>Subject: Re: How to use "DTV_FE_CAPABILITY" command for Frontend.h of Linux DVB
>>Date: Fri, 2 Jul 2021 17:28:34 +0800
>>Message-ID: <[email protected]> (raw)
>>In-Reply-To: <[email protected]>
>>
>>Hello, Mr.Mauro,
>><I need to understand more about the use case.
>>-> About use case, I describe below:
>>
>> For our design of kernel, demod/tuner and LNB are registered to different frontend device nodes.
>>We want to implement property command to know if the frontend device node is LNB device or demod/tuner device.
>>If it is LNB device node, the value would return true
>>If it is demod/tuner device node, the value would return false.
>>
>>Do you have better idea or suggestion for our usage?
>>Please let me know if your have better suggestion.
>>Very thank you for your help.
>>
>>BRs,
>>YP

Hello, Mr.Mauro,
Frist of all, thanks for your reply.
Based on previous discussion, we think we can create a new property command to achieve our goal.
A new property command "DTV_FE_LNB_CAPABILITY".
We can use "FE_GET_PROPERTY" with case "DTV_FE_LNB_CAPABILITY" to get LNB capability.
We also should add a new variable named "LNB_capability" in dtv_frontend_properties. Like below:
bool LNB_capability;
If the device node is LNB, LNB_capability should set to TRUE.
If the device node is demod/tuner, LNB_capability should set to FALSE.

What's your opinion?
If you have a better idea or suggestion, please let me know.

Very thank you.

BRs,
YP

2021-07-15 10:46:32

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: How to use "DTV_FE_CAPABILITY" command for Frontend.h of Linux DVB

Em Fri, 9 Jul 2021 23:47:39 +0800
YP WU <[email protected]> escreveu:

> >From: YP WU <[email protected]>
> >>To: <[email protected]>
> >>Cc: <[email protected]>, <[email protected]>,
> >> <[email protected]>, <[email protected]>,
> >> <[email protected]>, <[email protected]>,
> >> <[email protected]>, <[email protected]>,
> >> <[email protected]>
> >>Subject: Re: How to use "DTV_FE_CAPABILITY" command for Frontend.h of Linux DVB
> >>Date: Fri, 2 Jul 2021 17:28:34 +0800
> >>Message-ID: <[email protected]> (raw)
> >>In-Reply-To: <[email protected]>
> >>
> >>Hello, Mr.Mauro,
> >><I need to understand more about the use case.
> >>-> About use case, I describe below:
> >>
> >> For our design of kernel, demod/tuner and LNB are registered to different frontend device nodes.
> >>We want to implement property command to know if the frontend device node is LNB device or demod/tuner device.
> >>If it is LNB device node, the value would return true
> >>If it is demod/tuner device node, the value would return false.
> >>
> >>Do you have better idea or suggestion for our usage?
> >>Please let me know if your have better suggestion.
> >>Very thank you for your help.
> >>
> >>BRs,
> >>YP
>
> Hello, Mr.Mauro,
> Frist of all, thanks for your reply.
> Based on previous discussion, we think we can create a new property command to achieve our goal.
> A new property command "DTV_FE_LNB_CAPABILITY".
> We can use "FE_GET_PROPERTY" with case "DTV_FE_LNB_CAPABILITY" to get LNB capability.
> We also should add a new variable named "LNB_capability" in dtv_frontend_properties. Like below:
> bool LNB_capability;
> If the device node is LNB, LNB_capability should set to TRUE.
> If the device node is demod/tuner, LNB_capability should set to FALSE.
>
> What's your opinion?
> If you have a better idea or suggestion, please let me know.

It sounds that there are some misunderstanding here, specially when you
mention a "LNB device node".

See this picture:
https://linuxtv.org/downloads/v4l-dvb-apis-new/_images/typical_media_device.svg

The way the DVB API maps the hardware is that the frontend groups:

- tuner;
- demod;
- Satellite Equipment Control (SEC).

While not explicitly there, LNB is part of the frontend (it is part of
the SEC, for satellite systems like DVB-S/S2). some tuners may
also have LNBs before them.

So, there's no separate device node for it. Everything is controlled
via the /dev/dvb/frontend* device nodes.

So, it is not clear yet why are you considering to have a separate
devnode for the LNB.

Thanks,
Mauro

2021-09-02 11:09:48

by YP WU

[permalink] [raw]
Subject: Re: How to use "DTV_FE_CAPABILITY" command for Frontend.h of Linux DVB

Hello, Mr.Mauro,
Frist of all, thanks for your reply and Sorry to reply late.

We know that everything is controlled by /dev/dvb/frontend.

It is assumed that the device node "dvb/frontend0", "dvb/frontend1" and "dvb/frontend2" use the input signal from the same satellite antenna. In addition, "dvb/frontend0", "dvb/frontend1", and "dvb/frontend2" are premised on receiving broadcast signals at the same time under the condition that the same voltage is always supplied to the satellite antenna.

Therefore, Our TV uses an HW circuit equipped with only one LNB IC.

Since only one LNB IC is installed, the design policy of including and controlling the same LNB IC in "dvb/frontend0", "dvb/frontend1" and "dvb/frontend2" is complicated and difficult to understand. It is more simpler and easier to design to separate the LNB IC into "dvb/frontend3" and control the LNB IC from "dvb0.frontend3". Therefore, we want to separate LNB to different device node.

BRs,
YP