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
90cf66b0
Commit
90cf66b0
authored
Aug 16, 2020
by
pali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! bluetooth: Add A2DP aptX and aptX HD codecs support
parent
0ed2f2b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/modules/bluetooth/a2dp-codec-aptx.c
src/modules/bluetooth/a2dp-codec-aptx.c
+6
-6
No files found.
src/modules/bluetooth/a2dp-codec-aptx.c
View file @
90cf66b0
...
...
@@ -204,7 +204,7 @@ static bool is_configuration_valid_hd(const uint8_t *config_buffer, uint8_t conf
return
is_configuration_valid_common
(
&
config
->
aptx
,
APTX_HD_VENDOR_ID
,
APTX_HD_CODEC_ID
);
}
static
bool
fill_preferred_configuration_common
(
const
pa_sample_spec
*
default_sample_spec
,
const
a2dp_aptx_t
*
capabilities
,
a2dp_aptx_t
*
config
,
uint32_t
vendor_id
,
uint16_t
codec_id
)
{
static
int
fill_preferred_configuration_common
(
const
pa_sample_spec
*
default_sample_spec
,
const
a2dp_aptx_t
*
capabilities
,
a2dp_aptx_t
*
config
,
uint32_t
vendor_id
,
uint16_t
codec_id
)
{
int
i
;
static
const
struct
{
...
...
@@ -219,14 +219,14 @@ static bool fill_preferred_configuration_common(const pa_sample_spec *default_sa
if
(
A2DP_GET_VENDOR_ID
(
capabilities
->
info
)
!=
vendor_id
||
A2DP_GET_CODEC_ID
(
capabilities
->
info
)
!=
codec_id
)
{
pa_log_error
(
"No supported vendor codec information"
);
return
false
;
return
-
1
;
}
config
->
info
=
A2DP_SET_VENDOR_ID_CODEC_ID
(
vendor_id
,
codec_id
);
if
(
!
(
capabilities
->
channel_mode
&
APTX_CHANNEL_MODE_STEREO
))
{
pa_log_error
(
"No supported channel modes"
);
return
false
;
return
-
1
;
}
config
->
channel_mode
=
APTX_CHANNEL_MODE_STEREO
;
...
...
@@ -253,7 +253,7 @@ static bool fill_preferred_configuration_common(const pa_sample_spec *default_sa
}
}
return
true
;
return
0
;
}
static
uint8_t
fill_preferred_configuration
(
const
pa_sample_spec
*
default_sample_spec
,
const
uint8_t
*
capabilities_buffer
,
uint8_t
capabilities_size
,
uint8_t
config_buffer
[
MAX_A2DP_CAPS_SIZE
])
{
...
...
@@ -267,7 +267,7 @@ static uint8_t fill_preferred_configuration(const pa_sample_spec *default_sample
pa_zero
(
*
config
);
if
(
!
fill_preferred_configuration_common
(
default_sample_spec
,
capabilities
,
config
,
APTX_VENDOR_ID
,
APTX_CODEC_ID
))
if
(
fill_preferred_configuration_common
(
default_sample_spec
,
capabilities
,
config
,
APTX_VENDOR_ID
,
APTX_CODEC_ID
)
<
0
)
return
0
;
return
sizeof
(
*
config
);
...
...
@@ -284,7 +284,7 @@ static uint8_t fill_preferred_configuration_hd(const pa_sample_spec *default_sam
pa_zero
(
*
config
);
if
(
!
fill_preferred_configuration_common
(
default_sample_spec
,
&
capabilities
->
aptx
,
&
config
->
aptx
,
APTX_HD_VENDOR_ID
,
APTX_HD_CODEC_ID
))
if
(
fill_preferred_configuration_common
(
default_sample_spec
,
&
capabilities
->
aptx
,
&
config
->
aptx
,
APTX_HD_VENDOR_ID
,
APTX_HD_CODEC_ID
)
<
0
)
return
0
;
return
sizeof
(
*
config
);
...
...
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