Page 1 of 1
Call Volume
Posted: Thu Oct 02, 2025 9:03 pm
by ElmodiLatta
Hi, I wanted to know if it was possible to increase the volume of phone calls without increasing the volume of the music?
Re: Call Volume
Posted: Thu Oct 02, 2025 10:34 pm
by hudiy
Phone call audio is a sink input created by the PipeWire and OFono. You can change the volume of sink input by pactl set-sink-input-volume command.
When the phone call is active, find its sink input using pactl list sink-inputs command, note the id and increase the volume to e. g. 200% by pactl set-sink-input-volume id 200%.
Re: Call Volume
Posted: Mon Nov 24, 2025 7:24 am
by ElmodiLatta
Hi, with this pactl set-sink-volume hudy equalizer sink command, I lower and raise the audio volume. Is there a command that lowers or raises the music volume but not the phone volume? Now, when I put the car in reverse, the music volume goes down, but if I'm on the phone, it goes down as well. Are there two separate commands to manage the volumes?
Thanks
Re: Call Volume
Posted: Mon Nov 24, 2025 8:47 am
by hudiy
How is your reverse camera connected to the Raspberry Pi and how are you displaying the image in Hudiy (the built-in camera view or an HTML view)? Hudiy itself does not change the volume level when the reverse camera is active so it must happens somewhere in PipeWire.
Could you please send us the output of following commands with the camera turned on and then with it turned off
Code: Select all
pactl list sinks
pactl list sources
Re: Call Volume
Posted: Mon Nov 24, 2025 9:35 am
by Michal
Hello,
I dont want to interfere, but this thread may help me as well since.:
I switched from Bookworm to Trixie and did a brand new install. I noticed that Bookworm was playing music (from whatever source) a lot louder, but Trixie seems to be a lot quiter. This is not a Hudiy's fault since this behaviour is the same from the OS side (when playing music directly from Desktop).
Could this "pactl set-sink-volume" help and raise the overall volume?
All the volumes in Hudiy is set to 100% Even in the GUI when I click in the "speaker" the sliderbar is set to max.
Re: Call Volume
Posted: Mon Nov 24, 2025 9:51 am
by hudiy
Hudiy allows you to choose a specific sink for volume control.
The recommended setup is to control the volume using the audio device sink (or any remap sink, if you're using one to remap the audio device's outputs), while using the virtual sink of the equalizer (hudiy_equalizer_sink) for audio playback.
Even if the hudiy_equalizer_sink volume is set to 100%, the audio device sink may still be at 40% (the default in PipeWire). This can cause the audio to play quietly even when the equalizer sink is at full volume.
Hudiy provides configuration options to specify the name of the sink whose volume will be controlled:
https://github.com/wiboma/hudiy/blob/ma ... n.md#sound
By default it controls the volume of the default audio sink (hudiy_equalizer_sink), and the name of the audio device sink must be set manually. You can find name of your audio device sink using
pactl list sinks command, then set the name in volumeSinkName.
So the recommended setup is to keep the hudiy_equalizer_sink at 100% and control the volume using the audio device sink.
Re: Call Volume
Posted: Mon Nov 24, 2025 10:35 am
by ElmodiLatta
hudiy wrote: Mon Nov 24, 2025 8:47 am
How is your reverse camera connected to the Raspberry Pi and how are you displaying the image in Hudiy (the built-in camera view or an HTML view)? Hudiy itself does not change the volume level when the reverse camera is active so it must happens somewhere in PipeWire.
Could you please send us the output of following commands with the camera turned on and then with it turned off
Code: Select all
pactl list sinks
pactl list sources
As soon as I can, very willingly, thank you
Re: Call Volume
Posted: Tue Nov 25, 2025 12:41 am
by hudiy
ElmodiLatta wrote: Mon Nov 24, 2025 7:24 am
Hi, with this pactl set-sink-volume hudy equalizer sink command, I lower and raise the audio volume. Is there a command that lowers or raises the music volume but not the phone volume? Now, when I put the car in reverse, the music volume goes down, but if I'm on the phone, it goes down as well. Are there two separate commands to manage the volumes?
Thanks
Looks like we misunderstood the topic. So when you activate the reverse camera, your script lowers the volume of
hudiy_equalizer_sink?
If you only want to reduce the audio coming from Hudiy itself (Android Auto / Storage Music / CarPlay / FM Radio), then you should lower the volume of the individual sink inputs, not the entire sink. You can do this with a simple script, for example:
Code: Select all
#!/bin/bash
VOLUME="${1:-100%}"
pactl list sink-inputs \
| awk '
/^Sink Input #/ {
id = $3
sub("#", "", id)
}
/application.process.binary = "hudiy"/ {
print id
}
' \
| while read id; do
pactl set-sink-input-volume "$id" "$VOLUME"
done
This script finds all sink inputs with the property
application.process.binary = "hudiy" and sets their volume to the desired level.
Then you can use it like
Code: Select all
./set_hudiy_sink_inputs_volume.sh 50%
./set_hudiy_sink_inputs_volume.sh 100%
You can also check the Audio Focus API. Your case looks like the "ducking" scenario:
https://github.com/wiboma/hudiy/blob/ma ... proto#L479
https://github.com/wiboma/hudiy/blob/ma ... proto#L432
https://github.com/wiboma/hudiy/blob/ma ... cusDuck.py
Re: Call Volume
Posted: Tue Nov 25, 2025 11:18 am
by ElmodiLatta
I would like to be able to distinguish whether the audio stream I hear is a piece of music or a phone call. If it's a piece of music, I lower the volume. If it's a phone call, I don't lower the volume. I was thinking of checking either "on_phone_connection_status" or "on_phone_voice_call_status." I also saw a reply from you yesterday where you talked about "hudiy_api.MediaSource.MEDIA_SOURCE_FM_RADIO." Maybe there's a "hudiy_api.MediaSource.MEDIA_SOURCE_PHONE" that I can use. I didn't have time to check yesterday. I'm dedicating myself to this hobby over the weekend.
Re: Call Volume
Posted: Tue Nov 25, 2025 11:33 am
by hudiy
ElmodiLatta wrote: Tue Nov 25, 2025 11:18 am
I would like to be able to distinguish whether the audio stream I hear is a piece of music or a phone call. If it's a piece of music, I lower the volume. If it's a phone call, I don't lower the volume. I was thinking of checking either "on_phone_connection_status" or "on_phone_voice_call_status." I also saw a reply from you yesterday where you talked about "hudiy_api.MediaSource.MEDIA_SOURCE_FM_RADIO." Maybe there's a "hudiy_api.MediaSource.MEDIA_SOURCE_PHONE" that I can use. I didn't have time to check yesterday. I'm dedicating myself to this hobby over the weekend.
That is exactly what the AudioFocusReceiver and ducking are for.
When music is playing and ducking is requested, the music volume is lowered. Once ducking is released, the volume is restored. An example of this is navigation guidance - you can observe the music volume lowering while the guidance is playing.
Communication streams (such as phone calls) have a higher priority than any other streams (music or ducked ones), so requesting ducking while a call is active will not affect its volume.
You can simply run the example we mentioned in the previous post and see for yourself how Hudiy behaves with ducking for different audio streams - this should give you a better picture of how it works.