]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: audio_graph_card2: Add support for variable slot widths
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Mon, 28 Feb 2022 17:27:54 +0000 (17:27 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 7 Mar 2022 13:12:58 +0000 (13:12 +0000)
commitf99d764233f76e0d278a2c0e9fe394a7e73fe05f
tree86b9ef425eaf26b4793ffa1180fb0f5098352717
parent6c65492da6c8b730e4fd4b6fd77ec0bb68be71a5
ASoC: audio_graph_card2: Add support for variable slot widths

Some audio hardware cannot support the same slot width for all sample
widths, or a slot width equal to the sample width for all sample widths.
This is usually due either to limitations of the audio serial port or
system clocking restrictions.
A typical example would be:

- 16-bit samples in 16-bit slots
- 24-bit samples in 32-bit slots

The new dai-tdm-slot-width-map property allows setting a mapping of
sample widths and the corresponding tdm slot widths and slot counts.
Although the slot count is usually the same for all cases this does
allow for adding padding slots to maintain the same bitclk frequency.

The property is added to each endpoint node that needs the component
DAI to be told the TDM slot width and count.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220228172754.453783-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/simple_card_utils.h
sound/soc/generic/audio-graph-card2.c
sound/soc/generic/simple-card-utils.c