summaryrefslogtreecommitdiff
path: root/include/sound/simple_card_utils.h
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2017-06-15 03:24:09 +0300
committerMark Brown <broonie@kernel.org>2017-06-15 20:14:43 +0300
commit13bb1cc0ad205b2aeeb8d2ea5c790a396135283d (patch)
tree711d88cb5bb5ff5b80651a5c88748537ae3eac93 /include/sound/simple_card_utils.h
parent616c3b15f596e1f1e6c2537a1ad3492052eecba6 (diff)
downloadlinux-13bb1cc0ad205b2aeeb8d2ea5c790a396135283d.tar.xz
ASoC: simple-card-utils: add asoc_simple_card_convert_fixup()
Current simple/audio scu card drivers are supporting same convert-rate/convert-channels on DT, but doesn't use same function for it. Encapsulation is one of simple card util's purpose. Let's add asoc_simple_card_parse_convert/asoc_simple_card_convert_fixup Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/simple_card_utils.h')
-rw-r--r--include/sound/simple_card_utils.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h
index 2679312228b3..cc318ccd6a2d 100644
--- a/include/sound/simple_card_utils.h
+++ b/include/sound/simple_card_utils.h
@@ -22,6 +22,11 @@ struct asoc_simple_dai {
struct clk *clk;
};
+struct asoc_simple_card_data {
+ u32 convert_rate;
+ u32 convert_channels;
+};
+
int asoc_simple_card_parse_daifmt(struct device *dev,
struct device_node *node,
struct device_node *codec,
@@ -90,4 +95,9 @@ void asoc_simple_card_canonicalize_cpu(struct snd_soc_dai_link *dai_link,
int asoc_simple_card_clean_reference(struct snd_soc_card *card);
+void asoc_simple_card_convert_fixup(struct asoc_simple_card_data *data,
+ struct snd_pcm_hw_params *params);
+void asoc_simple_card_parse_convert(struct device *dev, char *prefix,
+ struct asoc_simple_card_data *data);
+
#endif /* __SIMPLE_CARD_UTILS_H */