[PATCH v2 1/5] android/hal-audio: Always call qos_update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As it turned out, it's better to always call update_qos and just
provide dummy callback from codecs which do not support it.
---
 android/hal-audio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/android/hal-audio.c b/android/hal-audio.c
index 8b82498..f15e767 100644
--- a/android/hal-audio.c
+++ b/android/hal-audio.c
@@ -544,8 +544,7 @@ static bool resume_endpoint(struct audio_endpoint *ep)
 	ep->samples = 0;
 	ep->resync = false;
 
-	if (ep->codec->update_qos)
-		ep->codec->update_qos(ep->codec_data, QOS_POLICY_DEFAULT);
+	ep->codec->update_qos(ep->codec_data, QOS_POLICY_DEFAULT);
 
 	return true;
 }
@@ -704,8 +703,7 @@ static bool write_data(struct a2dp_stream_out *out, const void *buffer,
 			if (diff > MAX_DELAY) {
 				warn("lag is %jums, resyncing", diff / 1000);
 
-				if (ep->codec->update_qos)
-					ep->codec->update_qos(ep->codec_data,
+				ep->codec->update_qos(ep->codec_data,
 							QOS_POLICY_DECREASE);
 				ep->resync = true;
 			}
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux