diff mbox series

[v2,1/1] package/bluez-alsa: allow a samplerate conversion for audio playback

Message ID 20230702201736.72396-1-ckhardin@gmail.com
State Accepted
Headers show
Series [v2,1/1] package/bluez-alsa: allow a samplerate conversion for audio playback | expand

Commit Message

Charles Hardin July 2, 2023, 8:17 p.m. UTC
In the case of the bluetooth audio then incoming stream will be coming
from bluetooth devices at varying sample rates like (44.1, 48, 96, 192 kHz)
and the odds of a sound device matching that samplerate exactly
is a bit slim. So in the case of a bluez audio playback the system will
need to do a samplerate conversion.

Thus when enabling bluez-alsa and the alsa plugins select libsamplerate
to support the shift from the incoming samplerates to an often fix-rated
audio device.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
---
Changes v1 -> v2:
  - moved the samplerate selection to bluez-alsa

 package/bluez-alsa/Config.in | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Petazzoni July 3, 2023, 7:17 p.m. UTC | #1
On Sun,  2 Jul 2023 13:17:36 -0700
Charles Hardin <ckhardin@gmail.com> wrote:

> In the case of the bluetooth audio then incoming stream will be coming
> from bluetooth devices at varying sample rates like (44.1, 48, 96, 192 kHz)
> and the odds of a sound device matching that samplerate exactly
> is a bit slim. So in the case of a bluez audio playback the system will
> need to do a samplerate conversion.
> 
> Thus when enabling bluez-alsa and the alsa plugins select libsamplerate
> to support the shift from the incoming samplerates to an often fix-rated
> audio device.
> 
> Signed-off-by: Charles Hardin <ckhardin@gmail.com>
> ---
> Changes v1 -> v2:
>   - moved the samplerate selection to bluez-alsa

I've added a small comment in the Config.in file to explain this
select, and applied. Thanks!

Thomas
diff mbox series

Patch

diff --git a/package/bluez-alsa/Config.in b/package/bluez-alsa/Config.in
index 73ae3d5333..748c4b8820 100644
--- a/package/bluez-alsa/Config.in
+++ b/package/bluez-alsa/Config.in
@@ -13,6 +13,7 @@  config BR2_PACKAGE_BLUEZ_ALSA
 	select BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_AUDIO
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_SBC
+	select BR2_PACKAGE_LIBSAMPLERATE if BR2_PACKAGE_ALSA_PLUGINS
 	help
 	  Bluetooth Audio ALSA Backend.