Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marijn Suijten
pulseaudio
Commits
6fdce1c1
Commit
6fdce1c1
authored
May 15, 2020
by
pali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! bluetooth: Implement changing softvolume state of bluetooth transports
parent
5999799e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
src/modules/bluetooth/module-bluez5-device.c
src/modules/bluetooth/module-bluez5-device.c
+4
-8
No files found.
src/modules/bluetooth/module-bluez5-device.c
View file @
6fdce1c1
...
...
@@ -988,9 +988,6 @@ static void source_set_volume_cb(pa_source *s) {
pa_assert
(
u
);
pa_assert
(
u
->
source
==
s
);
if
(
u
->
transport
->
set_rx_volume_gain
==
NULL
)
return
;
gain
=
(
pa_cvolume_max
(
&
s
->
real_volume
)
*
u
->
transport
->
max_rx_volume_gain
)
/
PA_VOLUME_NORM
;
if
(
gain
>
u
->
transport
->
max_rx_volume_gain
)
...
...
@@ -1010,7 +1007,8 @@ static void source_set_volume_cb(pa_source *s) {
else
pa_cvolume_reset
(
&
s
->
soft_volume
,
u
->
decoder_sample_spec
.
channels
);
u
->
transport
->
set_rx_volume_gain
(
u
->
transport
,
gain
);
if
(
u
->
transport
->
set_rx_volume_gain
)
u
->
transport
->
set_rx_volume_gain
(
u
->
transport
,
gain
);
}
/* Run from main thread */
...
...
@@ -1157,9 +1155,6 @@ static void sink_set_volume_cb(pa_sink *s) {
pa_assert
(
u
);
pa_assert
(
u
->
sink
==
s
);
if
(
u
->
transport
->
set_tx_volume_gain
==
NULL
)
return
;
gain
=
(
pa_cvolume_max
(
&
s
->
real_volume
)
*
u
->
transport
->
max_tx_volume_gain
)
/
PA_VOLUME_NORM
;
if
(
gain
>
u
->
transport
->
max_tx_volume_gain
)
...
...
@@ -1179,7 +1174,8 @@ static void sink_set_volume_cb(pa_sink *s) {
else
pa_cvolume_reset
(
&
s
->
soft_volume
,
u
->
encoder_sample_spec
.
channels
);
u
->
transport
->
set_tx_volume_gain
(
u
->
transport
,
gain
);
if
(
u
->
transport
->
set_tx_volume_gain
)
u
->
transport
->
set_tx_volume_gain
(
u
->
transport
,
gain
);
}
/* Run from main thread */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment