diff options
author | Shengjiu Wang <shengjiu.wang@nxp.com> | 2018-07-25 13:43:17 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 94e072bd0894e23a02e1a90b4c0b87501e64cb09 (patch) | |
tree | 8158a13e5ba387e511710cc135fb1aca3ea1c8bd /sound | |
parent | c3bbc7e43adfa6f0fe544662d0e7243eb7b5f78b (diff) |
MLK-19042-3: ASoC: rpmsg_wm8960: changes for receive message
Update the read and write function for the send_message function
changes
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/rpmsg_wm8960.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/rpmsg_wm8960.c b/sound/soc/codecs/rpmsg_wm8960.c index f473a2cfbe3f..15132321018d 100644 --- a/sound/soc/codecs/rpmsg_wm8960.c +++ b/sound/soc/codecs/rpmsg_wm8960.c @@ -113,14 +113,14 @@ static unsigned int rpmsg_wm8960_read(struct snd_soc_codec *codec, unsigned int { struct fsl_rpmsg_i2s *rpmsg_i2s = snd_soc_codec_get_drvdata(codec); struct i2s_info *i2s_info = &rpmsg_i2s->i2s_info; - struct i2s_rpmsg_s *rpmsg = &i2s_info->send_msg[RPMSG_AUDIO_I2C]; + struct i2s_rpmsg_s *rpmsg = &i2s_info->rpmsg[GET_CODEC_VALUE].send_msg; int err, reg_val; mutex_lock(&i2s_info->i2c_lock); rpmsg->param.buffer_addr = reg; rpmsg->header.cmd = GET_CODEC_VALUE; - err = i2s_info->send_message(rpmsg, i2s_info); - reg_val = rpmsg->param.buffer_size; + err = i2s_info->send_message(&i2s_info->rpmsg[GET_CODEC_VALUE], i2s_info); + reg_val = i2s_info->rpmsg[GET_CODEC_VALUE].recv_msg.param.reg_data; mutex_unlock(&i2s_info->i2c_lock); if (err) return 0; @@ -132,14 +132,14 @@ static int rpmsg_wm8960_write(struct snd_soc_codec *codec, unsigned int reg, uns { struct fsl_rpmsg_i2s *rpmsg_i2s = snd_soc_codec_get_drvdata(codec); struct i2s_info *i2s_info = &rpmsg_i2s->i2s_info; - struct i2s_rpmsg_s *rpmsg = &i2s_info->send_msg[RPMSG_AUDIO_I2C]; + struct i2s_rpmsg_s *rpmsg = &i2s_info->rpmsg[SET_CODEC_VALUE].send_msg; int err; mutex_lock(&i2s_info->i2c_lock); rpmsg->param.buffer_addr = reg; rpmsg->param.buffer_size = val; rpmsg->header.cmd = SET_CODEC_VALUE; - err = i2s_info->send_message(rpmsg, i2s_info); + err = i2s_info->send_message(&i2s_info->rpmsg[SET_CODEC_VALUE], i2s_info); mutex_unlock(&i2s_info->i2c_lock); if (err) return err; |