Loading drivers/base/regmap/regmap.c +12 −0 Original line number Diff line number Diff line Loading @@ -2240,6 +2240,18 @@ int regmap_get_val_bytes(struct regmap *map) } EXPORT_SYMBOL_GPL(regmap_get_val_bytes); int regmap_parse_val(struct regmap *map, const void *buf, unsigned int *val) { if (!map->format.parse_val) return -EINVAL; *val = map->format.parse_val(buf); return 0; } EXPORT_SYMBOL_GPL(regmap_parse_val); static int __init regmap_initcall(void) { regmap_debugfs_initcall(); Loading include/linux/regmap.h +9 −0 Original line number Diff line number Diff line Loading @@ -423,6 +423,8 @@ bool regmap_check_range_table(struct regmap *map, unsigned int reg, int regmap_register_patch(struct regmap *map, const struct reg_default *regs, int num_regs); int regmap_parse_val(struct regmap *map, const void *buf, unsigned int *val); static inline bool regmap_reg_in_range(unsigned int reg, const struct regmap_range *range) Loading Loading @@ -695,6 +697,13 @@ static inline int regmap_register_patch(struct regmap *map, return -EINVAL; } static inline int regmap_parse_val(struct regmap *map, const void *buf, unsigned int *val) { WARN_ONCE(1, "regmap API is disabled"); return -EINVAL; } static inline struct regmap *dev_get_regmap(struct device *dev, const char *name) { Loading include/sound/soc-dai.h +1 −0 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ struct snd_soc_dai { /* parent platform/codec */ struct snd_soc_platform *platform; struct snd_soc_codec *codec; struct snd_soc_component *component; struct snd_soc_card *card; Loading include/sound/soc.h +22 −2 Original line number Diff line number Diff line Loading @@ -413,6 +413,10 @@ struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card, struct snd_soc_pcm_runtime *snd_soc_get_pcm_runtime(struct snd_soc_card *card, const char *dai_link); bool snd_soc_runtime_ignore_pmdown_time(struct snd_soc_pcm_runtime *rtd); void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream); void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream); /* Utility functions to get clock rates from various things */ int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params); Loading Loading @@ -656,12 +660,19 @@ struct snd_soc_component { const char *name; int id; struct device *dev; unsigned int active; unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ struct list_head list; struct snd_soc_dai_driver *dai_drv; int num_dai; const struct snd_soc_component_driver *driver; struct list_head dai_list; }; /* SoC Audio Codec device */ Loading @@ -683,7 +694,6 @@ struct snd_soc_codec { /* runtime */ struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ unsigned int active; unsigned int cache_bypass:1; /* Suppress access to the cache */ unsigned int suspended:1; /* Codec is in suspend PM state */ unsigned int probed:1; /* Codec has been probed */ Loading @@ -709,7 +719,6 @@ struct snd_soc_codec { /* dapm */ struct snd_soc_dapm_context dapm; unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ #ifdef CONFIG_DEBUG_FS struct dentry *debugfs_codec_root; Loading Loading @@ -1168,6 +1177,17 @@ static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc) return 1; } static inline bool snd_soc_component_is_active( struct snd_soc_component *component) { return component->active != 0; } static inline bool snd_soc_codec_is_active(struct snd_soc_codec *codec) { return snd_soc_component_is_active(&codec->component); } int snd_soc_util_init(void); void snd_soc_util_exit(void); Loading sound/soc/codecs/adav80x.c +2 −2 Original line number Diff line number Diff line Loading @@ -722,7 +722,7 @@ static int adav80x_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_codec *codec = dai->codec; struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); if (!codec->active || !adav80x->rate) if (!snd_soc_codec_is_active(codec) || !adav80x->rate) return 0; return snd_pcm_hw_constraint_minmax(substream->runtime, Loading @@ -735,7 +735,7 @@ static void adav80x_dai_shutdown(struct snd_pcm_substream *substream, struct snd_soc_codec *codec = dai->codec; struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); if (!codec->active) if (!snd_soc_codec_is_active(codec)) adav80x->rate = 0; } Loading Loading
drivers/base/regmap/regmap.c +12 −0 Original line number Diff line number Diff line Loading @@ -2240,6 +2240,18 @@ int regmap_get_val_bytes(struct regmap *map) } EXPORT_SYMBOL_GPL(regmap_get_val_bytes); int regmap_parse_val(struct regmap *map, const void *buf, unsigned int *val) { if (!map->format.parse_val) return -EINVAL; *val = map->format.parse_val(buf); return 0; } EXPORT_SYMBOL_GPL(regmap_parse_val); static int __init regmap_initcall(void) { regmap_debugfs_initcall(); Loading
include/linux/regmap.h +9 −0 Original line number Diff line number Diff line Loading @@ -423,6 +423,8 @@ bool regmap_check_range_table(struct regmap *map, unsigned int reg, int regmap_register_patch(struct regmap *map, const struct reg_default *regs, int num_regs); int regmap_parse_val(struct regmap *map, const void *buf, unsigned int *val); static inline bool regmap_reg_in_range(unsigned int reg, const struct regmap_range *range) Loading Loading @@ -695,6 +697,13 @@ static inline int regmap_register_patch(struct regmap *map, return -EINVAL; } static inline int regmap_parse_val(struct regmap *map, const void *buf, unsigned int *val) { WARN_ONCE(1, "regmap API is disabled"); return -EINVAL; } static inline struct regmap *dev_get_regmap(struct device *dev, const char *name) { Loading
include/sound/soc-dai.h +1 −0 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ struct snd_soc_dai { /* parent platform/codec */ struct snd_soc_platform *platform; struct snd_soc_codec *codec; struct snd_soc_component *component; struct snd_soc_card *card; Loading
include/sound/soc.h +22 −2 Original line number Diff line number Diff line Loading @@ -413,6 +413,10 @@ struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card, struct snd_soc_pcm_runtime *snd_soc_get_pcm_runtime(struct snd_soc_card *card, const char *dai_link); bool snd_soc_runtime_ignore_pmdown_time(struct snd_soc_pcm_runtime *rtd); void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream); void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream); /* Utility functions to get clock rates from various things */ int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params); Loading Loading @@ -656,12 +660,19 @@ struct snd_soc_component { const char *name; int id; struct device *dev; unsigned int active; unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ struct list_head list; struct snd_soc_dai_driver *dai_drv; int num_dai; const struct snd_soc_component_driver *driver; struct list_head dai_list; }; /* SoC Audio Codec device */ Loading @@ -683,7 +694,6 @@ struct snd_soc_codec { /* runtime */ struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ unsigned int active; unsigned int cache_bypass:1; /* Suppress access to the cache */ unsigned int suspended:1; /* Codec is in suspend PM state */ unsigned int probed:1; /* Codec has been probed */ Loading @@ -709,7 +719,6 @@ struct snd_soc_codec { /* dapm */ struct snd_soc_dapm_context dapm; unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ #ifdef CONFIG_DEBUG_FS struct dentry *debugfs_codec_root; Loading Loading @@ -1168,6 +1177,17 @@ static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc) return 1; } static inline bool snd_soc_component_is_active( struct snd_soc_component *component) { return component->active != 0; } static inline bool snd_soc_codec_is_active(struct snd_soc_codec *codec) { return snd_soc_component_is_active(&codec->component); } int snd_soc_util_init(void); void snd_soc_util_exit(void); Loading
sound/soc/codecs/adav80x.c +2 −2 Original line number Diff line number Diff line Loading @@ -722,7 +722,7 @@ static int adav80x_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_codec *codec = dai->codec; struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); if (!codec->active || !adav80x->rate) if (!snd_soc_codec_is_active(codec) || !adav80x->rate) return 0; return snd_pcm_hw_constraint_minmax(substream->runtime, Loading @@ -735,7 +735,7 @@ static void adav80x_dai_shutdown(struct snd_pcm_substream *substream, struct snd_soc_codec *codec = dai->codec; struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); if (!codec->active) if (!snd_soc_codec_is_active(codec)) adav80x->rate = 0; } Loading