mbox series

[0/2] ASoC: rt1308-sdw: configure amplifier with set_tdm_slot()

Message ID 20200325212905.28145-1-pierre-louis.bossart@linux.intel.com (mailing list archive)
Headers show
Series ASoC: rt1308-sdw: configure amplifier with set_tdm_slot() | expand

Message

Pierre-Louis Bossart March 25, 2020, 9:29 p.m. UTC
When two (or more) amplifiers are on the same link, the integrator may:
a) assign dedicated slots for each of the amplifiers.
b) provide the same configuration to all amplifiers, and rely on
additional controls/processing in the amplifier to generate different
outputs.

case a) was the initial direction for SoundWire and is required for
amplifiers with limited capabilities, but to deal with orientation or
'posture' changes it's easier to implement case b) when the amplifier
can deal with multiple channels.

This patchset suggest the use of the set_tdm_slot() API to define
which of the channels will be consumed by what amplifiers. This maps
well with SoundWire's 'ChannelEnable' registers. The notion of
slot_width is however irrelevant here and ignored, and SoundWire ports
are typically single direction, so only one of the two masks shall be
used.

Pierre-Louis Bossart (2):
  ASoC: rt1308-sdw: add set_tdm_slot() support
  ASoC: rt1308-sdw: use slot and rx_mask to configure stream

 sound/soc/codecs/rt1308-sdw.c | 38 +++++++++++++++++++++++++++++++----
 sound/soc/codecs/rt1308-sdw.h |  2 ++
 2 files changed, 36 insertions(+), 4 deletions(-)