diff options
| author | Mark Brown <broonie@kernel.org> | 2014-10-08 11:44:43 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2014-10-08 11:44:43 -0400 |
| commit | 7b8ab38e8d9cc804f0d3c263bfaa62d82d8a2da7 (patch) | |
| tree | 40f87e20d02f7c34f9cad5399c220cb81af20af0 /include | |
| parent | 1db1d4eefb0065abdc37f4fa40c67d322d7db663 (diff) | |
| parent | a5448c88b812390a3622e76d774e10c0da1fb970 (diff) | |
Merge tag 'asoc-v3.18' into asoc-linus
ASoC: Updates for v3.18
- More componentisation work from Lars-Peter, this time mainly
cleaning up the suspend and bias level transition callbacks.
- Real system support for the Intel drivers and a bunch of fixes and
enhancements for the associated CODEC drivers, this is going to need
a lot quirks over time due to the lack of any firmware description of
the boards.
- Jack detect support for simple card from Dylan Reid.
- A bunch of small fixes and enhancements for the Freescale drivers.
- New drivers for Analog Devices SSM4567, Cirrus Logic CS35L32, Everest
Semiconductor ES8328 and Freescale cards using the ASRC in newer i.MX
processors.
# gpg: Signature made Mon 06 Oct 2014 12:49:37 BST using RSA key ID 5D5487D0
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg: aka "Mark Brown <broonie@debian.org>"
# gpg: aka "Mark Brown <broonie@kernel.org>"
# gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg: aka "Mark Brown <broonie@linaro.org>"
# gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
Diffstat (limited to 'include')
| -rw-r--r-- | include/dt-bindings/sound/cs35l32.h | 26 | ||||
| -rw-r--r-- | include/sound/rt5645.h | 3 | ||||
| -rw-r--r-- | include/sound/rt5677.h | 13 | ||||
| -rw-r--r-- | include/sound/soc-dapm.h | 5 | ||||
| -rw-r--r-- | include/sound/soc.h | 101 | ||||
| -rw-r--r-- | include/trace/events/asoc.h | 6 |
6 files changed, 110 insertions, 44 deletions
diff --git a/include/dt-bindings/sound/cs35l32.h b/include/dt-bindings/sound/cs35l32.h new file mode 100644 index 000000000000..0c6d6a3c15a2 --- /dev/null +++ b/include/dt-bindings/sound/cs35l32.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | #ifndef __DT_CS35L32_H | ||
| 2 | #define __DT_CS35L32_H | ||
| 3 | |||
| 4 | #define CS35L32_BOOST_MGR_AUTO 0 | ||
| 5 | #define CS35L32_BOOST_MGR_AUTO_AUDIO 1 | ||
| 6 | #define CS35L32_BOOST_MGR_BYPASS 2 | ||
| 7 | #define CS35L32_BOOST_MGR_FIXED 3 | ||
| 8 | |||
| 9 | #define CS35L32_DATA_CFG_LR_VP 0 | ||
| 10 | #define CS35L32_DATA_CFG_LR_STAT 1 | ||
| 11 | #define CS35L32_DATA_CFG_LR 2 | ||
| 12 | #define CS35L32_DATA_CFG_LR_VPSTAT 3 | ||
| 13 | |||
| 14 | #define CS35L32_BATT_THRESH_3_1V 0 | ||
| 15 | #define CS35L32_BATT_THRESH_3_2V 1 | ||
| 16 | #define CS35L32_BATT_THRESH_3_3V 2 | ||
| 17 | #define CS35L32_BATT_THRESH_3_4V 3 | ||
| 18 | |||
| 19 | #define CS35L32_BATT_RECOV_3_1V 0 | ||
| 20 | #define CS35L32_BATT_RECOV_3_2V 1 | ||
| 21 | #define CS35L32_BATT_RECOV_3_3V 2 | ||
| 22 | #define CS35L32_BATT_RECOV_3_4V 3 | ||
| 23 | #define CS35L32_BATT_RECOV_3_5V 4 | ||
| 24 | #define CS35L32_BATT_RECOV_3_6V 5 | ||
| 25 | |||
| 26 | #endif /* __DT_CS35L32_H */ | ||
diff --git a/include/sound/rt5645.h b/include/sound/rt5645.h index 1de744c242f6..a5352712194b 100644 --- a/include/sound/rt5645.h +++ b/include/sound/rt5645.h | |||
| @@ -20,6 +20,9 @@ struct rt5645_platform_data { | |||
| 20 | /* 0 = IN2N; 1 = GPIO5; 2 = GPIO11 */ | 20 | /* 0 = IN2N; 1 = GPIO5; 2 = GPIO11 */ |
| 21 | unsigned int dmic2_data_pin; | 21 | unsigned int dmic2_data_pin; |
| 22 | /* 0 = IN2P; 1 = GPIO6; 2 = GPIO10; 3 = GPIO12 */ | 22 | /* 0 = IN2P; 1 = GPIO6; 2 = GPIO10; 3 = GPIO12 */ |
| 23 | |||
| 24 | unsigned int hp_det_gpio; | ||
| 25 | bool gpio_hp_det_active_high; | ||
| 23 | }; | 26 | }; |
| 24 | 27 | ||
| 25 | #endif | 28 | #endif |
diff --git a/include/sound/rt5677.h b/include/sound/rt5677.h index 3da14313bcfc..082670e3a353 100644 --- a/include/sound/rt5677.h +++ b/include/sound/rt5677.h | |||
| @@ -12,10 +12,21 @@ | |||
| 12 | #ifndef __LINUX_SND_RT5677_H | 12 | #ifndef __LINUX_SND_RT5677_H |
| 13 | #define __LINUX_SND_RT5677_H | 13 | #define __LINUX_SND_RT5677_H |
| 14 | 14 | ||
| 15 | enum rt5677_dmic2_clk { | ||
| 16 | RT5677_DMIC_CLK1 = 0, | ||
| 17 | RT5677_DMIC_CLK2 = 1, | ||
| 18 | }; | ||
| 19 | |||
| 20 | |||
| 15 | struct rt5677_platform_data { | 21 | struct rt5677_platform_data { |
| 16 | /* IN1 IN2 can optionally be differential */ | 22 | /* IN1/IN2/LOUT1/LOUT2/LOUT3 can optionally be differential */ |
| 17 | bool in1_diff; | 23 | bool in1_diff; |
| 18 | bool in2_diff; | 24 | bool in2_diff; |
| 25 | bool lout1_diff; | ||
| 26 | bool lout2_diff; | ||
| 27 | bool lout3_diff; | ||
| 28 | /* DMIC2 clock source selection */ | ||
| 29 | enum rt5677_dmic2_clk dmic2_clk_pin; | ||
| 19 | }; | 30 | }; |
| 20 | 31 | ||
| 21 | #endif | 32 | #endif |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index aac04ff84eea..3a4d7da67b8d 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
| @@ -432,6 +432,7 @@ int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm, | |||
| 432 | int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, | 432 | int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, |
| 433 | const char *pin); | 433 | const char *pin); |
| 434 | void snd_soc_dapm_auto_nc_pins(struct snd_soc_card *card); | 434 | void snd_soc_dapm_auto_nc_pins(struct snd_soc_card *card); |
| 435 | unsigned int dapm_kcontrol_get_value(const struct snd_kcontrol *kcontrol); | ||
| 435 | 436 | ||
| 436 | /* Mostly internal - should not normally be used */ | 437 | /* Mostly internal - should not normally be used */ |
| 437 | void dapm_mark_io_dirty(struct snd_soc_dapm_context *dapm); | 438 | void dapm_mark_io_dirty(struct snd_soc_dapm_context *dapm); |
| @@ -587,13 +588,13 @@ struct snd_soc_dapm_context { | |||
| 587 | enum snd_soc_bias_level suspend_bias_level; | 588 | enum snd_soc_bias_level suspend_bias_level; |
| 588 | struct delayed_work delayed_work; | 589 | struct delayed_work delayed_work; |
| 589 | unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */ | 590 | unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */ |
| 590 | 591 | /* Go to BIAS_OFF in suspend if the DAPM context is idle */ | |
| 592 | unsigned int suspend_bias_off:1; | ||
| 591 | void (*seq_notifier)(struct snd_soc_dapm_context *, | 593 | void (*seq_notifier)(struct snd_soc_dapm_context *, |
| 592 | enum snd_soc_dapm_type, int); | 594 | enum snd_soc_dapm_type, int); |
| 593 | 595 | ||
| 594 | struct device *dev; /* from parent - for debug */ | 596 | struct device *dev; /* from parent - for debug */ |
| 595 | struct snd_soc_component *component; /* parent component */ | 597 | struct snd_soc_component *component; /* parent component */ |
| 596 | struct snd_soc_codec *codec; /* parent codec */ | ||
| 597 | struct snd_soc_card *card; /* parent card */ | 598 | struct snd_soc_card *card; /* parent card */ |
| 598 | 599 | ||
| 599 | /* used during DAPM updates */ | 600 | /* used during DAPM updates */ |
diff --git a/include/sound/soc.h b/include/sound/soc.h index c83a334dd00f..7ba7130037a0 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,35 @@ 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 | struct snd_soc_codec *codec; | ||
| 768 | |||
| 769 | int (*probe)(struct snd_soc_component *); | ||
| 770 | void (*remove)(struct snd_soc_component *); | ||
| 771 | |||
| 772 | #ifdef CONFIG_DEBUG_FS | ||
| 773 | void (*init_debugfs)(struct snd_soc_component *component); | ||
| 774 | const char *debugfs_prefix; | ||
| 775 | #endif | ||
| 734 | }; | 776 | }; |
| 735 | 777 | ||
| 736 | /* SoC Audio Codec device */ | 778 | /* SoC Audio Codec device */ |
| @@ -746,11 +788,9 @@ struct snd_soc_codec { | |||
| 746 | struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ | 788 | struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ |
| 747 | unsigned int cache_bypass:1; /* Suppress access to the cache */ | 789 | unsigned int cache_bypass:1; /* Suppress access to the cache */ |
| 748 | unsigned int suspended:1; /* Codec is in suspend PM state */ | 790 | 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 */ | 791 | unsigned int ac97_registered:1; /* Codec has been AC97 registered */ |
| 751 | unsigned int ac97_created:1; /* Codec has been created by SoC */ | 792 | unsigned int ac97_created:1; /* Codec has been created by SoC */ |
| 752 | unsigned int cache_init:1; /* codec cache has been initialized */ | 793 | 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 */ | 794 | u32 cache_sync; /* Cache needs to be synced to hardware */ |
| 755 | 795 | ||
| 756 | /* codec IO */ | 796 | /* codec IO */ |
| @@ -766,7 +806,6 @@ struct snd_soc_codec { | |||
| 766 | struct snd_soc_dapm_context dapm; | 806 | struct snd_soc_dapm_context dapm; |
| 767 | 807 | ||
| 768 | #ifdef CONFIG_DEBUG_FS | 808 | #ifdef CONFIG_DEBUG_FS |
| 769 | struct dentry *debugfs_codec_root; | ||
| 770 | struct dentry *debugfs_reg; | 809 | struct dentry *debugfs_reg; |
| 771 | #endif | 810 | #endif |
| 772 | }; | 811 | }; |
| @@ -808,15 +847,12 @@ struct snd_soc_codec_driver { | |||
| 808 | int (*set_bias_level)(struct snd_soc_codec *, | 847 | int (*set_bias_level)(struct snd_soc_codec *, |
| 809 | enum snd_soc_bias_level level); | 848 | enum snd_soc_bias_level level); |
| 810 | bool idle_bias_off; | 849 | bool idle_bias_off; |
| 850 | bool suspend_bias_off; | ||
| 811 | 851 | ||
| 812 | void (*seq_notifier)(struct snd_soc_dapm_context *, | 852 | void (*seq_notifier)(struct snd_soc_dapm_context *, |
| 813 | enum snd_soc_dapm_type, int); | 853 | enum snd_soc_dapm_type, int); |
| 814 | 854 | ||
| 815 | bool ignore_pmdown_time; /* Doesn't benefit from pmdown delay */ | 855 | 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 | }; | 856 | }; |
| 821 | 857 | ||
| 822 | /* SoC platform interface */ | 858 | /* SoC platform interface */ |
| @@ -832,14 +868,6 @@ struct snd_soc_platform_driver { | |||
| 832 | int (*pcm_new)(struct snd_soc_pcm_runtime *); | 868 | int (*pcm_new)(struct snd_soc_pcm_runtime *); |
| 833 | void (*pcm_free)(struct snd_pcm *); | 869 | void (*pcm_free)(struct snd_pcm *); |
| 834 | 870 | ||
| 835 | /* Default control and setup, added after probe() is run */ | ||
| 836 | const struct snd_kcontrol_new *controls; | ||
| 837 | int num_controls; | ||
| 838 | const struct snd_soc_dapm_widget *dapm_widgets; | ||
| 839 | int num_dapm_widgets; | ||
| 840 | const struct snd_soc_dapm_route *dapm_routes; | ||
| 841 | int num_dapm_routes; | ||
| 842 | |||
| 843 | /* | 871 | /* |
| 844 | * For platform caused delay reporting. | 872 | * For platform caused delay reporting. |
| 845 | * Optional. | 873 | * Optional. |
| @@ -853,13 +881,6 @@ struct snd_soc_platform_driver { | |||
| 853 | /* platform stream compress ops */ | 881 | /* platform stream compress ops */ |
| 854 | const struct snd_compr_ops *compr_ops; | 882 | const struct snd_compr_ops *compr_ops; |
| 855 | 883 | ||
| 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); | 884 | int (*bespoke_trigger)(struct snd_pcm_substream *, int); |
| 864 | }; | 885 | }; |
| 865 | 886 | ||
| @@ -874,15 +895,10 @@ struct snd_soc_platform { | |||
| 874 | const struct snd_soc_platform_driver *driver; | 895 | const struct snd_soc_platform_driver *driver; |
| 875 | 896 | ||
| 876 | unsigned int suspended:1; /* platform is suspended */ | 897 | unsigned int suspended:1; /* platform is suspended */ |
| 877 | unsigned int probed:1; | ||
| 878 | 898 | ||
| 879 | struct list_head list; | 899 | struct list_head list; |
| 880 | 900 | ||
| 881 | struct snd_soc_component component; | 901 | struct snd_soc_component component; |
| 882 | |||
| 883 | #ifdef CONFIG_DEBUG_FS | ||
| 884 | struct dentry *debugfs_platform_root; | ||
| 885 | #endif | ||
| 886 | }; | 902 | }; |
| 887 | 903 | ||
| 888 | struct snd_soc_dai_link { | 904 | struct snd_soc_dai_link { |
| @@ -897,7 +913,7 @@ struct snd_soc_dai_link { | |||
| 897 | * only for codec to codec links, or systems using device tree. | 913 | * only for codec to codec links, or systems using device tree. |
| 898 | */ | 914 | */ |
| 899 | const char *cpu_name; | 915 | const char *cpu_name; |
| 900 | const struct device_node *cpu_of_node; | 916 | struct device_node *cpu_of_node; |
| 901 | /* | 917 | /* |
| 902 | * You MAY specify the DAI name of the CPU DAI. If this information is | 918 | * You MAY specify the DAI name of the CPU DAI. If this information is |
| 903 | * omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node | 919 | * omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node |
| @@ -909,7 +925,7 @@ struct snd_soc_dai_link { | |||
| 909 | * DT/OF node, but not both. | 925 | * DT/OF node, but not both. |
| 910 | */ | 926 | */ |
| 911 | const char *codec_name; | 927 | const char *codec_name; |
| 912 | const struct device_node *codec_of_node; | 928 | struct device_node *codec_of_node; |
| 913 | /* You MUST specify the DAI name within the codec */ | 929 | /* You MUST specify the DAI name within the codec */ |
| 914 | const char *codec_dai_name; | 930 | const char *codec_dai_name; |
| 915 | 931 | ||
| @@ -922,7 +938,7 @@ struct snd_soc_dai_link { | |||
| 922 | * do not need a platform. | 938 | * do not need a platform. |
| 923 | */ | 939 | */ |
| 924 | const char *platform_name; | 940 | const char *platform_name; |
| 925 | const struct device_node *platform_of_node; | 941 | struct device_node *platform_of_node; |
| 926 | int be_id; /* optional ID for machine driver BE identification */ | 942 | int be_id; /* optional ID for machine driver BE identification */ |
| 927 | 943 | ||
| 928 | const struct snd_soc_pcm_stream *params; | 944 | const struct snd_soc_pcm_stream *params; |
| @@ -994,7 +1010,7 @@ struct snd_soc_aux_dev { | |||
| 994 | const struct device_node *codec_of_node; | 1010 | const struct device_node *codec_of_node; |
| 995 | 1011 | ||
| 996 | /* codec/machine specific init - e.g. add machine controls */ | 1012 | /* codec/machine specific init - e.g. add machine controls */ |
| 997 | int (*init)(struct snd_soc_dapm_context *dapm); | 1013 | int (*init)(struct snd_soc_component *component); |
| 998 | }; | 1014 | }; |
| 999 | 1015 | ||
| 1000 | /* SoC card */ | 1016 | /* SoC card */ |
| @@ -1112,6 +1128,7 @@ struct snd_soc_pcm_runtime { | |||
| 1112 | struct snd_soc_platform *platform; | 1128 | struct snd_soc_platform *platform; |
| 1113 | struct snd_soc_dai *codec_dai; | 1129 | struct snd_soc_dai *codec_dai; |
| 1114 | struct snd_soc_dai *cpu_dai; | 1130 | struct snd_soc_dai *cpu_dai; |
| 1131 | struct snd_soc_component *component; /* Only valid for AUX dev rtds */ | ||
| 1115 | 1132 | ||
| 1116 | struct snd_soc_dai **codec_dais; | 1133 | struct snd_soc_dai **codec_dais; |
| 1117 | unsigned int num_codecs; | 1134 | unsigned int num_codecs; |
| @@ -1260,9 +1277,6 @@ void snd_soc_component_async_complete(struct snd_soc_component *component); | |||
| 1260 | int snd_soc_component_test_bits(struct snd_soc_component *component, | 1277 | int snd_soc_component_test_bits(struct snd_soc_component *component, |
| 1261 | unsigned int reg, unsigned int mask, unsigned int value); | 1278 | unsigned int reg, unsigned int mask, unsigned int value); |
| 1262 | 1279 | ||
| 1263 | int snd_soc_component_init_io(struct snd_soc_component *component, | ||
| 1264 | struct regmap *regmap); | ||
| 1265 | |||
| 1266 | /* device driver data */ | 1280 | /* device driver data */ |
| 1267 | 1281 | ||
| 1268 | static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card, | 1282 | static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card, |
| @@ -1276,26 +1290,37 @@ static inline void *snd_soc_card_get_drvdata(struct snd_soc_card *card) | |||
| 1276 | return card->drvdata; | 1290 | return card->drvdata; |
| 1277 | } | 1291 | } |
| 1278 | 1292 | ||
| 1293 | static inline void snd_soc_component_set_drvdata(struct snd_soc_component *c, | ||
| 1294 | void *data) | ||
| 1295 | { | ||
| 1296 | dev_set_drvdata(c->dev, data); | ||
| 1297 | } | ||
| 1298 | |||
| 1299 | static inline void *snd_soc_component_get_drvdata(struct snd_soc_component *c) | ||
| 1300 | { | ||
| 1301 | return dev_get_drvdata(c->dev); | ||
| 1302 | } | ||
| 1303 | |||
| 1279 | static inline void snd_soc_codec_set_drvdata(struct snd_soc_codec *codec, | 1304 | static inline void snd_soc_codec_set_drvdata(struct snd_soc_codec *codec, |
| 1280 | void *data) | 1305 | void *data) |
| 1281 | { | 1306 | { |
| 1282 | dev_set_drvdata(codec->dev, data); | 1307 | snd_soc_component_set_drvdata(&codec->component, data); |
| 1283 | } | 1308 | } |
| 1284 | 1309 | ||
| 1285 | static inline void *snd_soc_codec_get_drvdata(struct snd_soc_codec *codec) | 1310 | static inline void *snd_soc_codec_get_drvdata(struct snd_soc_codec *codec) |
| 1286 | { | 1311 | { |
| 1287 | return dev_get_drvdata(codec->dev); | 1312 | return snd_soc_component_get_drvdata(&codec->component); |
| 1288 | } | 1313 | } |
| 1289 | 1314 | ||
| 1290 | static inline void snd_soc_platform_set_drvdata(struct snd_soc_platform *platform, | 1315 | static inline void snd_soc_platform_set_drvdata(struct snd_soc_platform *platform, |
| 1291 | void *data) | 1316 | void *data) |
| 1292 | { | 1317 | { |
| 1293 | dev_set_drvdata(platform->dev, data); | 1318 | snd_soc_component_set_drvdata(&platform->component, data); |
| 1294 | } | 1319 | } |
| 1295 | 1320 | ||
| 1296 | static inline void *snd_soc_platform_get_drvdata(struct snd_soc_platform *platform) | 1321 | static inline void *snd_soc_platform_get_drvdata(struct snd_soc_platform *platform) |
| 1297 | { | 1322 | { |
| 1298 | return dev_get_drvdata(platform->dev); | 1323 | return snd_soc_component_get_drvdata(&platform->component); |
| 1299 | } | 1324 | } |
| 1300 | 1325 | ||
| 1301 | static inline void snd_soc_pcm_set_drvdata(struct snd_soc_pcm_runtime *rtd, | 1326 | static inline void snd_soc_pcm_set_drvdata(struct snd_soc_pcm_runtime *rtd, |
diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h index 0194a641e4e2..b04ee7e5a466 100644 --- a/include/trace/events/asoc.h +++ b/include/trace/events/asoc.h | |||
| @@ -175,7 +175,7 @@ TRACE_EVENT(snd_soc_dapm_output_path, | |||
| 175 | __entry->path_sink = (long)path->sink; | 175 | __entry->path_sink = (long)path->sink; |
| 176 | ), | 176 | ), |
| 177 | 177 | ||
| 178 | TP_printk("%c%s -> %s -> %s\n", | 178 | TP_printk("%c%s -> %s -> %s", |
| 179 | (int) __entry->path_sink && | 179 | (int) __entry->path_sink && |
| 180 | (int) __entry->path_connect ? '*' : ' ', | 180 | (int) __entry->path_connect ? '*' : ' ', |
| 181 | __get_str(wname), __get_str(pname), __get_str(psname)) | 181 | __get_str(wname), __get_str(pname), __get_str(psname)) |
| @@ -204,7 +204,7 @@ TRACE_EVENT(snd_soc_dapm_input_path, | |||
| 204 | __entry->path_source = (long)path->source; | 204 | __entry->path_source = (long)path->source; |
| 205 | ), | 205 | ), |
| 206 | 206 | ||
| 207 | TP_printk("%c%s <- %s <- %s\n", | 207 | TP_printk("%c%s <- %s <- %s", |
| 208 | (int) __entry->path_source && | 208 | (int) __entry->path_source && |
| 209 | (int) __entry->path_connect ? '*' : ' ', | 209 | (int) __entry->path_connect ? '*' : ' ', |
| 210 | __get_str(wname), __get_str(pname), __get_str(psname)) | 210 | __get_str(wname), __get_str(pname), __get_str(psname)) |
| @@ -226,7 +226,7 @@ TRACE_EVENT(snd_soc_dapm_connected, | |||
| 226 | __entry->stream = stream; | 226 | __entry->stream = stream; |
| 227 | ), | 227 | ), |
| 228 | 228 | ||
| 229 | TP_printk("%s: found %d paths\n", | 229 | TP_printk("%s: found %d paths", |
| 230 | __entry->stream ? "capture" : "playback", __entry->paths) | 230 | __entry->stream ? "capture" : "playback", __entry->paths) |
| 231 | ); | 231 | ); |
| 232 | 232 | ||
