summaryrefslogtreecommitdiff
path: root/include/sound/soc.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-04 22:12:09 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-16 19:36:29 +0100
commitc74184ed30ecce2a5e9ae9aa22cb5e3942e0c7c7 (patch)
tree6d0043cf3b0b7734b8b98dd0d632309d94969c47 /include/sound/soc.h
parent054880febeb890b24d705240384856ea6b3ccf7b (diff)
ASoC: core: Support transparent CODEC<->CODEC DAI links
Rather than having the user half start a stream but avoid any DMA to trigger data flow on links which don't pass through the CPU create a DAPM route between the two DAI widgets using a hw_params configuration provided by the machine driver with the new 'params' member of the dai_link struct. If no configuration is provided in the dai_link then use the old style even for CODEC<->CODEC links to avoid breaking systems. This greatly simplifies the userspace usage of such links, making them as simple as analogue connections with the stream configuration being completely transparent to them. This is achieved by defining a new dai_link widget type which is created when CODECs are linked and triggering the configuration of the link via the normal PCM operations from there. It is expected that the bias level callbacks will be used for clock configuration. Currently only the DAI format, rate and channel count can be configured and currently the only DAI operations which can be called are hw_params and digital_mute(). This corresponds well to the majority of CODEC drivers which only use other callbacks for constraint setting but there is obviously much room for extension here. We can't simply call hw_params() on startup as things like the system clocking configuration may change at runtime and in future it will be desirable to offer some configurability of the link parameters. At present we are also restricted to a single DAPM link for the entire DAI. Once we have better support for channel mapping it would also be desirable to extend this feature so that we can propagate per-channel power state over the link. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index acb57b834e58..afc3204d389b 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -761,6 +761,8 @@ struct snd_soc_dai_link {
const struct device_node *cpu_dai_of_node;
const char *codec_dai_name;
+ const struct snd_soc_pcm_stream *params;
+
unsigned int dai_fmt; /* format to set on init */
/* Keep DAI active over suspend */