mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
1568159868
commit
4ffca62a05
|
@ -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");
|
||||
|
|
|
@ -206,9 +206,9 @@ int gbaudio_tplg_parse_data(struct gbaudio_module_info *module,
|
|||
void gbaudio_tplg_release(struct gbaudio_module_info *module);
|
||||
|
||||
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 gbaudio_register_module(struct gbaudio_module_info *module);
|
||||
void gbaudio_unregister_module(struct gbaudio_module_info *module);
|
||||
|
||||
|
|
|
@ -960,14 +960,12 @@ static int gbaudio_widget_event(struct snd_soc_dapm_widget *w,
|
|||
case SND_SOC_DAPM_PRE_PMU:
|
||||
ret = gb_audio_gb_enable_widget(module->mgmt_connection, wid);
|
||||
if (!ret)
|
||||
ret = gbaudio_module_update(gbcodec, w->name, module,
|
||||
1);
|
||||
ret = gbaudio_module_update(gbcodec, w, module, 1);
|
||||
break;
|
||||
case SND_SOC_DAPM_POST_PMD:
|
||||
ret = gb_audio_gb_disable_widget(module->mgmt_connection, wid);
|
||||
if (!ret)
|
||||
ret = gbaudio_module_update(gbcodec, w->name, module,
|
||||
0);
|
||||
ret = gbaudio_module_update(gbcodec, w, module, 0);
|
||||
break;
|
||||
}
|
||||
if (ret)
|
||||
|
|
Loading…
Reference in New Issue