diff options
author | Mark Brown <broonie@kernel.org> | 2015-04-12 14:48:31 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-04-12 14:48:31 -0400 |
commit | 77b62fa5d23988155132cf7fee44f2c209e3dc4c (patch) | |
tree | 41cafd1b209f115a3c97939e1a566c69d4c58a01 | |
parent | d1113af4e8c0f2cd71e52cb904447bd0eec8aa54 (diff) | |
parent | 6b5b042d4c675cb9d3446a1cdcaca98e715ba812 (diff) |
Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next
-rw-r--r-- | include/sound/soc-dapm.h | 1 | ||||
-rw-r--r-- | include/sound/soc.h | 13 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 10 |
3 files changed, 13 insertions, 11 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 485fc9d1a7bc..d3a76b55186c 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -440,7 +440,6 @@ void dapm_mark_endpoints_dirty(struct snd_soc_card *card); | |||
440 | int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream, | 440 | int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream, |
441 | struct snd_soc_dapm_widget_list **list); | 441 | struct snd_soc_dapm_widget_list **list); |
442 | 442 | ||
443 | struct snd_soc_codec *snd_soc_dapm_kcontrol_codec(struct snd_kcontrol *kcontrol); | ||
444 | struct snd_soc_dapm_context *snd_soc_dapm_kcontrol_dapm( | 443 | struct snd_soc_dapm_context *snd_soc_dapm_kcontrol_dapm( |
445 | struct snd_kcontrol *kcontrol); | 444 | struct snd_kcontrol *kcontrol); |
446 | 445 | ||
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, |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 1fd2d458824e..dc05469e2ccf 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -473,16 +473,6 @@ struct snd_soc_dapm_context *snd_soc_dapm_kcontrol_dapm( | |||
473 | } | 473 | } |
474 | EXPORT_SYMBOL_GPL(snd_soc_dapm_kcontrol_dapm); | 474 | EXPORT_SYMBOL_GPL(snd_soc_dapm_kcontrol_dapm); |
475 | 475 | ||
476 | /** | ||
477 | * snd_soc_dapm_kcontrol_codec() - Returns the codec associated to a kcontrol | ||
478 | * @kcontrol: The kcontrol | ||
479 | */ | ||
480 | struct snd_soc_codec *snd_soc_dapm_kcontrol_codec(struct snd_kcontrol *kcontrol) | ||
481 | { | ||
482 | return snd_soc_dapm_to_codec(snd_soc_dapm_kcontrol_dapm(kcontrol)); | ||
483 | } | ||
484 | EXPORT_SYMBOL_GPL(snd_soc_dapm_kcontrol_codec); | ||
485 | |||
486 | static void dapm_reset(struct snd_soc_card *card) | 476 | static void dapm_reset(struct snd_soc_card *card) |
487 | { | 477 | { |
488 | struct snd_soc_dapm_widget *w; | 478 | struct snd_soc_dapm_widget *w; |