All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bluez PATCH v2] audio/transport: Don't set volume if it's invalid
@ 2020-09-01  4:00 Archie Pusaka
  2020-09-11 12:50 ` Archie Pusaka
  2020-09-11 15:43 ` Luiz Augusto von Dentz
  0 siblings, 2 replies; 3+ messages in thread
From: Archie Pusaka @ 2020-09-01  4:00 UTC (permalink / raw)
  To: linux-bluetooth, Luiz Augusto von Dentz; +Cc: CrosBT Upstreaming, Archie Pusaka

From: Archie Pusaka <apusaka@chromium.org>

Adding a check inside media_transport_update_volume to prevent
the volume being updated with an invalid value.
---

Changes in v2:
* Move the check from media.c:set_configuration

 profiles/audio/transport.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index a2c4f7dfb..dd1c553a2 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
@@ -941,6 +941,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;
-- 
2.28.0.402.g5ffc5be6b7-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Bluez PATCH v2] audio/transport: Don't set volume if it's invalid
  2020-09-01  4:00 [Bluez PATCH v2] audio/transport: Don't set volume if it's invalid Archie Pusaka
@ 2020-09-11 12:50 ` Archie Pusaka
  2020-09-11 15:43 ` Luiz Augusto von Dentz
  1 sibling, 0 replies; 3+ messages in thread
From: Archie Pusaka @ 2020-09-11 12:50 UTC (permalink / raw)
  To: linux-bluetooth, Luiz Augusto von Dentz; +Cc: CrosBT Upstreaming, Archie Pusaka

Hi Bluez maintainers,

Could you take another look at this patch?

Thanks,
Archie

On Tue, 1 Sep 2020 at 12:00, Archie Pusaka <apusaka@google.com> wrote:
>
> From: Archie Pusaka <apusaka@chromium.org>
>
> Adding a check inside media_transport_update_volume to prevent
> the volume being updated with an invalid value.
> ---
>
> Changes in v2:
> * Move the check from media.c:set_configuration
>
>  profiles/audio/transport.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
> index a2c4f7dfb..dd1c553a2 100644
> --- a/profiles/audio/transport.c
> +++ b/profiles/audio/transport.c
> @@ -941,6 +941,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;
> --
> 2.28.0.402.g5ffc5be6b7-goog
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bluez PATCH v2] audio/transport: Don't set volume if it's invalid
  2020-09-01  4:00 [Bluez PATCH v2] audio/transport: Don't set volume if it's invalid Archie Pusaka
  2020-09-11 12:50 ` Archie Pusaka
@ 2020-09-11 15:43 ` Luiz Augusto von Dentz
  1 sibling, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2020-09-11 15:43 UTC (permalink / raw)
  To: Archie Pusaka; +Cc: linux-bluetooth, CrosBT Upstreaming, Archie Pusaka

Hi Archie,

On Mon, Aug 31, 2020 at 9:00 PM Archie Pusaka <apusaka@google.com> wrote:
>
> From: Archie Pusaka <apusaka@chromium.org>
>
> Adding a check inside media_transport_update_volume to prevent
> the volume being updated with an invalid value.
> ---
>
> Changes in v2:
> * Move the check from media.c:set_configuration
>
>  profiles/audio/transport.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
> index a2c4f7dfb..dd1c553a2 100644
> --- a/profiles/audio/transport.c
> +++ b/profiles/audio/transport.c
> @@ -941,6 +941,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;
> --
> 2.28.0.402.g5ffc5be6b7-goog
>

Applied, thanks.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-11 15:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-01  4:00 [Bluez PATCH v2] audio/transport: Don't set volume if it's invalid Archie Pusaka
2020-09-11 12:50 ` Archie Pusaka
2020-09-11 15:43 ` Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.