adsp: Make set_eos method generic

- Create generic nvfx_method_set_eos
- Required for plugin specific EOS handling

Bug 2402965

Change-Id: I4e52eca46769862e13ca947a27fcabccc3a1d70d
Signed-off-by: Niranjan Dighe <ndighe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1974986
(cherry picked from commit 9b48f057c2629bc000b745409551a80597aa4aab)
Reviewed-on: https://git-master.nvidia.com/r/2027461
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Hariharan Sivaraman <hariharans@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Niranjan Dighe
2018-12-18 10:39:17 +05:30
committed by Sameer Pujar
parent 9b9a66eba7
commit 9050c3e455

View File

@@ -759,7 +759,7 @@ static int tegra210_adsp_send_eos_msg(struct tegra210_adsp_app *app,
apm_msg.msgq_msg.size = MSGQ_MSG_WSIZE(apm_eos_params_t); apm_msg.msgq_msg.size = MSGQ_MSG_WSIZE(apm_eos_params_t);
apm_msg.msg.call_params.size = sizeof(apm_eos_params_t); apm_msg.msg.call_params.size = sizeof(apm_eos_params_t);
apm_msg.msg.call_params.method = nvfx_apm_method_set_eos; apm_msg.msg.call_params.method = nvfx_method_set_eos;
return tegra210_adsp_send_msg(app, &apm_msg, flags); return tegra210_adsp_send_msg(app, &apm_msg, flags);
} }
@@ -1301,7 +1301,7 @@ static int tegra210_adsp_pcm_msg_handler(struct tegra210_adsp_app *app,
} }
} }
break; break;
case nvfx_apm_method_set_eos: case nvfx_method_set_eos:
/* Nothing specific to be done here as DRAIN */ /* Nothing specific to be done here as DRAIN */
/* is implemented in native PCM driver */ /* is implemented in native PCM driver */
break; break;
@@ -1332,7 +1332,7 @@ static int tegra210_adsp_compr_msg_handler(struct tegra210_adsp_app *app,
case nvfx_apm_method_set_position: case nvfx_apm_method_set_position:
snd_compr_fragment_elapsed(prtd->cstream); snd_compr_fragment_elapsed(prtd->cstream);
break; break;
case nvfx_apm_method_set_eos: case nvfx_method_set_eos:
if (!prtd->is_draining) { if (!prtd->is_draining) {
dev_warn(prtd->dev, "EOS reached before drain"); dev_warn(prtd->dev, "EOS reached before drain");
break; break;