summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/audio_codec.c
diff options
context:
space:
mode:
authorVaibhav Agarwal <vaibhav.agarwal@linaro.org>2016-08-04 15:14:32 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-08-04 19:07:30 +0200
commit4ffca62a051c3e1722bcaf6a367b419e6e5e40e0 (patch)
tree3f21590572671a6b96c0b8c5da211cd9a0e7b77e /drivers/staging/greybus/audio_codec.c
parent1568159868f6b6c4ab17aa28ef4d5d4fc02317f1 (diff)
greybus: audio: Update parameters for gbaudio_module_update API
Earlier, module path was enabled based on module's control switch e.g. 'SPK Amp switch'. Thus widget's name was sufficient to parse and identify the direction. Now individual modules' path will be enabled based on AIF widget status. So, it is required to get complete widget details, say w->type is used to identify direction (playback/capture) and w->sname is used to identify module's DATA connection used for communication via greybus. Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org> Reviewed-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/audio_codec.c')
-rw-r--r--drivers/staging/greybus/audio_codec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
index a6f843784f2f..e2a0c16397cd 100644
--- a/drivers/staging/greybus/audio_codec.c
+++ b/drivers/staging/greybus/audio_codec.c
@@ -333,10 +333,11 @@ static int gbaudio_module_disable_rx(struct gbaudio_codec_info *codec,
}
int gbaudio_module_update(struct gbaudio_codec_info *codec,
- const char *w_name,
- struct gbaudio_module_info *module, int enable)
+ struct snd_soc_dapm_widget *w,
+ struct gbaudio_module_info *module, int enable)
{
int stream, ret = 0;
+ const char *w_name = w->name;
dev_dbg(module->dev, "%s:Module update %s sequence\n", w_name,
enable ? "Enable":"Disable");