GioF71 / tidal-connect

Simple script for configuring Tidal Connect with Docker (also on Volumio, moOde, OSMC)
MIT License
80 stars 6 forks source link

No audio on moodeaudio #70

Closed dermanu closed 9 months ago

dermanu commented 10 months ago

Hi, I have an odd issue. The client is showing up in the Tidal app, and I can connect. However, I do not hear anything. If I know to connect to my MoOde using Bluetooth it outputs audio, but I can not control the volume.

I have Moodeaudio 8.3.6 running on a Pi-3B 1.2 1GB using a JustBoom DAC Hat.

The log file is:

RIENDLY_NAME=Moode Tidal                                                                     
MODEL_NAME=Raspberry Pi                                                                       
MQA_CODEC=false                                                                               
MQA_PASSTHROUGH=false                                                                         
CARD_NAME=sndrpijustboomd                                                                     
CARD_INDEX=                                                                                   
Specified CARD_NAME=[sndrpijustboomd]                                                         
Found audio device [sndrpijustboomd] as index [0]                                             
Creating sound configuration file (card_index=0)...                                           
Sound configuration file created.                                                             
defaults.pcm.card 0                                                                           
pcm.!default {                                                                                
  type plug                                                                                   
  slave.pcm hw                                                                                
}                                                                                             
PLAYBACK_DEVICE=[default]                                                                     
Starting Speaker Application in Background (TMUX)                                             
Sleeping for a while (3 seconds)...                                                           
Starting TIDAL Connect ...                                                                    
STARTING TidalConnect services, version: 1.1.3                                                
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front                       
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear                        
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe                  
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side                        
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21                  
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21                  
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40                  
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41                  
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50                  
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51                  
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71                  
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958                      
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958                      
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958                      
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi                        
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi                        
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem                       
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem                       
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline                   
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline                   
Cannot connect to server socket err = No such file or directory                               
Cannot connect to server request channel                                                      
jack server is not running or cannot be started                                               
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock             
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock             
STARTED TidalConnect services.                                                                
[2023-12-07 19:01:49.183] [tisoc] [warning] [PlaybackControllerImpl.cpp:472] Illegal state:1
[2023-12-07 19:01:50.303] [tisoc] [warning] [logger.cpp:22] [audio_worker.cpp:321] Attempting 
to initialize a decoder without initial data!                                                 
[2023-12-07 19:04:43] [error] handle_read_frame error: asio.system:104 (Connection reset by pe
er)                                                                                           
[2023-12-07 19:04:43] [info] asio async_shutdown error: asio.system:32 (Broken pipe)          

Thanks for your help!

GioF71 commented 10 months ago

Hello, I am not sure what you mean with

If I know to connect to my MoOde using Bluetooth it outputs audio, but I can not control the volume.

But, about the volume, assuming you are trying to play to an alsa device (and not to bluetooth), maybe check with alsamixer if the volume is at 100%.

Can you also post the output of

cat /proc/asound/cards

Thank you

dermanu commented 10 months ago

Oh wow, that was fast. If connected to Moodle using Bluetooth, tidal-connect plays music, but the volume can't be controlled (in Android) and is at 100%.

 0 [sndrpijustboomd]: JustBoomDac - snd_rpi_justboom_dac                                      
                      snd_rpi_justboom_dac 
dermanu commented 10 months ago

I also got this now added to the log file:

[2023-12-07 19:43:26.907] [tisoc] [error] [avahiImpl.cpp:113]  avahiClientCallback() AVAHI_CLI
ENT_S_COLLISION/AVAHI_CLIENT_FAILURE    
dermanu commented 10 months ago

Moode uses as default plughw instead of hw. Could that be a problem?

GioF71 commented 10 months ago

Oh wow, that was fast. If connected to Moodle using Bluetooth, tidal-connect plays music, but the volume can't be controlled (in Android) and is at 100%.

 0 [sndrpijustboomd]: JustBoomDac - snd_rpi_justboom_dac                                      
                      snd_rpi_justboom_dac 

If you are connecting via bluetooth from the tidal app on your phone, actually you are not using Tidal Connect I believe. Can you post a screenshot of your phone playing?

GioF71 commented 10 months ago

Moode uses as default plughw instead of hw. Could that be a problem?

I believe it's not a problem, unless you are trying to play from moode (maybe from its library) and Tidal Connect at the same time...

GioF71 commented 10 months ago

Oh wow, that was fast. If connected to Moodle using Bluetooth, tidal-connect plays music, but the volume can't be controlled (in Android) and is at 100%.

 0 [sndrpijustboomd]: JustBoomDac - snd_rpi_justboom_dac                                      
                      snd_rpi_justboom_dac 

If you are connecting via bluetooth from the tidal app on your phone, actually you are not using Tidal Connect I believe. Can you post a screenshot of your phone playing?

If you play via bt from another app, do you get sound?

dermanu commented 10 months ago

I currently have no possibility to upload a screenshot. Maybe tomorrow. But, I connected my laptop to MoOde via Bluetooth. And then connected to tidal-connect via the Tidal Android App. Now I get audio. If I disconnect the laptops Bluetooth connection, tidal-connect stays connected but and plays audio.

GioF71 commented 10 months ago

Ok will be waiting. From what I understand, you are using your moode device (also) as a bluetooth speaker? I might be stating the obvious, but I wanted to point out that Tidal Connect has nothing to do with Bluetooth. Otoh, when a player tries to connect to Tidal Connect, the latter tries to exclusively lock the selected audio device. If that is already in use, it might fail. It might appear as connected but music won't play. One thing you can do is to disbale any bluetooth connection to your moode box (even better, maybe temporarily disable bt on moode) and see if this helps. Let me know if you discover something...

dermanu commented 10 months ago

Yes, I use my Moode device also as a Bluetooth speaker.

That the tidal-connect only works when there is a Bluetooth connection simultaneously was an accidental observation.

First, I also thought that the player allows only one audio device at a time. However, the player seems not to allow tidal-connect to play audio when there is no active Bluetooth connection (from whatever device, like a laptop, phone, etc. - doesn't need to play any audio, though).

So:

  1. Connect Tidal = NO audio
  2. Connect Bluetooth = audio (from Bluetooth)
  3. Connect Bluetooth + Tidal = audio (from Tidal!)

I check the rest this weekend.

GioF71 commented 10 months ago

Well that is strange... but when you say "no audio" from Tidal, does Tidal appear to be playing properly if you look at the track slider? If so, it might be the volume to be down. Probably worth checking

GioF71 commented 10 months ago

You can check if the device is playing when using tidal using this:

watch cat /proc/asound/card0/pcm0p/sub0/hw_params

Also please post the file /etc/mpd.conf from moode using:

cat /etc/mpd.conf

So we can see if we need to use some special configuration as the output device.

GioF71 commented 9 months ago

Hello, any news about this issue? Thank you.

dermanu commented 9 months ago

Sorry for the late reply. I ended up reinstalling moode and Tidal Connect. Now, it works (without in-app volume adjustment).

GioF71 commented 9 months ago

Ok glad to hear it's ok now. Closing this. Consider starring the repo if this doesn't bother you. Cheers