Skip to content

RFC Add support for Geniatech/MyGica A681B and PT682C USB ATSC/QAM TV tuners

Forest Crossman linux-media lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2media: mxl692: Add configurable crystal and MPEG settingsdrivers/media/dvb-frontends/mxl692.c drivers/media/dvb-frontends/mxl692.h drivers/media/usb/em28xx/em28xx-dvb.c+54 -120 replies
2/2media: dvb-usb-v2: Add support for Geniatech/MyGica A681B and PT682Cdrivers/media/usb/dvb-usb-v2/Kconfig drivers/media/usb/dvb-usb-v2/dvbsky.c include/media/dvb-usb-ids.h+72 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] Add support for Geniatech/MyGica A681B and PT682C USB ATSC/QAM TV tuners

Hello, all,

This patch series adds support for the Geniatech/MyGica A681B and PT682C, which are USB TV tuners that support ATSC/QAM. These devices both use the MxL692 combo tuner+demodulator IC, so adding support for them only required adding the USB IDs and modifying the existing MxL692 driver to take some configuration parameters from the drivers that use it.

I've sent this series as an RFC for now because I wasn't really sure how best to pass the clock and MPEG parameters from the USB device drivers to the MxL692 driver. I ended up just adding some extra members to the structs and copying the parameters to the MxL692 configuration on probe, but this feels like the wrong approach. The only other ways I could think of to do this were:

1. Making the mxl692 module aware of the TV tuners that use it by storing the configurations for each TV tuner in the module and selecting between them with an enum.
2. Including mxl692_defs.h in the TV tuner drivers that use the module and initializing the xtal and mpeg structs directly.

But I wasn't sure which option would be best, or if there was another way that I hadn't though of. If anyone has any suggestions on how best to handle this, I'd be happy to hear them!

This is the first change I've made to a driver that's more than just a handful of lines adding some device IDs, so I'd appreciate any advice I can get. And if you have any questions, please let me know!

Thanks,
Forest

P.S.: I couldn't find the MxL692 firmware image anywhere, so I wrote a script to extract it from the driver for Windows and have posted that script here[1]. Also, for the sake of completeness there is a newer firmware image embedded in the Geniatech/MyGica drivers for Ubuntu 20.04, but that firmware image didn't work with the mainline driver so I haven't bothered to publish a script to extract it.

[1]: https://gist.github.com/cyrozap/f07a8b9803d2e9e3d0ee7acf54843ab0

Forest Crossman (2):
media: mxl692: Add configurable crystal and MPEG settings
media: dvb-usb-v2: Add support for Geniatech/MyGica A681B and PT682C

 drivers/media/dvb-frontends/mxl692.c  | 38 ++++++++++-----
 drivers/media/dvb-frontends/mxl692.h  | 19 ++++++++
 drivers/media/usb/dvb-usb-v2/Kconfig  |  1 +
 drivers/media/usb/dvb-usb-v2/dvbsky.c | 69 +++++++++++++++++++++++++++
 drivers/media/usb/em28xx/em28xx-dvb.c |  9 ++++
 include/media/dvb-usb-ids.h           |  2 +
 6 files changed, 126 insertions(+), 12 deletions(-)
Signature · 1 line
2.51.0