alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Moise Gergaud <moise.gergaud@st.com>
To: arnaud.pouliquen@st.com, alsa-devel@alsa-project.org,
	broonie@kernel.org, lgirdwood@gmail.com, tiwai@suse.de
Subject: [PATCH v2 3/7] ASoC: sti: define tdm type & default tdm hw config
Date: Thu, 7 Apr 2016 11:25:32 +0200	[thread overview]
Message-ID: <1460021136-27822-4-git-send-email-moise.gergaud@st.com> (raw)
In-Reply-To: <1460021136-27822-1-git-send-email-moise.gergaud@st.com>

Signed-off-by: Moise Gergaud <moise.gergaud@st.com>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
---
 sound/soc/sti/uniperif.h | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sti/uniperif.h b/sound/soc/sti/uniperif.h
index 75116ab..750eb5a 100644
--- a/sound/soc/sti/uniperif.h
+++ b/sound/soc/sti/uniperif.h
@@ -1228,6 +1228,9 @@
 #define UNIPERIF_TYPE_IS_IEC958(p) \
 	(UNIPERIF_TYPE_IS_HDMI(p) || \
 		UNIPERIF_TYPE_IS_SPDIF(p))
+#define UNIPERIF_TYPE_IS_TDM(p) \
+	((p)->info->type == SND_ST_UNIPERIF_TYPE_TDM)
+
 /*
  * Uniperipheral IP revisions
  */
@@ -1249,7 +1252,8 @@ enum uniperif_type {
 	SND_ST_UNIPERIF_TYPE_NONE,
 	SND_ST_UNIPERIF_TYPE_HDMI,
 	SND_ST_UNIPERIF_TYPE_PCM,
-	SND_ST_UNIPERIF_TYPE_SPDIF
+	SND_ST_UNIPERIF_TYPE_SPDIF,
+	SND_ST_UNIPERIF_TYPE_TDM
 };
 
 enum uniperif_state {
@@ -1330,6 +1334,28 @@ struct sti_uniperiph_data {
 	struct sti_uniperiph_dai dai_data;
 };
 
+static const struct snd_pcm_hardware uni_tdm_hw = {
+	.info = SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
+		SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP |
+		SNDRV_PCM_INFO_MMAP_VALID,
+
+	.formats = SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S16_LE,
+
+	.rates = SNDRV_PCM_RATE_CONTINUOUS,
+	.rate_min = 8000,
+	.rate_max = 48000,
+
+	.channels_min = 1,
+	.channels_max = 32,
+
+	.periods_min = 2,
+	.periods_max = 10,
+
+	.period_bytes_min = 128,
+	.period_bytes_max = 64 * PAGE_SIZE,
+	.buffer_bytes_max = 256 * PAGE_SIZE
+};
+
 /* uniperiph player*/
 int uni_player_init(struct platform_device *pdev,
 		    struct uniperif *uni_player);
-- 
1.9.1

  parent reply	other threads:[~2016-04-07  9:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07  9:25 [PATCH v2 0/7] ASoC: sti: unip tdm mode Moise Gergaud
2016-04-07  9:25 ` [PATCH v2 1/7] ASoC: sti: macro for uniperif tdm regs access Moise Gergaud
2016-04-12  2:01   ` Applied "ASoC: sti: macro for uniperif tdm regs access" to the asoc tree Mark Brown
2016-04-07  9:25 ` [PATCH v2 2/7] ASoC: sti: rename unip player type into common player & reader type Moise Gergaud
2016-04-12  2:01   ` Applied "ASoC: sti: rename unip player type into common player & reader type" to the asoc tree Mark Brown
2016-04-07  9:25 ` Moise Gergaud [this message]
2016-04-12  2:00   ` Applied "ASoC: sti: define tdm type & default tdm hw config" " Mark Brown
2016-04-07  9:25 ` [PATCH v2 4/7] ASoC: sti: helper functions for unip tdm slots configuration Moise Gergaud
2016-04-12  6:31   ` Applied "ASoC: sti: helper functions for unip tdm slots configuration" to the asoc tree Mark Brown
2016-04-07  9:25 ` [PATCH v2 5/7] ASoC: sti: helper functions to fix tdm runtime params Moise Gergaud
2016-04-12  6:31   ` Applied "ASoC: sti: helper functions to fix tdm runtime params" to the asoc tree Mark Brown
2016-04-07  9:25 ` [PATCH v2 6/7] ASoC: sti: unip player tdm mode Moise Gergaud
2016-04-12  6:31   ` Applied "ASoC: sti: unip player tdm mode" to the asoc tree Mark Brown
2016-04-07  9:25 ` [PATCH v2 7/7] ASoC: sti: unip reader tdm mode Moise Gergaud
2016-04-12  6:30   ` Applied "ASoC: sti: unip reader tdm mode" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460021136-27822-4-git-send-email-moise.gergaud@st.com \
    --to=moise.gergaud@st.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnaud.pouliquen@st.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).