From 94f99c875c109e51decf0d8c25ec2c946db20c56 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 16 Jun 2014 18:13:01 +0200 Subject: ASoC: Move name_prefix from CODEC to component Move the name_prefix from the CODEC struct to the component struct. This will eventually allow to specify prefixes for all types of components. It is also necessary to make the DAPM code component type independent (i.e. a DAPM context does not need to know whether it belongs to a CODEC or a platform or something else). Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index ed9e2d7e5fdc..e1cce0042f8a 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -682,6 +682,7 @@ struct snd_soc_component_driver { struct snd_soc_component { const char *name; int id; + const char *name_prefix; struct device *dev; unsigned int active; @@ -710,7 +711,6 @@ struct snd_soc_component { /* SoC Audio Codec device */ struct snd_soc_codec { const char *name; - const char *name_prefix; int id; struct device *dev; const struct snd_soc_codec_driver *driver; -- cgit v1.2.3 From f4333203ec933f9272c90c7add01774ec2cf94d3 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 16 Jun 2014 18:13:02 +0200 Subject: ASoC: Move name and id from CODEC/platform to component The component struct already has a name and id field which are initialized to the same values as the same fields in the CODEC and platform structs. So remove them from the CODEC and platform structs and used the ones from the component struct instead. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index e1cce0042f8a..f64bf9452466 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -710,8 +710,6 @@ struct snd_soc_component { /* SoC Audio Codec device */ struct snd_soc_codec { - const char *name; - int id; struct device *dev; const struct snd_soc_codec_driver *driver; @@ -848,8 +846,6 @@ struct snd_soc_platform_driver { }; struct snd_soc_platform { - const char *name; - int id; struct device *dev; const struct snd_soc_platform_driver *driver; -- cgit v1.2.3 From 7df3788410e674423375b88e2d95c46e4015f5f5 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 16 Jun 2014 18:13:04 +0200 Subject: ASoC: Auto disconnect pins from all DAPM contexts Currently only pins in CODEC DAPM contexts are automatically marked as non-connected if the card has the fully_routed flag set. This makes sense since widgets which qualify for auto-disconnection are only found in CODEC DAPM contexts. But with componentisation this is going to change, so consider all widgets for auto-disconnection. Also it is probably faster to walk the widgets list only once rather than once for each CODEC. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc-dapm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 6b59471cdf44..8db627cc2fbe 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -431,7 +431,7 @@ int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm, const char *pin); int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, const char *pin); -void snd_soc_dapm_auto_nc_codec_pins(struct snd_soc_codec *codec); +void snd_soc_dapm_auto_nc_pins(struct snd_soc_card *card); /* Mostly internal - should not normally be used */ void dapm_mark_io_dirty(struct snd_soc_dapm_context *dapm); -- cgit v1.2.3 From 68f831c2724ab72c0088471b2ed1dc99e81948ef Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 16 Jun 2014 18:13:05 +0200 Subject: ASoC: Add a set_bias_level() callback to the DAPM context struct Currently the DAPM code directly looks at the CODEC driver struct to get a handle to the set_bias_level() callback. This patch adds a new set_bias_level() callback to the DAPM context struct. The DAPM code will use this new callback instead of the CODEC callback. For CODECs the new callback is set up to call the CODEC specific set_bias_level callback(). Not looking directly at the CODEC driver struct will allow non CODEC DAPM contexts to implement a set_bias_level() callback. This is also similar to how the seq_notifier() and stream_event() callbacks are currently handled. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc-dapm.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sound') diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 8db627cc2fbe..3a5c4f969c04 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -601,6 +601,8 @@ struct snd_soc_dapm_context { struct list_head list; int (*stream_event)(struct snd_soc_dapm_context *dapm, int event); + int (*set_bias_level)(struct snd_soc_dapm_context *dapm, + enum snd_soc_bias_level level); #ifdef CONFIG_DEBUG_FS struct dentry *debugfs_dapm; -- cgit v1.2.3 From ce0fc93ae56e2ba50ff8c220d69e4e860e889320 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 16 Jun 2014 18:13:06 +0200 Subject: ASoC: Add DAPM support at the component level This patch adds full DAPM support at the component level. Previously there was only full DAPM support for CODECs and partial DAPM support (e.g. no Mixers nor MUXs) for platforms. Having DAPM support at the component level will allow all types of components to use DAPM and also help in consolidating the DAPM support between CODECs and platforms. Since the DAPM context is directly embedded into the snd_soc_codec and snd_soc_platform struct and the 'dapm' field is directly referenced in a lot of drivers moving the field just right now is not possible without causing code churn. The approach this patch takes is to add two new fields to the component struct. One field which is the pointer to the actual DAPM context used by the component and one DAPM context that will be used as the default if no other context was specified. For CODECs and platforms the pointer is initialized to point to the CODEC or platform DAPM context. All generic code when referencing a component's DAPM struct will go via the pointer. This will make it possible to eventually seamlessly move the DAPM context from snd_soc_codec and snd_soc_platform struct over once all direct references have been eliminated. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc-dapm.h | 2 ++ include/sound/soc.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) (limited to 'include/sound') diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 3a5c4f969c04..e292683ee694 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -441,6 +441,8 @@ int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream, struct snd_soc_dapm_widget_list **list); struct snd_soc_codec *snd_soc_dapm_kcontrol_codec(struct snd_kcontrol *kcontrol); +struct snd_soc_dapm_context *snd_soc_dapm_kcontrol_dapm( + struct snd_kcontrol *kcontrol); /* dapm widget types */ enum snd_soc_dapm_type { diff --git a/include/sound/soc.h b/include/sound/soc.h index f64bf9452466..a21dfecba56b 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -706,6 +706,10 @@ struct snd_soc_component { int val_bytes; struct mutex io_mutex; + + /* Don't use these, use snd_soc_component_get_dapm() */ + struct snd_soc_dapm_context dapm; + struct snd_soc_dapm_context *dapm_ptr; }; /* SoC Audio Codec device */ @@ -1160,6 +1164,21 @@ static inline struct snd_soc_platform *snd_soc_component_to_platform( return container_of(component, struct snd_soc_platform, component); } +/** + * snd_soc_dapm_to_component() - Casts a DAPM context to the component it is + * embedded in + * @dapm: The DAPM context to cast to the component + * + * This function must only be used on DAPM contexts that are known to be part of + * a component (e.g. in a component driver). Otherwise the behavior is + * undefined. + */ +static inline struct snd_soc_component *snd_soc_dapm_to_component( + struct snd_soc_dapm_context *dapm) +{ + return container_of(dapm, struct snd_soc_component, dapm); +} + /** * snd_soc_dapm_to_codec() - Casts a DAPM context to the CODEC it is embedded in * @dapm: The DAPM context to cast to the CODEC @@ -1187,6 +1206,17 @@ static inline struct snd_soc_platform *snd_soc_dapm_to_platform( return container_of(dapm, struct snd_soc_platform, dapm); } +/** + * snd_soc_component_get_dapm() - Returns the DAPM context associated with a + * component + * @component: The component for which to get the DAPM context + */ +static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm( + struct snd_soc_component *component) +{ + return component->dapm_ptr; +} + /* codec IO */ unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg); int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg, -- cgit v1.2.3 From bc9af9fa9b89cb74eed020066d882abf238fad69 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 16 Jun 2014 18:13:07 +0200 Subject: ASoC: Use component DAPM context for platforms The snd_soc_platform dapm field is not accessed outside of the ASoC core. Switch it over to using the snd_soc_component DAPM context. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index a21dfecba56b..84ebc079c92f 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -862,8 +862,6 @@ struct snd_soc_platform { struct snd_soc_component component; - struct snd_soc_dapm_context dapm; - #ifdef CONFIG_DEBUG_FS struct dentry *debugfs_platform_root; #endif @@ -1203,7 +1201,7 @@ static inline struct snd_soc_codec *snd_soc_dapm_to_codec( static inline struct snd_soc_platform *snd_soc_dapm_to_platform( struct snd_soc_dapm_context *dapm) { - return container_of(dapm, struct snd_soc_platform, dapm); + return snd_soc_component_to_platform(snd_soc_dapm_to_component(dapm)); } /** -- cgit v1.2.3 From 14e8bdebfbc1d5c8804b3520233b2d4e516056bc Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 16 Jun 2014 18:13:08 +0200 Subject: ASoC: Add component level stream_event() and seq_notifier() support This patch adds stream_event() and seq_notifier() callbacks similar to those found in the snd_soc_codec_driver and snd_soc_platform driver struct to the snd_soc_component_driver struct. This is meant to unify the handling of these callbacks across different types of components and will eventually allow their removal from the CODEC and platfrom driver structs. The new callbacks are slightly different from the old ones in that they take a snd_soc_component as a parameter rather than a snd_soc_dapm_context. This was done since otherwise casting from the DAPM context to the component would typically be the first thing to do in the callback. And the interface becomes slightly cleaner by passing a snd_soc_component to all callbacks in the snd_soc_component_driver struct. The patch also already removes the stream_event() callback from the snd_soc_codec_driver and snd_soc_platform_driver structs as it is currently unused. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index 84ebc079c92f..9a5b4f6fe847 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -677,6 +677,9 @@ struct snd_soc_component_driver { int (*of_xlate_dai_name)(struct snd_soc_component *component, struct of_phandle_args *args, const char **dai_name); + void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type, + int subseq); + int (*stream_event)(struct snd_soc_component *, int event); }; struct snd_soc_component { @@ -792,9 +795,6 @@ struct snd_soc_codec_driver { void (*seq_notifier)(struct snd_soc_dapm_context *, enum snd_soc_dapm_type, int); - /* codec stream completion event */ - int (*stream_event)(struct snd_soc_dapm_context *dapm, int event); - bool ignore_pmdown_time; /* Doesn't benefit from pmdown delay */ /* probe ordering - for components with runtime dependencies */ @@ -836,9 +836,6 @@ struct snd_soc_platform_driver { /* platform stream compress ops */ const struct snd_compr_ops *compr_ops; - /* platform stream completion event */ - int (*stream_event)(struct snd_soc_dapm_context *dapm, int event); - /* probe ordering - for components with runtime dependencies */ int probe_order; int remove_order; -- cgit v1.2.3 From 9420d97b3f8672478696ae9c3e33051243e1f4a0 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 16 Jun 2014 18:13:10 +0200 Subject: ASoC: dapm: Remove DAI DAPM context The DAI DAPM context was added in commit be09ad90 ("ASoC: core: Add platform DAI widget mapping") and the only user was removed again in commit ae10e7e8f ("ASoC: core: Only add platform DAI widgets once."). Now that we have a per component DAPM context it is unlikely that we'll need the DAI DAPM context again. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc-dai.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 688f2ba8009f..031be2ab75d0 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -257,7 +257,6 @@ struct snd_soc_dai { struct snd_soc_dapm_widget *playback_widget; struct snd_soc_dapm_widget *capture_widget; - struct snd_soc_dapm_context dapm; /* DAI DMA data */ void *playback_dma_data; -- cgit v1.2.3 From 88a8fe3df65fa0229b04f1c03411062230091cdd Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 16 Jun 2014 18:13:11 +0200 Subject: ASoC: dapm: Remove platform field from widget and dapm context struct The platform field in the snd_soc_dapm_widget and snd_soc_dapm_context structs is now unused can be removed. New code that wants to get the platform for a widget or dapm context should use snd_soc_dapm_to_platform(w->dapm) or snd_soc_dapm_to_platform(dapm). Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc-dapm.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/sound') diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index e292683ee694..aac04ff84eea 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -526,7 +526,6 @@ struct snd_soc_dapm_widget { const char *name; /* widget name */ const char *sname; /* stream name */ struct snd_soc_codec *codec; - struct snd_soc_platform *platform; struct list_head list; struct snd_soc_dapm_context *dapm; @@ -595,7 +594,6 @@ struct snd_soc_dapm_context { struct device *dev; /* from parent - for debug */ struct snd_soc_component *component; /* parent component */ struct snd_soc_codec *codec; /* parent codec */ - struct snd_soc_platform *platform; /* parent platform */ struct snd_soc_card *card; /* parent card */ /* used during DAPM updates */ -- cgit v1.2.3 From 88bd870f02dff5c9445286e185f21873f25a977f Mon Sep 17 00:00:00 2001 From: Benoit Cousson Date: Tue, 8 Jul 2014 23:19:34 +0200 Subject: ASoC: core: Add initial support for DAI multicodec DAI link assumes a one to one mapping between CPU DAI and CODEC. In some cases, the same CPU DAI can be connected to several codecs. This is the case for example, if you connect two mono codecs to the same I2S link in order to have a stereo card. The current ASoC implementation does not allow such setup. Add support for DAI links composed of a single CPU DAI and multiple CODECs. Sound cards have to pass the CODECs array in the corresponding DAI link through a new 'snd_soc_dai_link_component' struct. Each CODEC in this array is described in the same manner single CODEC DAIs are (either DT/OF node or codec_name). Multi-codec links are not supported in the case of CODEC to CODEC links. Just print a warning if it happens. Based on an original code done by Misael. Signed-off-by: Benoit Cousson Signed-off-by: Misael Lopez Cruz Signed-off-by: Fabien Parent Tested-by: Lars-Peter Clausen Reviewed-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc-dai.h | 4 ++++ include/sound/soc.h | 13 +++++++++++++ 2 files changed, 17 insertions(+) (limited to 'include/sound') diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 031be2ab75d0..e8b3080d196a 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -272,6 +272,10 @@ struct snd_soc_dai { struct snd_soc_codec *codec; struct snd_soc_component *component; + /* CODEC TDM slot masks and params (for fixup) */ + unsigned int tx_mask; + unsigned int rx_mask; + struct snd_soc_card *card; struct list_head list; diff --git a/include/sound/soc.h b/include/sound/soc.h index 9a5b4f6fe847..f2142cf3f243 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -846,6 +846,12 @@ struct snd_soc_platform_driver { int (*bespoke_trigger)(struct snd_pcm_substream *, int); }; +struct snd_soc_dai_link_component { + const char *name; + const struct device_node *of_node; + const char *dai_name; +}; + struct snd_soc_platform { struct device *dev; const struct snd_soc_platform_driver *driver; @@ -891,6 +897,10 @@ struct snd_soc_dai_link { const struct device_node *codec_of_node; /* You MUST specify the DAI name within the codec */ const char *codec_dai_name; + + struct snd_soc_dai_link_component *codecs; + unsigned int num_codecs; + /* * You MAY specify the link's platform/PCM/DMA driver, either by * device name, or by DT/OF node, but not both. Some forms of link @@ -1089,6 +1099,9 @@ struct snd_soc_pcm_runtime { struct snd_soc_dai *codec_dai; struct snd_soc_dai *cpu_dai; + struct snd_soc_dai **codec_dais; + unsigned int num_codecs; + struct delayed_work delayed_work; #ifdef CONFIG_DEBUG_FS struct dentry *debugfs_dpcm_root; -- cgit v1.2.3 From 93e6958a3674d2fa42e2c24ad5156e65da1d8621 Mon Sep 17 00:00:00 2001 From: Benoit Cousson Date: Tue, 8 Jul 2014 23:19:38 +0200 Subject: ASoC: pcm: Add soc_dai_hw_params helper Add a function helper to factorize the hw_params code. Suggested by Lars-Peter Clausen Signed-off-by: Benoit Cousson Tested-by: Lars-Peter Clausen Reviewed-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index f2142cf3f243..98555f833ab4 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -436,6 +436,10 @@ int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream, int snd_soc_platform_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_platform *platform); +int soc_dai_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params, + struct snd_soc_dai *dai); + /* Jack reporting */ int snd_soc_jack_new(struct snd_soc_codec *codec, const char *id, int type, struct snd_soc_jack *jack); -- cgit v1.2.3 From 9898e1ccf5af70ad2d03d5b77c591fb243c0f021 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Thu, 17 Jul 2014 22:01:05 +0200 Subject: ASoC: Remove per card platform list The platform_dev_list was added in commit f0fba2ad1b ("ASoC: multi-component - ASoC Multi-Component Support") and while platforms are added and remove from that list it is otherwise unused. This patch removes it again. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index 98555f833ab4..1f5b4901415e 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -865,7 +865,6 @@ struct snd_soc_platform { struct snd_soc_card *card; struct list_head list; - struct list_head card_list; struct snd_soc_component component; @@ -1056,7 +1055,6 @@ struct snd_soc_card { /* lists of probed devices belonging to this card */ struct list_head codec_dev_list; - struct list_head platform_dev_list; struct list_head widgets; struct list_head paths; @@ -1299,7 +1297,6 @@ static inline void *snd_soc_pcm_get_drvdata(struct snd_soc_pcm_runtime *rtd) static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card) { INIT_LIST_HEAD(&card->codec_dev_list); - INIT_LIST_HEAD(&card->platform_dev_list); INIT_LIST_HEAD(&card->widgets); INIT_LIST_HEAD(&card->paths); INIT_LIST_HEAD(&card->dapm_list); -- cgit v1.2.3 From 00200107a296cad3a950049a5ad7134a0d962b8d Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Thu, 17 Jul 2014 22:01:07 +0200 Subject: ASoC: Move card field form platform/codec to component Both the snd_soc_codec and snd_soc_platform struct do have a pointer to the parent card and both handle this pointer in mostly the same way. This patch moves the card field to the component level which will allow further code consolidation between platforms and CODECS. Since there are only a handful of users of the snd_soc_codec struct's card field (and none of the snd_soc_platform's) these are update in this patch as well, which allows it to be removed from the snd_soc_codec struct. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index 1f5b4901415e..5ee6ddde4831 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -691,6 +691,7 @@ struct snd_soc_component { int id; const char *name_prefix; struct device *dev; + struct snd_soc_card *card; unsigned int active; @@ -725,7 +726,6 @@ struct snd_soc_codec { const struct snd_soc_codec_driver *driver; struct mutex mutex; - struct snd_soc_card *card; struct list_head list; struct list_head card_list; @@ -863,7 +863,6 @@ struct snd_soc_platform { unsigned int suspended:1; /* platform is suspended */ unsigned int probed:1; - struct snd_soc_card *card; struct list_head list; struct snd_soc_component component; -- cgit v1.2.3 From 0f2780ad4c2a398528c7bb1572158d6e894e5dd2 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Thu, 17 Jul 2014 22:01:08 +0200 Subject: ASoC: Add function to register component controls We have now everything in place to actual let a component register controls. Add a function which allows to do so. Also update snd_soc_add_codec_controls() and snd_soc_platform_controls() to use this new function internally. And while we are at it also change the num_controls parameter of those two functions from int to unsigned int. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index 5ee6ddde4831..50ff6f3459aa 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -507,10 +507,12 @@ struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template, const char *prefix); struct snd_kcontrol *snd_soc_card_get_kcontrol(struct snd_soc_card *soc_card, const char *name); +int snd_soc_add_component_controls(struct snd_soc_component *component, + const struct snd_kcontrol_new *controls, unsigned int num_controls); int snd_soc_add_codec_controls(struct snd_soc_codec *codec, - const struct snd_kcontrol_new *controls, int num_controls); + const struct snd_kcontrol_new *controls, unsigned int num_controls); int snd_soc_add_platform_controls(struct snd_soc_platform *platform, - const struct snd_kcontrol_new *controls, int num_controls); + const struct snd_kcontrol_new *controls, unsigned int num_controls); int snd_soc_add_card_controls(struct snd_soc_card *soc_card, const struct snd_kcontrol_new *controls, int num_controls); int snd_soc_add_dai_controls(struct snd_soc_dai *dai, -- cgit v1.2.3