diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-16 19:37:51 -0800 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-17 08:10:10 -0800 |
commit | 888df395ebc5c88cde45478660197ca46665efe2 (patch) | |
tree | a0481614ac6ccfa246bf043fe953ab28f7c582e8 /include/sound/soc-dapm.h | |
parent | 3056557f3b2387d4ac99ca8af14956cd2bf003c2 (diff) | |
download | linux-3.10-888df395ebc5c88cde45478660197ca46665efe2.tar.gz linux-3.10-888df395ebc5c88cde45478660197ca46665efe2.tar.bz2 linux-3.10-888df395ebc5c88cde45478660197ca46665efe2.zip |
ASoC: dapm: Implement and instantiate DAI widgets
In order to allow us to do smarter things with DAI links create DAPM
widgets which directly represent the DAIs in the DAPM graph. These are
automatically created from the DAIs as we probe the card with references
held in both directions between the widget and the DAI.
The widgets are not made available for direct instantiation by drivers,
they are created automatically from the DAIs. Drivers should be updated
to create stream routes using DAPM maps rather than by annotating AIF
and DAC widgets with streams.
In order to ease transition to this model from existing drivers we
automatically create DAPM routes between the DAI widgets and the existing
stream widgets which are started and stopped by the DAI widgets, though
the old stream handling mechanism is still in place. This also has the
nice effect of removing non-DAPM devices as any device with a DAI
acquires a widget automatically which will allow future simplifications
to the core DAPM logic.
The intention is that in future the AIF and DAI widgets will gain the
ability to interact such that we are able to manage activity on
individual channels independantly rather than powering up and down the
entire AIF as we do currently.
Currently we only generate these for CODECs, mostly as I have no systems
with non-CODEC DAPM to integrate with. It should be a simple matter of
programming to add the additional hookup for these.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'include/sound/soc-dapm.h')
-rw-r--r-- | include/sound/soc-dapm.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 91eb8126c00..e46107fffeb 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -355,6 +355,9 @@ int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol, int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm, const struct snd_soc_dapm_widget *widget, int num); +int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm, + struct snd_soc_dai *dai); +int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card); /* dapm path setup */ int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm); @@ -425,6 +428,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_dai, /* link to DAI structure */ }; /* |