[PATCH v2 00/13] tda998x updates

Russell King - ARM Linux admin linux at armlinux.org.uk
Thu Jun 13 14:29:43 UTC 2019


This series represents development work collected over the last six
months to improve the TDA998x driver, particularly for the audio
side.  These patches can be found in my "drm-tda998x-devel" branch
at git://git.armlinux.org.uk/~rmk/linux-arm.git

- Introduce an audio_settings structure so we can store the derived
  register settings independently of the audio parameters.
- Add support for the different I2S flavours.
- Improve the calculation of the audio clock divisor, the old code
  seemed to prevent combinations of video mode and audio sample rate
  from working.  Document what we don't know, what assumptions we are
  making, what has been found through experimentation, and what we are
  actually doing.
- Add calculation of the CTS n and k values depending on the bit clock
  to sample rate ratio (bclk_ratio) - we assume a bclk_ratio
  appropriate for the bus format that gives us the values we are using
  prior to this change to maintain compatibility.
- Move the "ena_ap" register value into the audio_settings structure.
- Eliminate the audio port array and repetitive searching of the array,
  instead looking up the "ena_ap" value by format - the DT binding only
  supports one setting per format, so old approach was not a good
  design.
- There is no need to set the two fields of the AIP_CLKSEL register
  independently of each other, so just write the register once while
  setting up audio.
- Deal with the format specific audio routing configuration when the
  audio settings are configured, rather than when programming the
  TDA998x, which means we can do all the validation at configuration
  time, rather than spreading it into other paths like modeset, where
  failures can't be reported.
- Since tda998x_configure_audio() is called from paths where failure
  is not an option, and we have eliminated the configuration dependent
  failures, we can make this functions return type void.  This allows
  simplification of tda998x_audio_hw_params() within the mutex
  protected region.
- We no longer need to store the full audio params within the audio
  settings structure, so eliminate it, only storing in the audio
  settings structure what we need to actually program the hardware.

- Add support for pixel repeated modes, tested on a Panasonic TV that
  supports these formats.
- Add support for selecting the appropriate RGB quantisation range
  depending on the sink capabilities, and avoid sending full range RGB
  when the sink only supports limited range RGB for the mode.  We do
  this by enabling the TDA998x's colour scaling matrix and applying
  the appropriate constants.
- Add support for setting the vendor specific infoframe, which ensures
  that we supply the information the sink expects for 3D modes (we
  support a htotal/vtotal up to 8191x2047, which allows for at least
  side-by-side 3D.)

 drivers/gpu/drm/i2c/tda998x_drv.c | 450 +++++++++++++++++++++++++-------------
 1 file changed, 302 insertions(+), 148 deletions(-)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up


More information about the dri-devel mailing list