From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
Nicolin Chen <b42378@freescale.com>, Timur Tabi <timur@tabi.org>,
Markus Pargmann <mpa@pengutronix.de>,
Shawn Guo <shawn.guo@linaro.org>
Subject: [PATCH 06/19] ASoC: fsl: Don't set unused struct snd_pcm_hardware fields
Date: Fri, 20 Dec 2013 14:20:12 +0100 [thread overview]
Message-ID: <1387545625-19240-6-git-send-email-lars@metafoo.de> (raw)
In-Reply-To: <1387545625-19240-1-git-send-email-lars@metafoo.de>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Timur Tabi <timur@tabi.org>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Nicolin Chen <b42378@freescale.com>
Cc: Markus Pargmann <mpa@pengutronix.de>
---
sound/soc/fsl/fsl_dma.c | 26 --------------------------
sound/soc/fsl/imx-pcm-dma.c | 4 ----
sound/soc/fsl/imx-pcm-fiq.c | 4 ----
sound/soc/fsl/mpc5200_dma.c | 6 ------
4 files changed, 40 deletions(-)
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index d570f8c..2326831 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -37,28 +37,6 @@
#include "fsl_dma.h"
#include "fsl_ssi.h" /* For the offset of stx0 and srx0 */
-/*
- * The formats that the DMA controller supports, which is anything
- * that is 8, 16, or 32 bits.
- */
-#define FSLDMA_PCM_FORMATS (SNDRV_PCM_FMTBIT_S8 | \
- SNDRV_PCM_FMTBIT_U8 | \
- SNDRV_PCM_FMTBIT_S16_LE | \
- SNDRV_PCM_FMTBIT_S16_BE | \
- SNDRV_PCM_FMTBIT_U16_LE | \
- SNDRV_PCM_FMTBIT_U16_BE | \
- SNDRV_PCM_FMTBIT_S24_LE | \
- SNDRV_PCM_FMTBIT_S24_BE | \
- SNDRV_PCM_FMTBIT_U24_LE | \
- SNDRV_PCM_FMTBIT_U24_BE | \
- SNDRV_PCM_FMTBIT_S32_LE | \
- SNDRV_PCM_FMTBIT_S32_BE | \
- SNDRV_PCM_FMTBIT_U32_LE | \
- SNDRV_PCM_FMTBIT_U32_BE)
-
-#define FSLDMA_PCM_RATES (SNDRV_PCM_RATE_5512 | SNDRV_PCM_RATE_8000_192000 | \
- SNDRV_PCM_RATE_CONTINUOUS)
-
struct dma_object {
struct snd_soc_platform_driver dai;
dma_addr_t ssi_stx_phys;
@@ -139,10 +117,6 @@ static const struct snd_pcm_hardware fsl_dma_hardware = {
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_JOINT_DUPLEX |
SNDRV_PCM_INFO_PAUSE,
- .formats = FSLDMA_PCM_FORMATS,
- .rates = FSLDMA_PCM_RATES,
- .rate_min = 5512,
- .rate_max = 192000,
.period_bytes_min = 512, /* A reasonable limit */
.period_bytes_max = (u32) -1,
.periods_min = NUM_DMA_LINKS,
diff --git a/sound/soc/fsl/imx-pcm-dma.c b/sound/soc/fsl/imx-pcm-dma.c
index c5e47f8..0849b7b 100644
--- a/sound/soc/fsl/imx-pcm-dma.c
+++ b/sound/soc/fsl/imx-pcm-dma.c
@@ -40,10 +40,6 @@ static const struct snd_pcm_hardware imx_pcm_hardware = {
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_PAUSE |
SNDRV_PCM_INFO_RESUME,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,
- .rate_min = 8000,
- .channels_min = 2,
- .channels_max = 2,
.buffer_bytes_max = IMX_SSI_DMABUF_SIZE,
.period_bytes_min = 128,
.period_bytes_max = 65535, /* Limited by SDMA engine */
diff --git a/sound/soc/fsl/imx-pcm-fiq.c b/sound/soc/fsl/imx-pcm-fiq.c
index c75d43b..0d668bd 100644
--- a/sound/soc/fsl/imx-pcm-fiq.c
+++ b/sound/soc/fsl/imx-pcm-fiq.c
@@ -161,10 +161,6 @@ static struct snd_pcm_hardware snd_imx_hardware = {
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_PAUSE |
SNDRV_PCM_INFO_RESUME,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,
- .rate_min = 8000,
- .channels_min = 2,
- .channels_max = 2,
.buffer_bytes_max = IMX_SSI_DMABUF_SIZE,
.period_bytes_min = 128,
.period_bytes_max = 16 * 1024,
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c
index 71bf2f2..30d52e7 100644
--- a/sound/soc/fsl/mpc5200_dma.c
+++ b/sound/soc/fsl/mpc5200_dma.c
@@ -198,12 +198,6 @@ static const struct snd_pcm_hardware psc_dma_hardware = {
.info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_BATCH,
- .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_BE |
- SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S32_BE,
- .rate_min = 8000,
- .rate_max = 48000,
- .channels_min = 1,
- .channels_max = 2,
.period_bytes_max = 1024 * 1024,
.period_bytes_min = 32,
.periods_min = 2,
--
1.8.0
next prev parent reply other threads:[~2013-12-20 14:19 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 13:20 [PATCH 01/19] ASoC: atmel: Don't set unused struct snd_pcm_hardware fields Lars-Peter Clausen
2013-12-20 13:20 ` [PATCH 02/19] ASoC: au1x: " Lars-Peter Clausen
2013-12-20 15:24 ` Manuel Lauss
2013-12-21 14:24 ` Mark Brown
2013-12-20 13:20 ` [PATCH 03/19] ASoC: blackfin: " Lars-Peter Clausen
2013-12-24 11:54 ` Mark Brown
2013-12-20 13:20 ` [PATCH 04/19] ASoC: davinci: " Lars-Peter Clausen
2013-12-23 7:04 ` Peter Ujfalusi
2013-12-24 12:01 ` Mark Brown
2013-12-20 13:20 ` [PATCH 05/19] ASoC: ep93xx: " Lars-Peter Clausen
2013-12-30 13:59 ` Mark Brown
2013-12-20 13:20 ` Lars-Peter Clausen [this message]
2013-12-20 14:25 ` [PATCH 06/19] ASoC: fsl: " Timur Tabi
2013-12-20 14:04 ` Lars-Peter Clausen
2013-12-20 18:27 ` Mark Brown
2013-12-20 18:16 ` Lars-Peter Clausen
2013-12-20 13:20 ` [PATCH 07/19] ASoC: intel: " Lars-Peter Clausen
2013-12-20 13:20 ` [PATCH 08/19] ASoC: kirkwood: " Lars-Peter Clausen
2013-12-20 18:05 ` Jean-Francois Moine
2013-12-20 17:18 ` Lars-Peter Clausen
2013-12-20 19:13 ` Jean-Francois Moine
2013-12-20 18:29 ` Lars-Peter Clausen
2013-12-20 13:20 ` [PATCH 09/19] ASoC: mxs: " Lars-Peter Clausen
2013-12-20 13:20 ` [PATCH 10/19] ASoC: nuc900: " Lars-Peter Clausen
2013-12-20 13:20 ` [PATCH 11/19] ASoC: omap: " Lars-Peter Clausen
2013-12-22 17:19 ` Jarkko Nikula
2013-12-23 7:04 ` Peter Ujfalusi
2013-12-24 12:04 ` Mark Brown
2013-12-20 13:20 ` [PATCH 12/19] ASoC: mmp: " Lars-Peter Clausen
2013-12-30 13:59 ` Mark Brown
2013-12-20 13:20 ` [PATCH 13/19] ASoC: s6000: " Lars-Peter Clausen
2013-12-22 22:21 ` Daniel Glöckner
2013-12-24 12:02 ` Mark Brown
2013-12-20 13:20 ` [PATCH 14/19] ASoC: samsung: " Lars-Peter Clausen
2013-12-30 13:57 ` Mark Brown
2013-12-20 13:20 ` [PATCH 15/19] ASoC: sh: " Lars-Peter Clausen
2013-12-20 13:20 ` [PATCH 16/19] ASoC: tegra: " Lars-Peter Clausen
2013-12-20 17:43 ` Stephen Warren
2013-12-21 14:27 ` Mark Brown
2013-12-20 13:20 ` [PATCH 17/19] ASoC: txx9: " Lars-Peter Clausen
2013-12-30 13:58 ` Mark Brown
2013-12-20 13:20 ` [PATCH 18/19] ASoC: ux500: " Lars-Peter Clausen
2013-12-20 13:20 ` [PATCH 19/19] ASoC: soc-utils: " Lars-Peter Clausen
2013-12-30 13:56 ` Mark Brown
2014-01-04 18:15 ` [PATCH 01/19] ASoC: atmel: " Lars-Peter Clausen
2014-01-06 3:01 ` Bo Shen
2014-01-06 16:45 ` 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=1387545625-19240-6-git-send-email-lars@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=b42378@freescale.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=mpa@pengutronix.de \
--cc=shawn.guo@linaro.org \
--cc=timur@tabi.org \
/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).