smart_amp: Clean up processing function and state on component reset

Clean up smart amp processing function and state in component data on
reset().

Signed-off-by: Eddy Hsu <eddyhsu@chromium.org>
This commit is contained in:
Eddy Hsu 2022-04-21 17:56:28 +00:00 committed by Liam Girdwood
parent 301d3d8b9f
commit 803782a5f1
1 changed files with 6 additions and 0 deletions

View File

@ -650,8 +650,14 @@ static int smart_amp_copy(struct comp_dev *dev)
static int smart_amp_reset(struct comp_dev *dev)
{
struct smart_amp_data *sad = comp_get_drvdata(dev);
comp_dbg(dev, "smart_amp_reset()");
sad->process = NULL;
sad->in_channels = 0;
sad->out_channels = 0;
comp_set_state(dev, COMP_TRIGGER_RESET);
return 0;