Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
From: "Arun Raghavan" <arun@arunraghavan.net>
To: linux-bluetooth@vger.kernel.org
Subject: bluez: avrcp: Initial value of absolute volume
Date: Wed, 12 Jun 2019 09:25:48 +0200
Message-ID: <cf3918b9-37d1-4b5e-a13d-5f16942de35a@www.fastmail.com> (raw)

Hello,
I'm using BlueZ as A2DP Sink and AVRCP controller on my laptop, and had a question about how absolute volume should work when I connect a phone to my laptop.

I notice in btmon that at connection time, the phone sends a register notification for the absolute volume event, and BlueZ responds with a current absolute volume of 100%. In the code, this seems to be initialised at media_transport_init_sink() and the initial volume is hard-coded to 127.

What this means is that after my initial connection to the device, I set some volume, disconnect and reconnect, and the volume is now 100% and any changes on the phone cause the device to play at full volume.

I can, of course, set a volume as soon as the transport is created from the client side, but it seems wrong to me that we communicate an incorrect initial value.

Am I missing something? If not, perhaps we can allow an initial volume to be passed during SetConfiguration so that the transport is initialised with the correct volume?

Cheers,
Arun

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf3918b9-37d1-4b5e-a13d-5f16942de35a@www.fastmail.com \
    --to=arun@arunraghavan.net \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org linux-bluetooth@archiver.kernel.org
	public-inbox-index linux-bluetooth


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/ public-inbox