mfd: cros_ec: Update I2S API
Improve I2S API. Rename ec_response_codec_gain into ec_codec_i2s_gain, update caller accordlingly. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Acked-by: Benson Leung <bleung@chromium.org> Reviewed-by: Fabien Lahoudere <fabien.lahoudere@collabora.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:

committed by
Lee Jones

parent
2f2e6d1486
commit
3aa6be30da
@@ -38,21 +38,21 @@ static const DECLARE_TLV_DB_SCALE(ec_mic_gain_tlv, 0, 100, 0);
|
||||
|
||||
static int ec_command_get_gain(struct snd_soc_component *component,
|
||||
struct ec_param_codec_i2s *param,
|
||||
struct ec_response_codec_gain *resp)
|
||||
struct ec_codec_i2s_gain *resp)
|
||||
{
|
||||
struct cros_ec_codec_data *codec_data =
|
||||
snd_soc_component_get_drvdata(component);
|
||||
struct cros_ec_device *ec_device = codec_data->ec_device;
|
||||
u8 buffer[sizeof(struct cros_ec_command) +
|
||||
max(sizeof(struct ec_param_codec_i2s),
|
||||
sizeof(struct ec_response_codec_gain))];
|
||||
sizeof(struct ec_codec_i2s_gain))];
|
||||
struct cros_ec_command *msg = (struct cros_ec_command *)&buffer;
|
||||
int ret;
|
||||
|
||||
msg->version = 0;
|
||||
msg->command = EC_CMD_CODEC_I2S;
|
||||
msg->outsize = sizeof(struct ec_param_codec_i2s);
|
||||
msg->insize = sizeof(struct ec_response_codec_gain);
|
||||
msg->insize = sizeof(struct ec_codec_i2s_gain);
|
||||
|
||||
memcpy(msg->data, param, msg->outsize);
|
||||
|
||||
@@ -226,7 +226,7 @@ static int get_ec_mic_gain(struct snd_soc_component *component,
|
||||
u8 *left, u8 *right)
|
||||
{
|
||||
struct ec_param_codec_i2s param;
|
||||
struct ec_response_codec_gain resp;
|
||||
struct ec_codec_i2s_gain resp;
|
||||
int ret;
|
||||
|
||||
param.cmd = EC_CODEC_GET_GAIN;
|
||||
|
Reference in New Issue
Block a user