summaryrefslogtreecommitdiffstats
path: root/sound/soc/sti/uniperif.h
diff options
context:
space:
mode:
authorMoise Gergaud <moise.gergaud@st.com>2016-04-07 11:25:31 +0200
committerMark Brown <broonie@kernel.org>2016-04-12 03:58:59 +0200
commit5295a0dc31d5261ff64406ece25e8d9e91530d2e (patch)
treeb2b662519b403929d26cbb903e6d937fc799899c /sound/soc/sti/uniperif.h
parentASoC: sti: macro for uniperif tdm regs access (diff)
downloadlinux-5295a0dc31d5261ff64406ece25e8d9e91530d2e.tar.xz
linux-5295a0dc31d5261ff64406ece25e8d9e91530d2e.zip
ASoC: sti: rename unip player type into common player & reader type
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.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/sound/soc/sti/uniperif.h b/sound/soc/sti/uniperif.h
index 400788bc9190..75116ab3cbc0 100644
--- a/sound/soc/sti/uniperif.h
+++ b/sound/soc/sti/uniperif.h
@@ -1219,6 +1219,15 @@
#define UNIPERIF_FIFO_SIZE 70 /* FIFO is 70 cells deep */
#define UNIPERIF_FIFO_FRAMES 4 /* FDMA trigger limit in frames */
+#define UNIPERIF_TYPE_IS_HDMI(p) \
+ ((p)->info->type == SND_ST_UNIPERIF_TYPE_HDMI)
+#define UNIPERIF_TYPE_IS_PCM(p) \
+ ((p)->info->type == SND_ST_UNIPERIF_TYPE_PCM)
+#define UNIPERIF_TYPE_IS_SPDIF(p) \
+ ((p)->info->type == SND_ST_UNIPERIF_TYPE_SPDIF)
+#define UNIPERIF_TYPE_IS_IEC958(p) \
+ (UNIPERIF_TYPE_IS_HDMI(p) || \
+ UNIPERIF_TYPE_IS_SPDIF(p))
/*
* Uniperipheral IP revisions
*/
@@ -1237,10 +1246,10 @@ enum uniperif_version {
};
enum uniperif_type {
- SND_ST_UNIPERIF_PLAYER_TYPE_NONE,
- SND_ST_UNIPERIF_PLAYER_TYPE_HDMI,
- SND_ST_UNIPERIF_PLAYER_TYPE_PCM,
- SND_ST_UNIPERIF_PLAYER_TYPE_SPDIF
+ SND_ST_UNIPERIF_TYPE_NONE,
+ SND_ST_UNIPERIF_TYPE_HDMI,
+ SND_ST_UNIPERIF_TYPE_PCM,
+ SND_ST_UNIPERIF_TYPE_SPDIF
};
enum uniperif_state {
@@ -1259,7 +1268,7 @@ enum uniperif_iec958_encoding_mode {
struct uniperif_info {
int id; /* instance value of the uniperipheral IP */
- enum uniperif_type player_type;
+ enum uniperif_type type;
int underflow_enabled; /* Underflow recovery mode */
};