1. 14 Sep, 2020 20 commits
  2. 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
  3. 10 Sep, 2020 13 commits