* [PATCH 1/3] ASoC: Add signal generator widget type
@ 2011-11-30 20:57 Mark Brown
2011-11-30 20:57 ` [PATCH 2/3] ASoC: Make WM5100 tone generator widgets signal generators Mark Brown
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Mark Brown @ 2011-11-30 20:57 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown
A signal generator behaves as an input would but is not considered for
any of the special behaviour associated with external input pins. This
is especially useful when automatically working out not connected widgets.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
include/sound/soc-dapm.h | 4 ++++
sound/soc/soc-dapm.c | 7 +++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 0c159a7..d26a9b7 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -43,6 +43,9 @@
.num_kcontrols = 0}
/* platform domain */
+#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_INPUT(wname) \
{ .id = snd_soc_dapm_input, .name = wname, .kcontrol_news = NULL, \
.num_kcontrols = 0, .reg = SND_SOC_NOPM }
@@ -410,6 +413,7 @@ enum snd_soc_dapm_type {
snd_soc_dapm_supply, /* power/clock supply */
snd_soc_dapm_aif_in, /* audio interface input */
snd_soc_dapm_aif_out, /* audio interface output */
+ snd_soc_dapm_siggen, /* signal generator */
};
/*
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index da5c1ae..6bb327e 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -339,6 +339,7 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w,
case snd_soc_dapm_output:
case snd_soc_dapm_adc:
case snd_soc_dapm_input:
+ case snd_soc_dapm_siggen:
case snd_soc_dapm_dac:
case snd_soc_dapm_micbias:
case snd_soc_dapm_vmid:
@@ -772,6 +773,11 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget)
return widget->inputs;
}
+ /* signal generator */
+ if (widget->id == snd_soc_dapm_siggen) {
+ widget->inputs = snd_soc_dapm_suspend_check(widget);
+ return widget->inputs;
+ }
}
list_for_each_entry(path, &widget->sources, list_sink) {
@@ -1982,6 +1988,7 @@ static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm,
case snd_soc_dapm_out_drv:
case snd_soc_dapm_input:
case snd_soc_dapm_output:
+ case snd_soc_dapm_siggen:
case snd_soc_dapm_micbias:
case snd_soc_dapm_vmid:
case snd_soc_dapm_pre:
--
1.7.7.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] ASoC: Make WM5100 tone generator widgets signal generators
2011-11-30 20:57 [PATCH 1/3] ASoC: Add signal generator widget type Mark Brown
@ 2011-11-30 20:57 ` Mark Brown
2011-11-30 20:57 ` [PATCH 3/3] ASoC: Make WM8962 beep a signal generator Mark Brown
2011-12-01 15:27 ` [PATCH 1/3] ASoC: Add signal generator widget type Liam Girdwood
2 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2011-11-30 20:57 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
sound/soc/codecs/wm5100.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index 8be5dae..a234b70 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -952,7 +952,7 @@ SND_SOC_DAPM_INPUT("IN3L"),
SND_SOC_DAPM_INPUT("IN3R"),
SND_SOC_DAPM_INPUT("IN4L"),
SND_SOC_DAPM_INPUT("IN4R"),
-SND_SOC_DAPM_INPUT("TONE"),
+SND_SOC_DAPM_SIGGEN("TONE"),
SND_SOC_DAPM_PGA_E("IN1L PGA", WM5100_INPUT_ENABLES, WM5100_IN1L_ENA_SHIFT, 0,
NULL, 0, wm5100_out_ev, SND_SOC_DAPM_POST_PMU),
--
1.7.7.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] ASoC: Make WM8962 beep a signal generator
2011-11-30 20:57 [PATCH 1/3] ASoC: Add signal generator widget type Mark Brown
2011-11-30 20:57 ` [PATCH 2/3] ASoC: Make WM5100 tone generator widgets signal generators Mark Brown
@ 2011-11-30 20:57 ` Mark Brown
2011-12-01 15:27 ` [PATCH 1/3] ASoC: Add signal generator widget type Liam Girdwood
2 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2011-11-30 20:57 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
sound/soc/codecs/wm8962.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 8810988..be35b64 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -2675,7 +2675,7 @@ SND_SOC_DAPM_INPUT("IN3L"),
SND_SOC_DAPM_INPUT("IN3R"),
SND_SOC_DAPM_INPUT("IN4L"),
SND_SOC_DAPM_INPUT("IN4R"),
-SND_SOC_DAPM_INPUT("Beep"),
+SND_SOC_DAPM_SIGGEN("Beep"),
SND_SOC_DAPM_INPUT("DMICDAT"),
SND_SOC_DAPM_SUPPLY("MICBIAS", WM8962_PWR_MGMT_1, 1, 0, NULL, 0),
--
1.7.7.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] ASoC: Add signal generator widget type
2011-11-30 20:57 [PATCH 1/3] ASoC: Add signal generator widget type Mark Brown
2011-11-30 20:57 ` [PATCH 2/3] ASoC: Make WM5100 tone generator widgets signal generators Mark Brown
2011-11-30 20:57 ` [PATCH 3/3] ASoC: Make WM8962 beep a signal generator Mark Brown
@ 2011-12-01 15:27 ` Liam Girdwood
2011-12-01 15:30 ` Mark Brown
2 siblings, 1 reply; 7+ messages in thread
From: Liam Girdwood @ 2011-12-01 15:27 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, patches
On Wed, 2011-11-30 at 20:57 +0000, Mark Brown wrote:
> A signal generator behaves as an input would but is not considered for
> any of the special behaviour associated with external input pins. This
> is especially useful when automatically working out not connected widgets.
>
Would this not be an output type ?
Regards
Liam
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] ASoC: Add signal generator widget type
2011-12-01 15:27 ` [PATCH 1/3] ASoC: Add signal generator widget type Liam Girdwood
@ 2011-12-01 15:30 ` Mark Brown
2011-12-01 15:55 ` Liam Girdwood
0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2011-12-01 15:30 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel, patches
On Thu, Dec 01, 2011 at 03:27:00PM +0000, Liam Girdwood wrote:
> On Wed, 2011-11-30 at 20:57 +0000, Mark Brown wrote:
> > A signal generator behaves as an input would but is not considered for
> > any of the special behaviour associated with external input pins. This
> > is especially useful when automatically working out not connected widgets.
> Would this not be an output type ?
It's a signal source - in terms of the DAPM graph and figuring out a
route from an input to an output it's an input.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] ASoC: Add signal generator widget type
2011-12-01 15:30 ` Mark Brown
@ 2011-12-01 15:55 ` Liam Girdwood
2011-12-01 15:59 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: Liam Girdwood @ 2011-12-01 15:55 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, patches
On Thu, 2011-12-01 at 15:30 +0000, Mark Brown wrote:
> On Thu, Dec 01, 2011 at 03:27:00PM +0000, Liam Girdwood wrote:
> > On Wed, 2011-11-30 at 20:57 +0000, Mark Brown wrote:
> > > A signal generator behaves as an input would but is not considered for
> > > any of the special behaviour associated with external input pins. This
> > > is especially useful when automatically working out not connected widgets.
>
> > Would this not be an output type ?
>
> It's a signal source - in terms of the DAPM graph and figuring out a
> route from an input to an output it's an input.
Ah, OK - I'm thinking here of an internal signal generator (i.e. coming
from within platform/codec). e.g. we could add a simple sine wave
generator to OMAP4 ABE for test/debug purposes.
Regards
Liam
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] ASoC: Add signal generator widget type
2011-12-01 15:55 ` Liam Girdwood
@ 2011-12-01 15:59 ` Mark Brown
0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2011-12-01 15:59 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel, patches
On Thu, Dec 01, 2011 at 03:55:14PM +0000, Liam Girdwood wrote:
> On Thu, 2011-12-01 at 15:30 +0000, Mark Brown wrote:
> > It's a signal source - in terms of the DAPM graph and figuring out a
> > route from an input to an output it's an input.
> Ah, OK - I'm thinking here of an internal signal generator (i.e. coming
> from within platform/codec). e.g. we could add a simple sine wave
> generator to OMAP4 ABE for test/debug purposes.
Yeah, that's exactly the sort of thing that this is for in the first
instance (though in the WM8962 case it's a bit more fully featured than
that). If they are output widgets DAPM looks for something to input
data to them, can't find one and does the wrong thing.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-12-01 16:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-30 20:57 [PATCH 1/3] ASoC: Add signal generator widget type Mark Brown
2011-11-30 20:57 ` [PATCH 2/3] ASoC: Make WM5100 tone generator widgets signal generators Mark Brown
2011-11-30 20:57 ` [PATCH 3/3] ASoC: Make WM8962 beep a signal generator Mark Brown
2011-12-01 15:27 ` [PATCH 1/3] ASoC: Add signal generator widget type Liam Girdwood
2011-12-01 15:30 ` Mark Brown
2011-12-01 15:55 ` Liam Girdwood
2011-12-01 15:59 ` 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.