Giter Site home page Giter Site logo

emtee40 / pulseaudio-modules-bt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ehfive/pulseaudio-modules-bt

0.0 0.0 0.0 303 KB

Adds Sony LDAC, aptX, aptX HD, AAC codecs (A2DP Audio) support to PulseAudio on Linux

License: GNU Lesser General Public License v2.1

CMake 1.08% M4 12.07% Makefile 16.46% C 70.39%

pulseaudio-modules-bt's Introduction

pulseaudio-modules-bt

this repo is a fork of pulseaudio bluetooth modules

and add LDAC, APTX, APTX-HD, AAC support

Added Codecs

Codec Encoding(source role) Decoding(sink role) Sample format Sample frequnecy
AAC s16,s32 8..96 khz
APTX s16 16..48 khz
APTX HD s24 16..48 khz
LDAC s16,s24,s32,f32 44.1..96 khz

APTX/APTX_HD sample format fixed to s32 in PA.

Usage

Packages

wiki/Packages

also check #3

General Installation

For packager, developer, other PA version user:

I also create patch files, you can find them in releases. Apply patches and recompile/repackage pulseaudio.

And you may use my CmakeList.txt (may also needs modifications) as well, just copy out patched files to src dir and keep file structure.

Make Dependencies

  • pulseaudio,libpulse~=12.0
  • bluez-libs/libbluetooth~=5.0
  • libdbus
  • ffmpeg(libavcodec>=58, libavutil>=56) >= 4.0
  • libsbc
  • libfdk-aac
  • libtool
  • cmake
  • pkg-config

Runtime Dependencies

  • pulseaudio
  • bluez
  • dbus
  • sbc
  • libfdk-aac
  • [Optional] ffmpeg(libavcodec, libavutil) --- APTX, APTX-HD support
  • [Optional] ldacBT_enc.so ldacBT_abr.so --- LDAC encoding support, LDAC ABR support

Note: CMakeLists.txt check if ldacBT installed; If not, it will build libldac and install libldac to PA modules dir.

backup original pulseaudio bt modules

MODDIR=`pkg-config --variable=modlibexecdir libpulse`

sudo find $MODDIR -regex ".*\(bluez5\|bluetooth\).*\.so" -exec cp {} {}.bak \;

install

git clone https://github.com/EHfive/pulseaudio-modules-bt.git
cd pulseaudio-modules-bt
git submodule update --init

git -C pa/ checkout v`pkg-config libpulse --modversion|sed 's/[^0-9.]*\([0-9.]*\).*/\1/'`

mkdir build && cd build
cmake ..
make
sudo make install

Load Modules

pulseaudio -k

# if pulseaudio not restart automatically, run
pulseaudio --start

then connect your bluetooth device and switch audio profile to 'A2DP Sink'

if there is only profile 'HSP/HFP' and 'off', disconnect and reconnect your device

" When the device connects automatically (by powering on after being paired) A2DP is 'unavailable' " -----Issue: cannot select a2dp profile

as an alternative, you can fix it with this udev script

Module Aruguments

module-bluez5-discover arg:a2dp_config

Key Value Desc Default
ldac_eqmid hq LDAC High Quality auto
sq LDAC Standard Quality
mq LDAC Mobile use Quality
auto /abr LDAC Adaptive Bit Rate
ldac_fmt s16 16-bit signed (little endian) auto
s24 24-bit signed
s32 32-bit signed
f32 32-bit float
auto Ref default-sample-format
aac_bitrate_mode [1, 5] Variable Bitrate (VBR) 5
0 Constant Bitrate (CBR)
aac_after_buffer <on/off> Enable/Disable AAC encoder afterburner feature off
aac_fmt s16 16-bit signed (little endian) auto
s32 32-bit signed
auto Ref default-sample-format

config

edit /etc/pulse/default.pa

append arguments to 'load-module module-bluetooth-discover'

(module-bluetooth-discover pass all arguments to module-bluez5-discover)

# LDAC Standard Quality
load-module module-bluetooth-discover a2dp_config="ldac_eqmid=sq"

# LDAC High Quality; Force LDAC/PA PCM sample format as Float32LE
#load-module module-bluetooth-discover a2dp_config="ldac_eqmid=hq ldac_fmt=f32"

equivalent to commands below if you do not use 'module-bluetooth-discover'

load-module module-bluez5-discover a2dp_config="ldac_eqmid=sq"

#load-module module-bluez5-discover a2dp_config="ldac_eqmid=hq ldac_fmt=f32"

Others

see Wiki

TODO

add ldac abr (Adaptive Bit Rate) supprot

add APTX , APTX HD Codec support using ffmpeg

add AAC support using Fraunhofer FDK AAC codec library

pulseaudio-modules-bt's People

Contributors

dabukalam avatar ehfive avatar hexchain avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.