diff options
| author | Mark Brown <broonie@linaro.org> | 2014-03-12 19:03:58 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2014-03-12 19:03:58 -0400 |
| commit | da8ab21cfea80655a0f7bbbc3f2fa0975970b8cb (patch) | |
| tree | 66d5a4804f0a15b5dc224bb2de9b0d9cb208eb91 /include | |
| parent | c6c124225f9551d78a19c291a2e204618f7e1e92 (diff) | |
| parent | 5c1d5f091dc39eecf9a34a8be01492d14c23ad91 (diff) | |
Merge remote-tracking branch 'asoc/topic/core' into asoc-next
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/regmap.h | 9 | ||||
| -rw-r--r-- | include/sound/soc-dai.h | 1 | ||||
| -rw-r--r-- | include/sound/soc.h | 24 |
3 files changed, 32 insertions, 2 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 4149f1a9b003..3e1a2e4a92ad 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
| @@ -423,6 +423,8 @@ bool regmap_check_range_table(struct regmap *map, unsigned int reg, | |||
| 423 | 423 | ||
| 424 | int regmap_register_patch(struct regmap *map, const struct reg_default *regs, | 424 | int regmap_register_patch(struct regmap *map, const struct reg_default *regs, |
| 425 | int num_regs); | 425 | int num_regs); |
| 426 | int regmap_parse_val(struct regmap *map, const void *buf, | ||
| 427 | unsigned int *val); | ||
| 426 | 428 | ||
| 427 | static inline bool regmap_reg_in_range(unsigned int reg, | 429 | static inline bool regmap_reg_in_range(unsigned int reg, |
| 428 | const struct regmap_range *range) | 430 | const struct regmap_range *range) |
| @@ -695,6 +697,13 @@ static inline int regmap_register_patch(struct regmap *map, | |||
| 695 | return -EINVAL; | 697 | return -EINVAL; |
| 696 | } | 698 | } |
| 697 | 699 | ||
| 700 | static inline int regmap_parse_val(struct regmap *map, const void *buf, | ||
| 701 | unsigned int *val) | ||
| 702 | { | ||
| 703 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 704 | return -EINVAL; | ||
| 705 | } | ||
| 706 | |||
| 698 | static inline struct regmap *dev_get_regmap(struct device *dev, | 707 | static inline struct regmap *dev_get_regmap(struct device *dev, |
| 699 | const char *name) | 708 | const char *name) |
| 700 | { | 709 | { |
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 71f27c403194..8763e539c487 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
| @@ -270,6 +270,7 @@ struct snd_soc_dai { | |||
| 270 | /* parent platform/codec */ | 270 | /* parent platform/codec */ |
| 271 | struct snd_soc_platform *platform; | 271 | struct snd_soc_platform *platform; |
| 272 | struct snd_soc_codec *codec; | 272 | struct snd_soc_codec *codec; |
| 273 | struct snd_soc_component *component; | ||
| 273 | 274 | ||
| 274 | struct snd_soc_card *card; | 275 | struct snd_soc_card *card; |
| 275 | 276 | ||
diff --git a/include/sound/soc.h b/include/sound/soc.h index 9a001472b96a..37b470c1e127 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
| @@ -413,6 +413,10 @@ struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card, | |||
| 413 | struct snd_soc_pcm_runtime *snd_soc_get_pcm_runtime(struct snd_soc_card *card, | 413 | struct snd_soc_pcm_runtime *snd_soc_get_pcm_runtime(struct snd_soc_card *card, |
| 414 | const char *dai_link); | 414 | const char *dai_link); |
| 415 | 415 | ||
| 416 | bool snd_soc_runtime_ignore_pmdown_time(struct snd_soc_pcm_runtime *rtd); | ||
| 417 | void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream); | ||
| 418 | void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream); | ||
| 419 | |||
| 416 | /* Utility functions to get clock rates from various things */ | 420 | /* Utility functions to get clock rates from various things */ |
| 417 | int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); | 421 | int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); |
| 418 | int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params); | 422 | int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params); |
| @@ -656,12 +660,19 @@ struct snd_soc_component { | |||
| 656 | const char *name; | 660 | const char *name; |
| 657 | int id; | 661 | int id; |
| 658 | struct device *dev; | 662 | struct device *dev; |
| 663 | |||
| 664 | unsigned int active; | ||
| 665 | |||
| 666 | unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ | ||
| 667 | |||
| 659 | struct list_head list; | 668 | struct list_head list; |
| 660 | 669 | ||
| 661 | struct snd_soc_dai_driver *dai_drv; | 670 | struct snd_soc_dai_driver *dai_drv; |
| 662 | int num_dai; | 671 | int num_dai; |
| 663 | 672 | ||
| 664 | const struct snd_soc_component_driver *driver; | 673 | const struct snd_soc_component_driver *driver; |
| 674 | |||
| 675 | struct list_head dai_list; | ||
| 665 | }; | 676 | }; |
| 666 | 677 | ||
| 667 | /* SoC Audio Codec device */ | 678 | /* SoC Audio Codec device */ |
| @@ -683,7 +694,6 @@ struct snd_soc_codec { | |||
| 683 | 694 | ||
| 684 | /* runtime */ | 695 | /* runtime */ |
| 685 | struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ | 696 | struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ |
| 686 | unsigned int active; | ||
| 687 | unsigned int cache_bypass:1; /* Suppress access to the cache */ | 697 | unsigned int cache_bypass:1; /* Suppress access to the cache */ |
| 688 | unsigned int suspended:1; /* Codec is in suspend PM state */ | 698 | unsigned int suspended:1; /* Codec is in suspend PM state */ |
| 689 | unsigned int probed:1; /* Codec has been probed */ | 699 | unsigned int probed:1; /* Codec has been probed */ |
| @@ -709,7 +719,6 @@ struct snd_soc_codec { | |||
| 709 | 719 | ||
| 710 | /* dapm */ | 720 | /* dapm */ |
| 711 | struct snd_soc_dapm_context dapm; | 721 | struct snd_soc_dapm_context dapm; |
| 712 | unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ | ||
| 713 | 722 | ||
| 714 | #ifdef CONFIG_DEBUG_FS | 723 | #ifdef CONFIG_DEBUG_FS |
| 715 | struct dentry *debugfs_codec_root; | 724 | struct dentry *debugfs_codec_root; |
| @@ -1168,6 +1177,17 @@ static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc) | |||
| 1168 | return 1; | 1177 | return 1; |
| 1169 | } | 1178 | } |
| 1170 | 1179 | ||
| 1180 | static inline bool snd_soc_component_is_active( | ||
| 1181 | struct snd_soc_component *component) | ||
| 1182 | { | ||
| 1183 | return component->active != 0; | ||
| 1184 | } | ||
| 1185 | |||
| 1186 | static inline bool snd_soc_codec_is_active(struct snd_soc_codec *codec) | ||
| 1187 | { | ||
| 1188 | return snd_soc_component_is_active(&codec->component); | ||
| 1189 | } | ||
| 1190 | |||
| 1171 | int snd_soc_util_init(void); | 1191 | int snd_soc_util_init(void); |
| 1172 | void snd_soc_util_exit(void); | 1192 | void snd_soc_util_exit(void); |
| 1173 | 1193 | ||
