Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b07c381e authored by Scott Mertz's avatar Scott Mertz
Browse files

hal: notify amplifier of parameter changes

CYNGNOS-996
Change-Id: Iecc020c0347ae7c43d27183186e06dcefef7a0dd
(cherry picked from commit b1b95441)
parent e4f6364d
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -358,6 +358,15 @@ static int amplifier_input_stream_standby(struct audio_stream_in *stream)
    return 0;
}

static int amplifier_set_parameters(struct str_parms *parms)
{
    amplifier_device_t *amp = get_amplifier_device();
    if (amp && amp->set_parameters)
        return amp->set_parameters(amp, parms);

    return 0;
}

static int amplifier_close(void)
{
    amplifier_device_t *amp = get_amplifier_device();
@@ -3356,6 +3365,7 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs)
    }

    audio_extn_set_parameters(adev, parms);
    amplifier_set_parameters(parms);

done:
    str_parms_destroy(parms);