New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feasibility to implement a command line parameter to disable volume control. #125
Comments
It is possible to implement a parameter in blue-alsa command line to disable volume control when used as a sink device? |
What do you mean by "disable volume control"? Could you specify exact usecase? Also, I'm not able to test it properly, because my smarphone does not communicate well with bluez and volume control works fine on the smartphone site (AVRCP volume command is not sent to PC). Anyway, AVRCP communication is beyond the scope of bluez-alsa. Take a look at this fork: https://github.com/hmbedded/bluez-alsa |
I'm sorry, I understand I was not so clear. |
I have implemented a volume control based on @hmbedded 's fork: https://github.com/joerg-krause/bluez-alsa/tree/volume. The volume is set at the beginning of a transport session to the current volume of the Mixer element passed via the
With volume control, if the transport volume is changed, e.g. on the iPhone, the ALSA mixers control volume is changed. If the volume is changed on the device, e.g. by hardware buttons or via amixer, the transport value is updated, too. EDIT: fix bluealsa-aplay command line parameters |
Hi Joerg, In this way: In this way: |
So your Is your |
Ok I tried also this setup: Always Master to 100% (with bluealsa-aplay shut down Master was is 57%), no changes on Channels channel when I change volume on my Iphone |
I will create a separate branch with includes more debug messages in the next days. Maybe we can find why it is not working for you. |
@badbat75 I've reworked the volume handling. Feel free to test it using the separate volume2 branch of my fork: https://github.com/joerg-krause/bluez-alsa/tree/volume2 |
Hi @joerg-krause , thank you for your effort but unfortunately but the situation is the same as my previous post... |
I've reworked the volume control again. If anybody is interested in testing please try: https://github.com/joerg-krause/bluez-alsa/tree/volume. Note, that the branch is not rebased on Arkqs master branch, yet. |
Sadly I have to say that behaviour didn't change. Hardware volume 100% and no control on it. |
@badbat75 Can you please provide your alsa.conf and how you start bluealsa and bluealsa-aplay? |
Those are my commands:
And those alsa.conf and all conf.d
|
@badbat75 The 5122 shows up like this:
The 5102 shows no mixer capability. No listing on alsamixer or amixer and will require the phone to modulate volume. I want to have the phone volume control to directly control the mixer volume control on my i2s chip. Will this allow this? I do not know how this would work... This is how shairport-sync and upmpdcli interacts with the i2s cards. |
I am using the TI PCM5102 as well. I can control the volume using the ALSA softvol plugin. Amixer is showing this:
|
@badbat75 I do not see any ALSA mixer control configuration in your configuration. What is the output of |
Don't have an asound.conf. Never had one or needed one. I run mpd/upmpdcli and shairport-sync on these pis and have no problem controlling the volume as long as it is set properly. With the PCM5102, (in Shairport-sync) the access to the alsa device requires: With the PCM5122, (alsin in Shairport-sync): I'm not that knowledgeable about how this all works, but this is what I have learned, that I need to specify the mixer device to get the volume to work correctly with the 5122 and the 5102 requires that I comment out all references to the mixer to get it to work. |
Joerg I replied in the 3rd April post. |
@badbat75 Sorry for not replying earlier... From what I can see I guess you are using Moode Audio. What DAC does your system has? What is the output of |
@joerg-krause I happened across this issue and your fork when searching for a solution to this very problem. How much would it take to merge new bluez-alsa changes to your fork? I'm pretty interested in testing this. |
Hi @tuomashamalainen , thanks for your interest! I rebase my branch from time to time. My latested private branch is somewhere between v2.1.0 and master. I will publish it soon. |
This is my volume branch based on v2.1.0 including some follow up fixes: https://github.com/joerg-krause/bluez-alsa/tree/volume-v2.1.0. |
Thanks Jörg, will give this a go with a Beocreate 4-Channel Amplifier. |
@joerg-krause, testing this just now and the volume sync works great, both ways. Thanks again. We would love to include this in HiFiBerryOS/Beocreate 2 if you've got no objections. |
I'm glad it works! This encourages me to make a pull request 😄 I have no objections, you are welcome to add it to HiFiBerryOS. |
@tuomashamalainen I rebased the commits to latest upstream master. Mind to test the branch https://github.com/joerg-krause/bluez-alsa/tree/alsa-volume-control, so I can prepare a PR? Thanks! Note, that the ALSA PCM device parameter has changed in bluez-alsa from |
@joerg-krause Latest commit on this branch is from September last year. Is this correct? |
Yes, it is the date of when the commit was created. I rebased the commits on top of master. |
I was using my own rebased version, but I built yours, and it appears to be working fine. |
@joerg-krause Yes, seems to work here. |
@arkq Can you implement this in the current git? |
Thanks @paul-1 , @hifiberry for testing. @gearhead I'm preparing a PR soon, so @arkq can review the code. |
I've rebased the branch again on latest master branch and changed the command line option to |
With bluez >= 5.55, there is a fix for reporting volume for headsets, and in the current master of bluez-alsa, there is a fix for correct volume scaling (gauge on smartphone, e.g. iPhone, and volume on host with bluez-alsa should match). Please, check whether right now the volume control is as expected. As for the issue request for disabling volume scaling. There is a possibility to disable software volume scaling with D-Bus call. The SoftVolume property of the PCM endpoint: https://github.com/Arkq/bluez-alsa/blob/a255e2483319b2eca7d50bd94a2e63dec3f28b9c/doc/bluealsa-api.txt#L110-L115 Because the requested feature has been implemented, I'm closing this issue. Discussion for volume forwarding between ALSA mixer and Bluetooth device, please continue in the PR #321 or #390. |
When bluealsa-aplay is started volume of reproduction device go to 100%.
There's no way to control it by remote device and volume control can't be disabled.
The text was updated successfully, but these errors were encountered: