aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-03-07 15:58:11 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-03-08 13:56:16 -0500
commitec4ee52a8f5fb5b8e235ae9f02589d60d54740cc (patch)
tree329a7b4031c899b67f86a28b1ae77f295f3bfbec /include/sound
parentb993f92b99288d4b3a1a1237f3e40fa6460e4b47 (diff)
ASoC: Provide CODEC clocking operations and API calls
When multi component systems use DAIless amplifiers which require clocking configuration it is at best hard to use the current clocking API as this requires a DAI even though the device may not even have one. Address this by adding set_sysclk() and set_pll() operations and APIs for CODECs. In order to avoid issues with devices which could be used either with or without DAIs make the DAI variants call through to their CODEC counterparts if there is no DAI specific operation. Converting over entirely would create problems for multi-DAI devices which offer per-DAI clocking setup. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 6f197589b6d7..14f601f3e189 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -259,6 +259,11 @@ enum snd_soc_compress_type {
259 SND_SOC_RBTREE_COMPRESSION 259 SND_SOC_RBTREE_COMPRESSION
260}; 260};
261 261
262int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id,
263 unsigned int freq, int dir);
264int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
265 unsigned int freq_in, unsigned int freq_out);
266
262int snd_soc_register_card(struct snd_soc_card *card); 267int snd_soc_register_card(struct snd_soc_card *card);
263int snd_soc_unregister_card(struct snd_soc_card *card); 268int snd_soc_unregister_card(struct snd_soc_card *card);
264int snd_soc_suspend(struct device *dev); 269int snd_soc_suspend(struct device *dev);
@@ -568,6 +573,12 @@ struct snd_soc_codec_driver {
568 const struct snd_soc_dapm_route *dapm_routes; 573 const struct snd_soc_dapm_route *dapm_routes;
569 int num_dapm_routes; 574 int num_dapm_routes;
570 575
576 /* codec wide operations */
577 int (*set_sysclk)(struct snd_soc_codec *codec,
578 int clk_id, unsigned int freq, int dir);
579 int (*set_pll)(struct snd_soc_codec *codec, int pll_id, int source,
580 unsigned int freq_in, unsigned int freq_out);
581
571 /* codec IO */ 582 /* codec IO */
572 unsigned int (*read)(struct snd_soc_codec *, unsigned int); 583 unsigned int (*read)(struct snd_soc_codec *, unsigned int);
573 int (*write)(struct snd_soc_codec *, unsigned int, unsigned int); 584 int (*write)(struct snd_soc_codec *, unsigned int, unsigned int);