@@ -51,6 +51,10 @@ Optional dai-link subnode properties:
dai-link uses frame clock inversion.
- mclk-fs : Multiplication factor between stream
rate and codec mclk.
+- dynamic : This DAI link can route to other DAI links at runtime
+- no_pcm : Do not create a PCM for this DAI link
+- dpcm_capture : DPCM capture supported for this DAI link
+- dpcm_playback : DPCM playback supported for this DAI link
For backward compatibility the frame-master and bitclock-master
properties can be used as booleans in codec subnode to indicate if the
@@ -1374,6 +1374,12 @@ unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
const char *prefix,
struct device_node **bitclkmaster,
struct device_node **framemaster);
+void snd_soc_of_parse_dpcm(struct device_node *np,
+ struct snd_soc_dai_link *dai_link);
+void snd_soc_of_parse_dynamic(struct device_node *np,
+ struct snd_soc_dai_link *dai_link);
+void snd_soc_of_parse_no_pcm(struct device_node *np,
+ struct snd_soc_dai_link *dai_link);
int snd_soc_of_get_dai_name(struct device_node *of_node,
const char **dai_name);
@@ -188,6 +188,10 @@ static int simple_card_dai_link_of(struct device_node *node,
&bitclkmaster, &framemaster);
daifmt &= ~SND_SOC_DAIFMT_MASTER_MASK;
+ snd_soc_of_parse_dpcm(node, dai_link);
+ snd_soc_of_parse_dynamic(node, dai_link);
+ snd_soc_of_parse_no_pcm(node, dai_link);
+
/* Factor to mclk, used in hw_params() */
of_property_read_u32(node, "mclk-fs",
&dai_props->mclk_fs);
@@ -4745,6 +4745,28 @@ unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
}
EXPORT_SYMBOL_GPL(snd_soc_of_parse_daifmt);
+void snd_soc_of_parse_dpcm(struct device_node *np,
+ struct snd_soc_dai_link *dai_link)
+{
+ dai_link->dpcm_playback = of_property_read_bool(np, "dpcm_playback");
+ dai_link->dpcm_capture = of_property_read_bool(np, "dpcm_capture");
+}
+EXPORT_SYMBOL_GPL(snd_soc_of_parse_dpcm);
+
+void snd_soc_of_parse_dynamic(struct device_node *np,
+ struct snd_soc_dai_link *dai_link)
+{
+ dai_link->dynamic = of_property_read_bool(np, "dynamic");
+}
+EXPORT_SYMBOL_GPL(snd_soc_of_parse_dynamic);
+
+void snd_soc_of_parse_no_pcm(struct device_node *np,
+ struct snd_soc_dai_link *dai_link)
+{
+ dai_link->no_pcm = of_property_read_bool(np, "no_pcm");
+}
+EXPORT_SYMBOL_GPL(snd_soc_of_parse_no_pcm);
+
int snd_soc_of_get_dai_name(struct device_node *of_node,
const char **dai_name)
{
In order to describe DPCM links in DT, we need some additional properties. Is the DAI dynamic, i.e. a front end? Should no PCM be created for the DAI? Can it be used for DPCM playback and capture? Add parsing of these properties to the core and make use of them in simple card. Signed-off-by: Andrew Lunn <andrew@lunn.ch> --- .../devicetree/bindings/sound/simple-card.txt | 4 ++++ include/sound/soc.h | 6 ++++++ sound/soc/generic/simple-card.c | 4 ++++ sound/soc/soc-core.c | 22 ++++++++++++++++++++++ 4 files changed, 36 insertions(+)