aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2017-11-05 20:49:06 -0500
committerMark Brown <broonie@kernel.org>2017-11-08 16:19:39 -0500
commite07bd30bb87f6a6ca1f75fa41df71ff5e7bc6a3f (patch)
treeaefa6a68578164a54d7c9f837dcaecfdc117fa40
parent474db2c9991cc624e7415770c8b80fc7acf40cdd (diff)
ASoC: add snd_soc_dapm_kcontrol_component()
snd_soc_dapm_kcontrol_codec() (= for Codec) will be removed soon. This patch Component version of it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--include/sound/soc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 4961f4455b65..0668cbd9f0b5 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1524,6 +1524,19 @@ static inline struct snd_soc_codec *snd_soc_dapm_kcontrol_codec(
1524 return snd_soc_dapm_to_codec(snd_soc_dapm_kcontrol_dapm(kcontrol)); 1524 return snd_soc_dapm_to_codec(snd_soc_dapm_kcontrol_dapm(kcontrol));
1525} 1525}
1526 1526
1527/**
1528 * snd_soc_dapm_kcontrol_component() - Returns the component associated to a kcontrol
1529 * @kcontrol: The kcontrol
1530 *
1531 * This function must only be used on DAPM contexts that are known to be part of
1532 * a COMPONENT (e.g. in a COMPONENT driver). Otherwise the behavior is undefined.
1533 */
1534static inline struct snd_soc_component *snd_soc_dapm_kcontrol_component(
1535 struct snd_kcontrol *kcontrol)
1536{
1537 return snd_soc_dapm_to_component(snd_soc_dapm_kcontrol_dapm(kcontrol));
1538}
1539
1527/* codec IO */ 1540/* codec IO */
1528unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg); 1541unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg);
1529int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg, 1542int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg,