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

Commit f2b6303d authored by Vaibhav Agarwal's avatar Vaibhav Agarwal Committed by Greg Kroah-Hartman
Browse files

greybus: Remove apbridgea_shutdown_xx sequence if already done



While reordering gb_deactivate sequence to avoid protocol error this was
mistakenly added even during shutdown_tx/rx. It is supposed to be done
immediately after stop_tx and only once.

Fixes: 739f25d5f490 ("audio: Reorder gb_deactivate sequence to avoid protocol error")
Signed-off-by: default avatarVaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewed-by: default avatarMark Greer <mgreer@animalcreek.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 27c243cf
Loading
Loading
Loading
Loading
+0 −12
Original line number Original line Diff line number Diff line
@@ -396,12 +396,6 @@ static int gbmodule_shutdown_tx(struct gbaudio_module_info *module,
		return 0;
		return 0;
	}
	}


	if (codec_state == GBAUDIO_CODEC_STOP) {
		ret = gb_audio_apbridgea_shutdown_tx(data->connection, 0);
		if (ret)
			return ret;
	}

	/* deactivate */
	/* deactivate */
	cportid = data->connection->intf_cport_id;
	cportid = data->connection->intf_cport_id;
	if (module_state >= GBAUDIO_CODEC_PREPARE) {
	if (module_state >= GBAUDIO_CODEC_PREPARE) {
@@ -435,12 +429,6 @@ static int gbmodule_shutdown_rx(struct gbaudio_module_info *module,
		return 0;
		return 0;
	}
	}


	if (codec_state == GBAUDIO_CODEC_STOP) {
		ret = gb_audio_apbridgea_shutdown_rx(data->connection, 0);
		if (ret)
			return ret;
	}

	/* deactivate */
	/* deactivate */
	cportid = data->connection->intf_cport_id;
	cportid = data->connection->intf_cport_id;
	if (module_state >= GBAUDIO_CODEC_PREPARE) {
	if (module_state >= GBAUDIO_CODEC_PREPARE) {