From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: liam.r.girdwood@linux.intel.com, patches.audio@intel.com,
broonie@kernel.org, Vinod Koul <vinod.koul@intel.com>
Subject: [PATCH 2/3] ASoC: core: add a dapm sink widget
Date: Mon, 23 Nov 2015 21:22:30 +0530 [thread overview]
Message-ID: <1448293951-32071-3-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1448293951-32071-1-git-send-email-vinod.koul@intel.com>
DAPM models various widgets but lacks a sink widget.
DSPs can have modules which take audio data, process it and are
capable of generating events thus acting as a sink of data.
To make the dapm graph complete for such paths we need a dapm
sink widget for these modules, so add a SND_SOC_DAPM_SINK to
declare such a widget.
This widget will be treated as SND_SOC_DAPM_EP_SINK endpoint in
the dapm graph
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
include/sound/soc-dapm.h | 4 ++++
sound/soc/soc-dapm.c | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 7855cfe46b69..fe19dd3abb00 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -49,6 +49,9 @@ struct device;
#define SND_SOC_DAPM_SIGGEN(wname) \
{ .id = snd_soc_dapm_siggen, .name = wname, .kcontrol_news = NULL, \
.num_kcontrols = 0, .reg = SND_SOC_NOPM }
+#define SND_SOC_DAPM_SINK(wname) \
+{ .id = snd_soc_dapm_sink, .name = wname, .kcontrol_news = NULL, \
+ .num_kcontrols = 0, .reg = SND_SOC_NOPM }
#define SND_SOC_DAPM_INPUT(wname) \
{ .id = snd_soc_dapm_input, .name = wname, .kcontrol_news = NULL, \
.num_kcontrols = 0, .reg = SND_SOC_NOPM }
@@ -484,6 +487,7 @@ enum snd_soc_dapm_type {
snd_soc_dapm_aif_in, /* audio interface input */
snd_soc_dapm_aif_out, /* audio interface output */
snd_soc_dapm_siggen, /* signal generator */
+ snd_soc_dapm_sink,
snd_soc_dapm_dai_in, /* link to DAI structure */
snd_soc_dapm_dai_out,
snd_soc_dapm_dai_link, /* link between two DAI structures */
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 3eba72c6f9dd..506677b12787 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3351,6 +3351,11 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
w->is_ep = SND_SOC_DAPM_EP_SOURCE;
w->power_check = dapm_always_on_check_power;
break;
+ case snd_soc_dapm_sink:
+ w->is_ep = SND_SOC_DAPM_EP_SINK;
+ w->power_check = dapm_always_on_check_power;
+ break;
+
case snd_soc_dapm_mux:
case snd_soc_dapm_demux:
case snd_soc_dapm_switch:
--
1.9.1
next prev parent reply other threads:[~2015-11-23 15:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-23 15:52 [PATCH 0/3] ASoC: core: dapm more updates Vinod Koul
2015-11-23 15:52 ` [PATCH 1/3] ASoC: core: mark SND_SOC_BYTES_EXT as deprecated Vinod Koul
2015-11-25 12:59 ` Applied "ASoC: core: mark SND_SOC_BYTES_EXT as deprecated" to the asoc tree Mark Brown
2015-11-23 15:52 ` Vinod Koul [this message]
2015-11-24 9:48 ` [PATCH 2/3] ASoC: core: add a dapm sink widget Lars-Peter Clausen
2015-11-24 10:19 ` Vinod Koul
2015-11-25 12:51 ` Mark Brown
2015-11-25 12:59 ` Applied "ASoC: dapm: add a dapm sink widget" to the asoc tree Mark Brown
2015-11-23 15:52 ` [PATCH 3/3] ASoC: core: Change power state before rechecking endpoint Vinod Koul
2015-11-23 16:06 ` Lars-Peter Clausen
2015-11-23 17:28 ` Vinod Koul
2015-11-23 18:13 ` Lars-Peter Clausen
2015-11-24 10:17 ` Vinod Koul
2015-11-25 13:00 ` Applied "ASoC: core: Change power state before rechecking endpoint" 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=1448293951-32071-3-git-send-email-vinod.koul@intel.com \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@linux.intel.com \
--cc=patches.audio@intel.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;
as well as URLs for NNTP newsgroup(s).