From: Joonyoung Shim <jy0922.shim@samsung.com>
To: alsa-devel@alsa-project.org
Cc: kyungmin.park@samsung.com, broonie@opensource.wolfsonmicro.com,
peter.ujfalusi@nokia.com, bhmin@samsung.com
Subject: [PATCH] ASoC: OMAP: Add checking to detect bufferless pcms
Date: Wed, 22 Apr 2009 10:56:50 +0900 [thread overview]
Message-ID: <49EE7962.6080008@samsung.com> (raw)
Add checking in hw_params and prepare to detect bufferless pcms(i.e. BT
<--> codec).
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
---
sound/soc/omap/omap-pcm.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 07cf7f4..6454e15 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -87,8 +87,10 @@ static int omap_pcm_hw_params(struct snd_pcm_substream *substream,
struct omap_pcm_dma_data *dma_data = rtd->dai->cpu_dai->dma_data;
int err = 0;
+ /* return if this is a bufferless transfer e.g.
+ * codec <--> BT codec or GSM modem -- lg FIXME */
if (!dma_data)
- return -ENODEV;
+ return 0;
snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);
runtime->dma_bytes = params_buffer_bytes(params);
@@ -134,6 +136,11 @@ static int omap_pcm_prepare(struct snd_pcm_substream *substream)
struct omap_pcm_dma_data *dma_data = prtd->dma_data;
struct omap_dma_channel_params dma_params;
+ /* return if this is a bufferless transfer e.g.
+ * codec <--> BT codec or GSM modem -- lg FIXME */
+ if (!prtd->dma_data)
+ return 0;
+
memset(&dma_params, 0, sizeof(dma_params));
/*
* Note: Regardless of interface data formats supported by OMAP McBSP
--
1.5.6.3
next reply other threads:[~2009-04-22 1:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-22 1:56 Joonyoung Shim [this message]
2009-04-22 8:30 ` [PATCH] ASoC: OMAP: Add checking to detect bufferless pcms Jarkko Nikula
2009-04-22 8:43 ` Mark Brown
2009-04-22 9:01 ` Jarkko Nikula
2009-04-22 9:26 ` Mark Brown
2009-04-22 9:42 ` Peter Ujfalusi
2009-04-22 9:48 ` Joonyoung Shim
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=49EE7962.6080008@samsung.com \
--to=jy0922.shim@samsung.com \
--cc=alsa-devel@alsa-project.org \
--cc=bhmin@samsung.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=kyungmin.park@samsung.com \
--cc=peter.ujfalusi@nokia.com \
/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