diff options
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r-- | include/sound/soc.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index bc6cfabc0e35..92b92ac120bb 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -1268,6 +1268,19 @@ static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm( | |||
1268 | return component->dapm_ptr; | 1268 | return component->dapm_ptr; |
1269 | } | 1269 | } |
1270 | 1270 | ||
1271 | /** | ||
1272 | * snd_soc_dapm_kcontrol_codec() - Returns the codec associated to a kcontrol | ||
1273 | * @kcontrol: The kcontrol | ||
1274 | * | ||
1275 | * This function must only be used on DAPM contexts that are known to be part of | ||
1276 | * a CODEC (e.g. in a CODEC driver). Otherwise the behavior is undefined. | ||
1277 | */ | ||
1278 | static inline struct snd_soc_codec *snd_soc_dapm_kcontrol_codec( | ||
1279 | struct snd_kcontrol *kcontrol) | ||
1280 | { | ||
1281 | return snd_soc_dapm_to_codec(snd_soc_dapm_kcontrol_dapm(kcontrol)); | ||
1282 | } | ||
1283 | |||
1271 | /* codec IO */ | 1284 | /* codec IO */ |
1272 | unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg); | 1285 | unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg); |
1273 | int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg, | 1286 | int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg, |