INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Three Distinct Bluetooth Issues JRM25 on Raspbian Stretch  (Read 1639 times)

Sammy

  • Regular Member
  • Recent member
  • *
  • Posts: 16
  • nothing more to say...
Three Distinct Bluetooth Issues JRM25 on Raspbian Stretch
« on: December 14, 2019, 07:32:16 am »

I have been running JRM for several years on a Raspberry Pi and loving it.  I have a huge SD card with all my uncompressed music and when not at home running on my tube DAC I can easily take it with me and find a bluetooth speaker to play it through.  Well that is where the trouble begins.....

--- Issue 1: Can't use standard Bluetooth support in Raspbian Stretch ---

There seems to be no way to play through the system default device device when the speaker is set to Bluetooth even through other software such as the browser and aplay can do so. When I play through the default device with APlay and have the default device set to the bluetooth device it works perfectly and plays through the bluetooth speaker but when JRM is set to the default device it continues to play through the analog port on the pi.  This means you have to jump through crazy hoops to define your own ALSA bluetooth device in
 /usr/share/alsa/alsa.conf.d/20-bluealsa.conf and then manually pair it using the command line bluetoothctl program or as I did write a script to pair it when the pi boots.  Needless to say it takes awhile to set up a new bluetooth device.

--- Issue 2: Only plays at 48KHZ and not 41.1KHZ

Once you get your device setup it only plays at 48KHZ.  If you try to play without changing the output format JRiver reports this error in the log.
Code: [Select]
0009453: 1698677776: Playback: CALSAPlugin::OpenALSA: Start
0009454: 1698677776: Playback: CALSAPlugin::OpenALSA: Opened audio device Zepplin
0009454: 1698677776: Playback: CALSAPlugin::OpenALSA: m_afOutput claims the file to play is NOT DSD
0009454: 1698677776: Playback: CALSAPlugin::OpenALSA: Try to open various PCM output formats
0009454: 1698677776: Playback: CALSAPlugin::OpenALSA: Opened device at bitdepth S16_LE
0009455: 1698677776: Playback: CALSAPlugin::OpenALSA: Failed to get desired sample rate (44100): Invalid argument
0009455: 1698677776: Playback: CALSAPlugin::OpenALSA: Failed to set desired sample rate (44100), Invalid argument. Supported = 48000
0009455: 1698677776: Playback: CALSAPlugin::OpenALSA: Finish (1 ms)
0009455: 1698677776: Playback: CALSAPlugin::Open: Finish (2 ms)

Yet if you ask what sample rates it supports it says it supports 44.1KHZ
Code: [Select]
pi@raspberrypi:~ $ /usr/lib/jriver/Media\ Center\ 25/alsacap -d Zepplin
*** Exploring configuration space of device `Zepplin' for playback ***
1..10000 channels
sampling rates 8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000 Hz
    Sample formats: S8, U8, S16_LE, S16_BE, U16_LE, U16_BE, S24_LE, S24_BE, U24_LE, U24_BE, S32_LE, S32_BE, U32_LE, U32_BE, FLOAT_LE, FLOAT_BE, FLOAT64_LE, FLOAT64_BE, MU_LAW, A_LAW, IMA_ADPCM, S24_3LE, S24_3BE, U24_3LE, U24_3BE, S20_3LE, S20_3BE, U20_3LE, U20_3BE, S18_3LE, S18_3BE, U18_3LE, U18_3BE

So you are obliged to use the format options in JRM to resample 44100 -> 48000 which is far from optimum.  But at least it plays until . . .

--- Issue 2: JRM playback hangs when it tries to play the second song in a playlist

This issue started happening regularly for me recently.  When I first set it up it was intermittent.  You start a playlist.  It plays the first song and as soon as it starts to play the second one playback is hung with no errors in the log.  If you stop and start again the second song plays.  One thing I notice is that there is not a lot of extra memory and in the log I do get this and am wondering if the fact that JRM claims the output format is 48,000KHZ at 64 bits this is causing a lot of buffer space to be consumed and it can't allocate a second buffer as I imagine it does when switching songs.

Code: [Select]
3528414: 1662194704: Playback: CMJWaveFeeder::Thread: Memory playback: 0; Maximum play buffer bytes: 268435456; Grow by bytes: 33554432; System available bytes: 56913920

System Info:
Code: [Select]
Media Center
    Install Path: /usr/lib/jriver/Media Center 24/
    JRMark: never run
    Library: 15060 files, 2.2 MB in library, 48.1 MB in thumbnails
Memory & CPU
    CPU features: NEON
    Memory Available:  666 MB
    Memory Size:       901 MB
    Total Logical Cores: 4
Operating System
    Linux - ARM
Power
    No entries that affect the system power state

Code: [Select]
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

Happy to help in any way to diagnose these issues if that means running scripts or otherwise getting my software engineering hands dirty.  Thanks in advance for any help on this.

 
Logged
Pages: [1]   Go Up