diff options
| author | Mark Brown <broonie@kernel.org> | 2014-09-06 08:38:26 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2014-09-06 08:38:26 -0400 |
| commit | bade5f09ca5bfd5a5f499a682509a9109472bca8 (patch) | |
| tree | 04565ef0457ee2d3ee3705ca54936a227723be8d | |
| parent | 75c3daaad5a2f791e0fbad732690130ce1bc55d2 (diff) | |
| parent | 85362efb80070bed890602483f71cd103be303c2 (diff) | |
Merge branch 'topic/suspend' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-es8328
| -rw-r--r-- | include/sound/soc-dapm.h | 3 | ||||
| -rw-r--r-- | include/sound/soc.h | 69 | ||||
| -rw-r--r-- | sound/soc/codecs/adau1373.c | 21 | ||||
| -rw-r--r-- | sound/soc/codecs/adau1761.c | 2 | ||||
| -rw-r--r-- | sound/soc/codecs/adau1781.c | 2 | ||||
| -rw-r--r-- | sound/soc/codecs/adau17x1.c | 8 | ||||
| -rw-r--r-- | sound/soc/codecs/adau17x1.h | 1 | ||||
| -rw-r--r-- | sound/soc/codecs/adav80x.c | 23 | ||||
| -rw-r--r-- | sound/soc/codecs/lm49453.c | 14 | ||||
| -rw-r--r-- | sound/soc/codecs/ssm2518.c | 13 | ||||
| -rw-r--r-- | sound/soc/codecs/ssm2602.c | 24 | ||||
| -rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 16 | ||||
| -rw-r--r-- | sound/soc/codecs/wm8804.c | 19 | ||||
| -rw-r--r-- | sound/soc/codecs/wm8995.c | 19 | ||||
| -rw-r--r-- | sound/soc/samsung/speyside.c | 6 | ||||
| -rw-r--r-- | sound/soc/soc-core.c | 686 | ||||
| -rw-r--r-- | sound/soc/soc-dapm.c | 20 | ||||
| -rw-r--r-- | sound/soc/soc-generic-dmaengine-pcm.c | 4 | ||||
| -rw-r--r-- | sound/soc/soc-io.c | 28 |
19 files changed, 397 insertions, 581 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index aac04ff84eea..f955d65c5656 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
| @@ -587,7 +587,8 @@ struct snd_soc_dapm_context { | |||
| 587 | enum snd_soc_bias_level suspend_bias_level; | 587 | enum snd_soc_bias_level suspend_bias_level; |
| 588 | struct delayed_work delayed_work; | 588 | struct delayed_work delayed_work; |
| 589 | unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */ | 589 | unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */ |
| 590 | 590 | /* Go to BIAS_OFF in suspend if the DAPM context is idle */ | |
| 591 | unsigned int suspend_bias_off:1; | ||
| 591 | void (*seq_notifier)(struct snd_soc_dapm_context *, | 592 | void (*seq_notifier)(struct snd_soc_dapm_context *, |
| 592 | enum snd_soc_dapm_type, int); | 593 | enum snd_soc_dapm_type, int); |
| 593 | 594 | ||
diff --git a/include/sound/soc.h b/include/sound/soc.h index be6ecae247b0..ac99fc083eec 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
| @@ -690,6 +690,17 @@ struct snd_soc_compr_ops { | |||
| 690 | struct snd_soc_component_driver { | 690 | struct snd_soc_component_driver { |
| 691 | const char *name; | 691 | const char *name; |
| 692 | 692 | ||
| 693 | /* Default control and setup, added after probe() is run */ | ||
| 694 | const struct snd_kcontrol_new *controls; | ||
| 695 | unsigned int num_controls; | ||
| 696 | const struct snd_soc_dapm_widget *dapm_widgets; | ||
| 697 | unsigned int num_dapm_widgets; | ||
| 698 | const struct snd_soc_dapm_route *dapm_routes; | ||
| 699 | unsigned int num_dapm_routes; | ||
| 700 | |||
| 701 | int (*probe)(struct snd_soc_component *); | ||
| 702 | void (*remove)(struct snd_soc_component *); | ||
| 703 | |||
| 693 | /* DT */ | 704 | /* DT */ |
| 694 | int (*of_xlate_dai_name)(struct snd_soc_component *component, | 705 | int (*of_xlate_dai_name)(struct snd_soc_component *component, |
| 695 | struct of_phandle_args *args, | 706 | struct of_phandle_args *args, |
| @@ -697,6 +708,10 @@ struct snd_soc_component_driver { | |||
| 697 | void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type, | 708 | void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type, |
| 698 | int subseq); | 709 | int subseq); |
| 699 | int (*stream_event)(struct snd_soc_component *, int event); | 710 | int (*stream_event)(struct snd_soc_component *, int event); |
| 711 | |||
| 712 | /* probe ordering - for components with runtime dependencies */ | ||
| 713 | int probe_order; | ||
| 714 | int remove_order; | ||
| 700 | }; | 715 | }; |
| 701 | 716 | ||
| 702 | struct snd_soc_component { | 717 | struct snd_soc_component { |
| @@ -710,6 +725,7 @@ struct snd_soc_component { | |||
| 710 | 725 | ||
| 711 | unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ | 726 | unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ |
| 712 | unsigned int registered_as_component:1; | 727 | unsigned int registered_as_component:1; |
| 728 | unsigned int probed:1; | ||
| 713 | 729 | ||
| 714 | struct list_head list; | 730 | struct list_head list; |
| 715 | 731 | ||
| @@ -728,9 +744,36 @@ struct snd_soc_component { | |||
| 728 | 744 | ||
| 729 | struct mutex io_mutex; | 745 | struct mutex io_mutex; |
| 730 | 746 | ||
| 747 | #ifdef CONFIG_DEBUG_FS | ||
| 748 | struct dentry *debugfs_root; | ||
| 749 | #endif | ||
| 750 | |||
| 751 | /* | ||
| 752 | * DO NOT use any of the fields below in drivers, they are temporary and | ||
| 753 | * are going to be removed again soon. If you use them in driver code the | ||
| 754 | * driver will be marked as BROKEN when these fields are removed. | ||
| 755 | */ | ||
| 756 | |||
| 731 | /* Don't use these, use snd_soc_component_get_dapm() */ | 757 | /* Don't use these, use snd_soc_component_get_dapm() */ |
| 732 | struct snd_soc_dapm_context dapm; | 758 | struct snd_soc_dapm_context dapm; |
| 733 | struct snd_soc_dapm_context *dapm_ptr; | 759 | struct snd_soc_dapm_context *dapm_ptr; |
| 760 | |||
| 761 | const struct snd_kcontrol_new *controls; | ||
| 762 | unsigned int num_controls; | ||
| 763 | const struct snd_soc_dapm_widget *dapm_widgets; | ||
| 764 | unsigned int num_dapm_widgets; | ||
| 765 | const struct snd_soc_dapm_route *dapm_routes; | ||
| 766 | unsigned int num_dapm_routes; | ||
| 767 | bool steal_sibling_dai_widgets; | ||
| 768 | struct snd_soc_codec *codec; | ||
| 769 | |||
| 770 | int (*probe)(struct snd_soc_component *); | ||
| 771 | void (*remove)(struct snd_soc_component *); | ||
| 772 | |||
| 773 | #ifdef CONFIG_DEBUG_FS | ||
| 774 | void (*init_debugfs)(struct snd_soc_component *component); | ||
| 775 | const char *debugfs_prefix; | ||
| 776 | #endif | ||
| 734 | }; | 777 | }; |
| 735 | 778 | ||
| 736 | /* SoC Audio Codec device */ | 779 | /* SoC Audio Codec device */ |
| @@ -746,11 +789,9 @@ struct snd_soc_codec { | |||
| 746 | struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ | 789 | struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ |
| 747 | unsigned int cache_bypass:1; /* Suppress access to the cache */ | 790 | unsigned int cache_bypass:1; /* Suppress access to the cache */ |
| 748 | unsigned int suspended:1; /* Codec is in suspend PM state */ | 791 | unsigned int suspended:1; /* Codec is in suspend PM state */ |
| 749 | unsigned int probed:1; /* Codec has been probed */ | ||
| 750 | unsigned int ac97_registered:1; /* Codec has been AC97 registered */ | 792 | unsigned int ac97_registered:1; /* Codec has been AC97 registered */ |
| 751 | unsigned int ac97_created:1; /* Codec has been created by SoC */ | 793 | unsigned int ac97_created:1; /* Codec has been created by SoC */ |
| 752 | unsigned int cache_init:1; /* codec cache has been initialized */ | 794 | unsigned int cache_init:1; /* codec cache has been initialized */ |
| 753 | u32 cache_only; /* Suppress writes to hardware */ | ||
| 754 | u32 cache_sync; /* Cache needs to be synced to hardware */ | 795 | u32 cache_sync; /* Cache needs to be synced to hardware */ |
| 755 | 796 | ||
| 756 | /* codec IO */ | 797 | /* codec IO */ |
| @@ -766,7 +807,6 @@ struct snd_soc_codec { | |||
| 766 | struct snd_soc_dapm_context dapm; | 807 | struct snd_soc_dapm_context dapm; |
| 767 | 808 | ||
| 768 | #ifdef CONFIG_DEBUG_FS | 809 | #ifdef CONFIG_DEBUG_FS |
| 769 | struct dentry *debugfs_codec_root; | ||
| 770 | struct dentry *debugfs_reg; | 810 | struct dentry *debugfs_reg; |
| 771 | #endif | 811 | #endif |
| 772 | }; | 812 | }; |
| @@ -808,15 +848,12 @@ struct snd_soc_codec_driver { | |||
| 808 | int (*set_bias_level)(struct snd_soc_codec *, | 848 | int (*set_bias_level)(struct snd_soc_codec *, |
| 809 | enum snd_soc_bias_level level); | 849 | enum snd_soc_bias_level level); |
| 810 | bool idle_bias_off; | 850 | bool idle_bias_off; |
| 851 | bool suspend_bias_off; | ||
| 811 | 852 | ||
| 812 | void (*seq_notifier)(struct snd_soc_dapm_context *, | 853 | void (*seq_notifier)(struct snd_soc_dapm_context *, |
| 813 | enum snd_soc_dapm_type, int); | 854 | enum snd_soc_dapm_type, int); |
| 814 | 855 | ||
| 815 | bool ignore_pmdown_time; /* Doesn't benefit from pmdown delay */ | 856 | bool ignore_pmdown_time; /* Doesn't benefit from pmdown delay */ |
| 816 | |||
| 817 | /* probe ordering - for components with runtime dependencies */ | ||
| 818 | int probe_order; | ||
| 819 | int remove_order; | ||
| 820 | }; | 857 | }; |
| 821 | 858 | ||
| 822 | /* SoC platform interface */ | 859 | /* SoC platform interface */ |
| @@ -853,13 +890,6 @@ struct snd_soc_platform_driver { | |||
| 853 | /* platform stream compress ops */ | 890 | /* platform stream compress ops */ |
| 854 | const struct snd_compr_ops *compr_ops; | 891 | const struct snd_compr_ops *compr_ops; |
| 855 | 892 | ||
| 856 | /* probe ordering - for components with runtime dependencies */ | ||
| 857 | int probe_order; | ||
| 858 | int remove_order; | ||
| 859 | |||
| 860 | /* platform IO - used for platform DAPM */ | ||
| 861 | unsigned int (*read)(struct snd_soc_platform *, unsigned int); | ||
| 862 | int (*write)(struct snd_soc_platform *, unsigned int, unsigned int); | ||
| 863 | int (*bespoke_trigger)(struct snd_pcm_substream *, int); | 893 | int (*bespoke_trigger)(struct snd_pcm_substream *, int); |
| 864 | }; | 894 | }; |
| 865 | 895 | ||
| @@ -874,15 +904,10 @@ struct snd_soc_platform { | |||
| 874 | const struct snd_soc_platform_driver *driver; | 904 | const struct snd_soc_platform_driver *driver; |
| 875 | |||
