Commit d60e4f1e authored by Jerome Brunet's avatar Jerome Brunet Committed by Mark Brown

ASoC: meson: add tdm interface driver

Add Amlogic's axg TDM interface driver. This driver manages the format
and clocks provided on the pads.

On this SoC, each stream direction provides 4 serial lanes. This makes
a maximum of 8 channels in i2s modes and 128 channels in DSP modes.

While each lanes operate on the same slot number (same bit clock), they
may have different TDM masks. This requires to provide a function to let
the card set the 4 masks, in lieu of the usual set_tdm_slots() callback
of the dai driver.
Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1a11d88f
...@@ -23,6 +23,10 @@ config SND_MESON_AXG_TDM_FORMATTER ...@@ -23,6 +23,10 @@ config SND_MESON_AXG_TDM_FORMATTER
tristate tristate
select REGMAP_MMIO select REGMAP_MMIO
config SND_MESON_AXG_TDM_INTERFACE
tristate
select SND_MESON_AXG_TDM_FORMATTER
config SND_MESON_AXG_SPDIFOUT config SND_MESON_AXG_SPDIFOUT
tristate "Amlogic AXG SPDIF Output Support" tristate "Amlogic AXG SPDIF Output Support"
imply SND_SOC_SPDIF imply SND_SOC_SPDIF
......
...@@ -4,10 +4,12 @@ snd-soc-meson-axg-fifo-objs := axg-fifo.o ...@@ -4,10 +4,12 @@ snd-soc-meson-axg-fifo-objs := axg-fifo.o
snd-soc-meson-axg-frddr-objs := axg-frddr.o snd-soc-meson-axg-frddr-objs := axg-frddr.o
snd-soc-meson-axg-toddr-objs := axg-toddr.o snd-soc-meson-axg-toddr-objs := axg-toddr.o
snd-soc-meson-axg-tdm-formatter-objs := axg-tdm-formatter.o snd-soc-meson-axg-tdm-formatter-objs := axg-tdm-formatter.o
snd-soc-meson-axg-tdm-interface-objs := axg-tdm-interface.o
snd-soc-meson-axg-spdifout-objs := axg-spdifout.o snd-soc-meson-axg-spdifout-objs := axg-spdifout.o
obj-$(CONFIG_SND_MESON_AXG_FIFO) += snd-soc-meson-axg-fifo.o obj-$(CONFIG_SND_MESON_AXG_FIFO) += snd-soc-meson-axg-fifo.o
obj-$(CONFIG_SND_MESON_AXG_FRDDR) += snd-soc-meson-axg-frddr.o obj-$(CONFIG_SND_MESON_AXG_FRDDR) += snd-soc-meson-axg-frddr.o
obj-$(CONFIG_SND_MESON_AXG_TODDR) += snd-soc-meson-axg-toddr.o obj-$(CONFIG_SND_MESON_AXG_TODDR) += snd-soc-meson-axg-toddr.o
obj-$(CONFIG_SND_MESON_AXG_TDM_FORMATTER) += snd-soc-meson-axg-tdm-formatter.o obj-$(CONFIG_SND_MESON_AXG_TDM_FORMATTER) += snd-soc-meson-axg-tdm-formatter.o
obj-$(CONFIG_SND_MESON_AXG_TDM_INTERFACE) += snd-soc-meson-axg-tdm-interface.o
obj-$(CONFIG_SND_MESON_AXG_SPDIFOUT) += snd-soc-meson-axg-spdifout.o obj-$(CONFIG_SND_MESON_AXG_SPDIFOUT) += snd-soc-meson-axg-spdifout.o
This diff is collapsed.
...@@ -71,4 +71,8 @@ static inline int axg_tdm_stream_reset(struct axg_tdm_stream *ts) ...@@ -71,4 +71,8 @@ static inline int axg_tdm_stream_reset(struct axg_tdm_stream *ts)
return axg_tdm_stream_start(ts); return axg_tdm_stream_start(ts);
} }
int axg_tdm_set_tdm_slots(struct snd_soc_dai *dai, u32 *tx_mask,
u32 *rx_mask, unsigned int slots,
unsigned int slot_width);
#endif /* _MESON_AXG_TDM_H */ #endif /* _MESON_AXG_TDM_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment