diff options
author | Daniel Scheller <d.scheller@gmx.net> | 2018-06-23 11:36:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-07-30 16:23:12 -0400 |
commit | e1f84840fd13e5f7ef4c20e3e9d021a0d2f19e11 (patch) | |
tree | 74f9174e55ab3476a4201f1dabd0d5d6ec9f1352 /drivers | |
parent | 3153dfe2914bec728cab9a5c9d7b2ec71d714d9c (diff) |
media: ddbridge/sx8: enable modulation selection in set_parameters()
Allow for tuning to transponders with specific modulations in
set_parameters(). Setting a specific modulation will also enable lower
modulations.
Picked up from the upstream dddvb GIT. Upstream also has support for
APSK64/128/256 modulations which aren't supported yet by the DVB
API, so comment them out until support for them is added.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/pci/ddbridge/ddbridge-sx8.c | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/drivers/media/pci/ddbridge/ddbridge-sx8.c b/drivers/media/pci/ddbridge/ddbridge-sx8.c index c87cefa10762..4418604258d1 100644 --- a/drivers/media/pci/ddbridge/ddbridge-sx8.c +++ b/drivers/media/pci/ddbridge/ddbridge-sx8.c @@ -372,15 +372,31 @@ static int set_parameters(struct dvb_frontend *fe) if (iq_mode) ts_config = (SX8_TSCONFIG_TSHEADER | SX8_TSCONFIG_MODE_IQ); if (iq_mode < 3) { - u32 flags = 3; - u32 mask = 0x7f; - - if (p->modulation == APSK_16 || - p->modulation == APSK_32) { - flags = 2; + u32 mask; + + switch (p->modulation) { + /* uncomment whenever these modulations hit the DVB API + * case APSK_256: + * mask = 0x7f; + * break; + * case APSK_128: + * mask = 0x3f; + * break; + * case APSK_64: + * mask = 0x1f; + * break; + */ + case APSK_32: mask = 0x0f; + break; + case APSK_16: + mask = 0x07; + break; + default: + mask = 0x03; + break; } - stat = start(fe, flags, mask, ts_config); + stat = start(fe, 3, mask, ts_config); } else { u32 flags = (iq_mode == 2) ? 1 : 0; |