summaryrefslogtreecommitdiff
path: root/sound/soc/sti/uniperif.h
diff options
context:
space:
mode:
authorMoise Gergaud <moise.gergaud@st.com>2016-04-07 12:25:33 +0300
committerMark Brown <broonie@kernel.org>2016-04-12 06:59:09 +0300
commit44f948bdb175bf326911c9ba0e47389918161ce5 (patch)
tree7725979f1693b1d1f33aada15f63571c9a8ba4ba /sound/soc/sti/uniperif.h
parent9a00a3e9fea1ea5affa7bea971299d3a5832daad (diff)
downloadlinux-44f948bdb175bf326911c9ba0e47389918161ce5.tar.xz
ASoC: sti: helper functions for unip tdm slots configuration
- sti_uniperiph_set_tdm_slot: store tdm slot config in unip context - sti_uniperiph_get_tdm_word_pos: configure unip tdm slots pos regs Signed-off-by: Moise Gergaud <moise.gergaud@st.com> Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sti/uniperif.h')
-rw-r--r--sound/soc/sti/uniperif.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/sound/soc/sti/uniperif.h b/sound/soc/sti/uniperif.h
index 750eb5a07e6c..fb8e427754b6 100644
--- a/sound/soc/sti/uniperif.h
+++ b/sound/soc/sti/uniperif.h
@@ -1270,6 +1270,14 @@ enum uniperif_iec958_encoding_mode {
UNIPERIF_IEC958_ENCODING_MODE_ENCODED
};
+enum uniperif_word_pos {
+ WORD_1_2,
+ WORD_3_4,
+ WORD_5_6,
+ WORD_7_8,
+ WORD_MAX
+};
+
struct uniperif_info {
int id; /* instance value of the uniperipheral IP */
enum uniperif_type type;
@@ -1281,6 +1289,13 @@ struct uniperif_iec958_settings {
struct snd_aes_iec958 iec958;
};
+struct dai_tdm_slot {
+ unsigned int mask;
+ int slots;
+ int slot_width;
+ unsigned int avail_slots;
+};
+
struct uniperif {
/* System information */
struct uniperif_info *info;
@@ -1317,6 +1332,7 @@ struct uniperif {
/* dai properties */
unsigned int daifmt;
+ struct dai_tdm_slot tdm_slot;
/* DAI callbacks */
const struct snd_soc_dai_ops *dai_ops;
@@ -1373,4 +1389,11 @@ int sti_uniperiph_dai_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai);
+int sti_uniperiph_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
+ unsigned int rx_mask, int slots,
+ int slot_width);
+
+int sti_uniperiph_get_tdm_word_pos(struct uniperif *uni,
+ unsigned int *word_pos);
+
#endif