projects
/
platform
/
upstream
/
bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b35372a
)
audio/transport: Don't set volume if it's invalid
author
Archie Pusaka
<apusaka@chromium.org>
Tue, 1 Sep 2020 04:00:00 +0000
(12:00 +0800)
committer
Ayush Garg
<ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:32 +0000
(19:08 +0530)
Adding a check inside media_transport_update_volume to prevent
the volume being updated with an invalid value.
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
profiles/audio/transport.c
patch
|
blob
|
history
diff --git
a/profiles/audio/transport.c
b/profiles/audio/transport.c
index
bb5354c
..
04d8ea8
100644
(file)
--- a/
profiles/audio/transport.c
+++ b/
profiles/audio/transport.c
@@
-1069,6
+1069,9
@@
void media_transport_update_volume(struct media_transport *transport,
{
struct a2dp_transport *a2dp = transport->data;
+ if (volume < 0)
+ return;
+
/* Check if volume really changed */
if (a2dp->volume == volume)
return;