bluetooth: show negotiated HFP codec

While codec switching for HFP is not implemented, show current codec via
messaging api.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
This commit is contained in:
Igor V. Kovalenko 2021-02-22 23:14:37 +03:00 committed by PulseAudio Marge Bot
parent f0d32e9454
commit ddad63a23c
3 changed files with 53 additions and 18 deletions

View file

@ -80,6 +80,15 @@ const pa_a2dp_codec *pa_bluetooth_a2dp_codec_iter(unsigned int i) {
return pa_a2dp_codecs[i];
}
unsigned int pa_bluetooth_hf_codec_count(void) {
return PA_ELEMENTSOF(pa_hf_codecs);
}
const pa_a2dp_codec *pa_bluetooth_hf_codec_iter(unsigned int i) {
pa_assert(i < pa_bluetooth_hf_codec_count());
return pa_hf_codecs[i];
}
const pa_a2dp_codec *pa_bluetooth_get_hf_codec(const char *name) {
unsigned int i;