diff mbox

[01/13] ASoC: core: allow pcms to be registered as nonatomic

Message ID 1423715405-4562-2-git-send-email-vinod.koul@intel.com (mailing list archive)
State Accepted
Commit 48c7699fb2c799d084ce490bceea14fe04ad12a1
Headers show

Commit Message

Vinod Koul Feb. 12, 2015, 4:29 a.m. UTC
ALSA core with commit 257f8cce5d40 - "ALSA: pcm: Allow nonatomic trigger
operations" allows trigger ops to implemented as nonatomic. For ASoC, we can
specify this in dailinks and is updated while snd_pcm is created

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Cc: Takashi Iwai <tiwai@suse.de>
---
 include/sound/soc.h |    3 +++
 sound/soc/soc-pcm.c |    1 +
 2 files changed, 4 insertions(+)
diff mbox

Patch

diff --git a/include/sound/soc.h b/include/sound/soc.h
index b4fca9aed2a2..3ccab0b7349f 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -950,6 +950,9 @@  struct snd_soc_dai_link {
 	unsigned int symmetric_channels:1;
 	unsigned int symmetric_samplebits:1;
 
+	/* Mark this pcm with non atomic ops */
+	bool nonatomic;
+
 	/* Do not create a PCM for this DAI link (Backend link) */
 	unsigned int no_pcm:1;
 
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index eb87d96e2cf0..cef2ff5188d1 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2526,6 +2526,7 @@  int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
 	/* DAPM dai link stream work */
 	INIT_DELAYED_WORK(&rtd->delayed_work, close_delayed_work);
 
+	pcm->nonatomic = rtd->dai_link->nonatomic;
 	rtd->pcm = pcm;
 	pcm->private_data = rtd;