All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASOC: utils: Fix the dummy_codec
@ 2012-06-06  8:02 Selma Bensaid
  2012-06-07  8:35 ` Vinod Koul
  0 siblings, 1 reply; 9+ messages in thread
From: Selma Bensaid @ 2012-06-06  8:02 UTC (permalink / raw)
  To: alsa-devel
  Cc: vinod.koul, sylvain.centelles, broonie, louis.le.gall,
	Selma Bensaid, lrg

This patch consists in settings the channels_min, rates and formats
of the dummy codec DAI driver to enable the creation of the PCM streams
using it.

Signed-off-by: Selma Bensaid <selma.bensaid@intel.com>
---
 sound/soc/soc-utils.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c
index 6005370..465a094 100644
--- a/sound/soc/soc-utils.c
+++ b/sound/soc/soc-utils.c
@@ -89,9 +89,27 @@ static struct snd_soc_platform_driver dummy_platform = {
 	.ops = &dummy_dma_ops,
 };
 
+#define NULL_FORMATS \
+	(SNDRV_PCM_FMTBIT_S16 | SNDRV_PCM_FMTBIT_U16 |\
+	SNDRV_PCM_FMTBIT_S24 | SNDRV_PCM_FMTBIT_U24 |\
+	SNDRV_PCM_FMTBIT_S32 | SNDRV_PCM_FMTBIT_U32)
+
 static struct snd_soc_codec_driver dummy_codec;
 static struct snd_soc_dai_driver dummy_dai = {
 	.name = "snd-soc-dummy-dai",
+	.playback = {
+		.channels_min = 1,
+		.channels_max = 16,
+		.rates = SNDRV_PCM_RATE_CONTINUOUS,
+		.formats = NULL_FORMATS,
+	},
+	.capture = {
+		.channels_min = 1,
+		.channels_max = 16,
+		.rates = SNDRV_PCM_RATE_CONTINUOUS,
+		.formats = NULL_FORMATS,
+	},
+	.ops = NULL,
 };
 
 static __devinit int snd_soc_dummy_probe(struct platform_device *pdev)
-- 
1.7.0.4

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-06-11  9:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-06  8:02 [PATCH] ASOC: utils: Fix the dummy_codec Selma Bensaid
2012-06-07  8:35 ` Vinod Koul
2012-06-07 10:08   ` [PATCH] ASOC: utils: Update dummy codec DAI settings to allow stream creation Selma Bensaid
2012-06-07 21:30     ` Mark Brown
2012-06-08  8:02       ` Selma Bensaid
2012-06-08 14:26         ` Selma Bensaid
2012-06-11  3:13         ` Mark Brown
2012-06-11  7:39           ` Selma Bensaid
2012-06-11  9:33             ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.