Loading include/sound/soc.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -1336,6 +1336,11 @@ int snd_soc_register_dai(struct snd_soc_component *component, struct snd_soc_dai *snd_soc_find_dai( struct snd_soc_dai *snd_soc_find_dai( const struct snd_soc_dai_link_component *dlc); const struct snd_soc_dai_link_component *dlc); #ifdef CONFIG_AUDIO_QGKI struct snd_soc_component *soc_find_component( const struct snd_soc_dai_link_component *dlc); #endif #include <sound/soc-dai.h> #include <sound/soc-dai.h> static inline static inline Loading sound/soc/soc-core.c +34 −0 Original line number Original line Diff line number Diff line Loading @@ -763,6 +763,39 @@ static int snd_soc_is_matching_component( return 1; return 1; } } #ifdef CONFIG_AUDIO_QGKI /** * soc_find_component: find a component from component_list in ASoC core * * @dlc: dlc of the component to query. * * function to find out if a component is already registered with ASoC core. * * Returns component handle for success, else NULL error. */ struct snd_soc_component *soc_find_component( const struct snd_soc_dai_link_component *dlc) { struct snd_soc_component *component; lockdep_assert_held(&client_mutex); /* * NOTE * * It returns *1st* found component, but some driver * has few components by same of_node/name * ex) * CPU component and generic DMAEngine component */ for_each_component(component) if (snd_soc_is_matching_component(dlc, component)) return component; return NULL; } EXPORT_SYMBOL(soc_find_component); #else static struct snd_soc_component *soc_find_component( static struct snd_soc_component *soc_find_component( const struct snd_soc_dai_link_component *dlc) const struct snd_soc_dai_link_component *dlc) { { Loading @@ -784,6 +817,7 @@ static struct snd_soc_component *soc_find_component( return NULL; return NULL; } } #endif /** /** * snd_soc_find_dai - Find a registered DAI * snd_soc_find_dai - Find a registered DAI Loading Loading
include/sound/soc.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -1336,6 +1336,11 @@ int snd_soc_register_dai(struct snd_soc_component *component, struct snd_soc_dai *snd_soc_find_dai( struct snd_soc_dai *snd_soc_find_dai( const struct snd_soc_dai_link_component *dlc); const struct snd_soc_dai_link_component *dlc); #ifdef CONFIG_AUDIO_QGKI struct snd_soc_component *soc_find_component( const struct snd_soc_dai_link_component *dlc); #endif #include <sound/soc-dai.h> #include <sound/soc-dai.h> static inline static inline Loading
sound/soc/soc-core.c +34 −0 Original line number Original line Diff line number Diff line Loading @@ -763,6 +763,39 @@ static int snd_soc_is_matching_component( return 1; return 1; } } #ifdef CONFIG_AUDIO_QGKI /** * soc_find_component: find a component from component_list in ASoC core * * @dlc: dlc of the component to query. * * function to find out if a component is already registered with ASoC core. * * Returns component handle for success, else NULL error. */ struct snd_soc_component *soc_find_component( const struct snd_soc_dai_link_component *dlc) { struct snd_soc_component *component; lockdep_assert_held(&client_mutex); /* * NOTE * * It returns *1st* found component, but some driver * has few components by same of_node/name * ex) * CPU component and generic DMAEngine component */ for_each_component(component) if (snd_soc_is_matching_component(dlc, component)) return component; return NULL; } EXPORT_SYMBOL(soc_find_component); #else static struct snd_soc_component *soc_find_component( static struct snd_soc_component *soc_find_component( const struct snd_soc_dai_link_component *dlc) const struct snd_soc_dai_link_component *dlc) { { Loading @@ -784,6 +817,7 @@ static struct snd_soc_component *soc_find_component( return NULL; return NULL; } } #endif /** /** * snd_soc_find_dai - Find a registered DAI * snd_soc_find_dai - Find a registered DAI Loading