1. 17 Sep, 2020 2 commits
    • Mauro Carvalho Chehab's avatar
      media: vidtv: fix DVB-S/S2 tuning logic · 9ec6f4bb
      Mauro Carvalho Chehab authored
      Satellite setups are different than terrestrial and cable ones,
      as there is a device coupled at the antenna, called LNBf, which
      converts the frequency from a GHz range at C-Band or Ku-Band
      into an intermediate frequency at S-Band (ranging up to ~2GHz).
      
      There are several different models of LNBf, with different
      IF conversions, but the most common nowadays is called
      Universal LNBf. Those got their frequency ranges extended in the
      past, when Astra 19.2E sattellite was launched.
      
      The universal LNBf has two local oscilators:
      
      	- 9.75 GHz
      	- 10.6 GHz
      
      The first one is used when the frequency is between 10.7 GHz
      up to 11.7 GHz. The second one is for frequencies between
      11.7 GHz to 12.75 GHz.
      
      With that, the IF signal will be at 950 MHz to 2,150 MHz range.
      
      Add support for doing the above math, and make clear that
      the frequencies expected by the driver should be at Ku-Band
      range.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      9ec6f4bb
    • Mauro Carvalho Chehab's avatar
      media: vidtv: add DiSEqC dummy ops · d38829a5
      Mauro Carvalho Chehab authored
      Those are needed for real applications to work with Satellite
      systems.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      d38829a5
  2. 14 Sep, 2020 23 commits
  3. 12 Sep, 2020 7 commits
    • Hans Verkuil's avatar
      media: media/test-drivers/Kconfig: fix broken Kconfig · c4176e12
      Hans Verkuil authored
      menuconfig DVB_TEST_DRIVERS should be added after the V4L_TEST_DRIVERS,
      otherwise there are no drivers listed in these two menus.
      Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
      Fixes: 24fb190e ("media: vidtv: implement a tuner driver")
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      c4176e12
    • Mauro Carvalho Chehab's avatar
      media: vidtv: fix driver unbind/remove · 63101b75
      Mauro Carvalho Chehab authored
      The current remove logic is broken and causes an OOPS.
      
      Fix it.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      63101b75
    • Daniel W. S. Almeida's avatar
      media: Documentation: vidtv: Add ReST documentation for vidtv · 1f9a7046
      Daniel W. S. Almeida authored
      Add documentation for the Virtual Digital TV driver (vidtv) in the
      Restructured Text (ReST) format.
      
      This discusses:
      - What is vidtv
      - Why vidtv is needed
      - How to build and run vidtv
      - How vidtv is structured
      - How to test vidtv
      - How to improve vidtv
      
      [mchehab: fixed bad whitespaces]
      Signed-off-by: default avatarDaniel W. S. Almeida <dwlsalmeida@gmail.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      1f9a7046
    • Daniel W. S. Almeida's avatar
      media: vidtv: add a bridge driver · f90cf607
      Daniel W. S. Almeida authored
      Digital TV devices consist of several independent hardware components
      which are controlled by different drivers.
      Each media device is controlled by a group of cooperating drivers with the
      bridge driver as the main driver.
      
      This patch adds a bridge driver for the Virtual Digital TV driver [vidtv].
      
      The bridge driver binds to the other drivers, that is, vidtv_tuner and
      vidtv_demod and implements the digital demux logic, providing userspace
      with a MPEG Transport Stream.
      
      The MPEG related code is split in the following way:
      
      - vidtv_ts: code to work with MPEG TS packets, such as TS headers,
      adaptation fields, PCR packets and NULL packets.
      
      - vidtv_psi: this is the PSI generator.
      PSI packets contain general information about a MPEG Transport Stream.
      A PSI generator is needed so userspace apps can retrieve information
      about the Transport Stream and eventually tune into a (dummy) channel.
      
      Because the generator is implemented in a separate file, it can be
      reused elsewhere in the media subsystem.
      
      Currently vidtv supports working with 3 PSI tables:
      PAT, PMT and SDT.
      
      - vidtv_pes: implements the PES logic to convert encoder data into
      MPEG TS packets. These can then be fed into a TS multiplexer and
      eventually into userspace.
      
      - vidtv_s302m: implements a S302M encoder to make it possible to
      insert PCM audio data in the generated MPEG Transport Stream.
      
      This shall enable passing an audio signal into userspace so it can be
      decoded and played by media software.
      
      - vidtv_channels: Implements a 'channel' abstraction
      
      When vidtv boots, it will create some hardcoded channels:
      
      Their services will be concatenated to populate the SDT.
      Their programs will be concatenated to populate the PAT
      For each program in the PAT, a PMT section will be created
      The PMT section for a channel will be assigned its streams.
      Every stream will have its corresponding encoder polled to produce TS
      packets
      These packets may be interleaved by the mux and then delivered to the
      bridge
      
      - vidtv_mux - Implements a MPEG TS mux, loosely based on the ffmpeg
      implementation
      
      The multiplexer is responsible for polling encoders,
      interleaving packets, padding the resulting stream with NULL packets if
      necessary and then delivering the resulting TS packets to the bridge
      driver so it can feed the demux.
      Signed-off-by: default avatarDaniel W. S. Almeida <dwlsalmeida@gmail.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      f90cf607
    • Daniel W. S. Almeida's avatar
      media: vidtv: implement a demodulator driver · f5ffc3b6
      Daniel W. S. Almeida authored
      Implement a I2C demodulator driver, simulating support for DVB-T, DVB-C
      and DVB-S.
      
      This demodulator will periodically check the signal quality against a table
      and drop the TS lock if it drops below a threshold value, regaining it in
      the event that the signal improves.
      Signed-off-by: default avatarDaniel W. S. Almeida <dwlsalmeida@gmail.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      f5ffc3b6
    • Daniel W. S. Almeida's avatar
      media: vidtv: implement a tuner driver · 24fb190e
      Daniel W. S. Almeida authored
      The virtual DVB test driver serves as a reference DVB driver and helps
      validate the existing APIs in the media subsystem. It can also aid
      developers working on userspace applications.
      
      This dummy tuner should support common TV standards such as DVB-T/T2/S/S2,
      ISDB-T and ATSC when completed.
      Signed-off-by: default avatarDaniel W. S. Almeida <dwlsalmeida@gmail.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      24fb190e
    • Mauro Carvalho Chehab's avatar
      media: av7110: don't do float point math · 5e8db349
      Mauro Carvalho Chehab authored
      It sounds that earlier versions of GCC have troubles when
      doing const math at compile time, if no typecast is used:
      
      on i386:
      	ERROR: modpost: "__floatunsidf" [drivers/media/pci/ttpci/dvb-ttpci.ko] undefined!
      	ERROR: modpost: "__ltdf2" [drivers/media/pci/ttpci/dvb-ttpci.ko] undefined!
      
      The warning was generated on gcc (SUSE Linux) 7.5.0.
      Gcc 9.2 compiles it fine.
      
      As an added bonus, it also fixes this objtool warning:
      
      	drivers/media/pci/ttpci/av7110_v4l.c:163:11: error: SSE register return with SSE disabled
      Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      5e8db349
  4. 10 Sep, 2020 8 commits