aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/soc.h5
-rw-r--r--sound/soc/soc-core.c39
2 files changed, 44 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 5297ba7e2c41..e6704c0a4404 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -192,6 +192,11 @@ void snd_soc_unregister_platform(struct snd_soc_platform *platform);
192int snd_soc_register_codec(struct snd_soc_codec *codec); 192int snd_soc_register_codec(struct snd_soc_codec *codec);
193void snd_soc_unregister_codec(struct snd_soc_codec *codec); 193void snd_soc_unregister_codec(struct snd_soc_codec *codec);
194 194
195#ifdef CONFIG_PM
196int snd_soc_suspend_device(struct device *dev);
197int snd_soc_resume_device(struct device *dev);
198#endif
199
195/* pcm <-> DAI connect */ 200/* pcm <-> DAI connect */
196void snd_soc_free_pcms(struct snd_soc_device *socdev); 201void snd_soc_free_pcms(struct snd_soc_device *socdev);
197int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid); 202int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid);
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index e1a920cd8953..44141178ff4a 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -788,6 +788,45 @@ static int soc_resume(struct platform_device *pdev)
788 return 0; 788 return 0;
789} 789}
790 790
791/**
792 * snd_soc_suspend_device: Notify core of device suspend
793 *
794 * @dev: Device being suspended.
795 *
796 * In order to ensure that the entire audio subsystem is suspended in a
797 * coordinated fashion ASoC devices should suspend themselves when
798 * called by ASoC. When the standard kernel suspend process asks the
799 * device to suspend it should call this function to initiate a suspend
800 * of the entire ASoC card.
801 *
802 * \note Currently this function is stubbed out.
803 */
804int snd_soc_suspend_device(struct device *dev)
805{
806 return 0;
807}
808EXPORT_SYMBOL_GPL(snd_soc_suspend_device);
809
810/**
811 * snd_soc_resume_device: Notify core of device resume
812 *
813 * @dev: Device being resumed.
814 *
815 * In order to ensure that the entire audio subsystem is resumed in a
816 * coordinated fashion ASoC devices should resume themselves when called
817 * by ASoC. When the standard kernel resume process asks the device
818 * to resume it should call this function. Once all the components of
819 * the card have notified that they are ready to be resumed the card
820 * will be resumed.
821 *
822 * \note Currently this function is stubbed out.
823 */
824int snd_soc_resume_device(struct device *dev)
825{
826 return 0;
827}
828EXPORT_SYMBOL_GPL(snd_soc_resume_device);
829
791#else 830#else
792#define soc_suspend NULL 831#define soc_suspend NULL
793#define soc_resume NULL 832#define soc_resume NULL