mirror of https://gitee.com/openkylin/linux.git
greybus: audio: Fix incorrect codec state modification
In case module is removed dynamically with ongoing playback, during module cleanup codec state is mistakenly modified. State should be modified for module only. Fix this. Fixes: 76414cb499b7 ("audio: Use single codec driver registration") Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org> Reviewed-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Alex Elder <elder@linaro.org>
This commit is contained in:
parent
3487394988
commit
cf1caac6cd
|
@ -971,7 +971,7 @@ static void gbaudio_codec_cleanup(struct gbaudio_module_info *module)
|
|||
ret = gb_audio_apbridgea_unregister_cport(data->connection,
|
||||
i2s_port, cportid,
|
||||
AUDIO_APBRIDGEA_DIRECTION_TX);
|
||||
gbcodec->stream[0].state = GBAUDIO_CODEC_SHUTDOWN;
|
||||
module->ctrlstate[0] = GBAUDIO_CODEC_SHUTDOWN;
|
||||
}
|
||||
|
||||
if (cap_state == GBAUDIO_CODEC_START) {
|
||||
|
@ -996,7 +996,7 @@ static void gbaudio_codec_cleanup(struct gbaudio_module_info *module)
|
|||
ret = gb_audio_apbridgea_unregister_cport(data->connection,
|
||||
i2s_port, cportid,
|
||||
AUDIO_APBRIDGEA_DIRECTION_RX);
|
||||
gbcodec->stream[1].state = GBAUDIO_CODEC_SHUTDOWN;
|
||||
module->ctrlstate[1] = GBAUDIO_CODEC_SHUTDOWN;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue