Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No volume control via phone when streaming Tidal from phone app #136

Closed
MattRimkus opened this issue Mar 3, 2024 · 84 comments
Closed

No volume control via phone when streaming Tidal from phone app #136

MattRimkus opened this issue Mar 3, 2024 · 84 comments

Comments

@MattRimkus
Copy link

Hi,

I managed to get Tidal Connect going on my Raspberry Pi 4B under Volumio which is attached to an iFi Zen DAC V2 via USB.

Everything works fine apart from the volume rocker of my Samsung Galaxy S24 Ultra having no effect when I try to change the playback volume.

In Volumio choosing Hardware, Software or None under Mixer Type won't make any difference. I still have to change the volume via the Zen DAC's knob.

Thanks for your effort!

Kind regards,
Matt

@GioF71
Copy link
Owner

GioF71 commented Mar 3, 2024

Hello Matt, can you post the output of the following command:

cd $HOME/tidal-connect
docker-compose logs

So we can check what happened during startup.
Also post the output of these command:

cat $HOME/tidal-connect/.env

and

cat /proc/asound/cards

@MattRimkus
Copy link
Author

MattRimkus commented Mar 3, 2024

Hi,

sure... docker compose logs


Attaching to tidal-connect
tidal-connect    | Tidal Connect - https://github.com/GioF71/tidal-connect.git - entrypoint.sh version 0.1.3
tidal-connect    | FRIENDLY_NAME=Couch
tidal-connect    | MODEL_NAME=Raspberry Pi
tidal-connect    | MQA_CODEC=yes
tidal-connect    | MQA_PASSTHROUGH=false
tidal-connect    | CARD_NAME=Audio
tidal-connect    | CARD_INDEX=
tidal-connect    | CARD_DEVICE=
tidal-connect    | File [asound.conf] has not been provided
tidal-connect    | File /etc/asound.conf does not exist.
tidal-connect    | Entering write_asound_if_needed ...
tidal-connect    | Specified CARD_NAME=[Audio]
tidal-connect    | Skipping audio device [b1] at index [0]
tidal-connect    | Skipping audio device [b1] at index [0]
tidal-connect    | Skipping audio device [Headphones] at index [1]
tidal-connect    | Found audio device [Audio] as index [5]
tidal-connect    | Entering write_audio_config with card_index=[5] ...
tidal-connect    | Creating sound configuration file (card_index=[5], softvol=[yes]) ...
tidal-connect    | check_master=[numid=7,iface=MIXER,name='SoftMaster']
tidal-connect    | Cannot enable softvolume, a Master control already exists for the device at index [5]
tidal-connect    | Building asound.conf without softvolume ...
tidal-connect    | Sound configuration file created
tidal-connect    | Completed write_audio_config
tidal-connect    | Completed write_asound_if_needed.
tidal-connect    | pcm.!default {
tidal-connect    |   type plug
tidal-connect    |   slave.pcm {
tidal-connect    |     type hw
tidal-connect    |     card 5
tidal-connect    |   }
tidal-connect    | }
tidal-connect    | PLAYBACK_DEVICE=[default]
tidal-connect    | Starting Speaker Application in Background (TMUX)
tidal-connect    | Sleeping for a while (3 seconds)...
tidal-connect    | ENABLE_GENERATED_TONE=[yes]
tidal-connect    | Generated tone is enabled
tidal-connect    | Trying a short tone ...
tidal-connect    | Playing WAVE '/assets/audio/short-low-tone.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
tidal-connect    | tone_played=[1]
tidal-connect    | Starting TIDAL Connect ...
tidal-connect    | STARTING TidalConnect services, version: 1.1.3
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.front.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround40.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround71.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
tidal-connect    | Cannot connect to server socket err = No such file or directory
tidal-connect    | Cannot connect to server request channel
tidal-connect    | jack server is not running or cannot be started
tidal-connect    | JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
tidal-connect    | JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
tidal-connect    | STARTED TidalConnect services.
tidal-connect    | [2024-03-03 08:38:15.958] [tisoc] [warning] [PlaybackControllerImpl.cpp:472] Illegal state:1
tidal-connect    | [2024-03-03 08:38:16.407] [tisoc] [warning] [logger.cpp:22] [audio_worker.cpp:321] Attempting to initialize a decoder without initial data!
tidal-connect    | Tidal Connect - https://github.com/GioF71/tidal-connect.git - entrypoint.sh version 0.1.3
tidal-connect    | FRIENDLY_NAME=Couch
tidal-connect    | MODEL_NAME=Raspberry Pi
tidal-connect    | MQA_CODEC=yes
tidal-connect    | MQA_PASSTHROUGH=false
tidal-connect    | CARD_NAME=Audio
tidal-connect    | CARD_INDEX=
tidal-connect    | CARD_DEVICE=
tidal-connect    | File [asound.conf] has not been provided
tidal-connect    | File /etc/asound.conf exists.
tidal-connect    | File /etc/asound.conf is writable
tidal-connect    | Current /etc/asound.conf:
tidal-connect    | pcm.!default {
tidal-connect    |   type plug
tidal-connect    |   slave.pcm {
tidal-connect    |     type hw
tidal-connect    |     card 5
tidal-connect    |   }
tidal-connect    | }
tidal-connect    | Entering write_asound_if_needed ...
tidal-connect    | Specified CARD_NAME=[Audio]
tidal-connect    | Skipping audio device [b1] at index [0]
tidal-connect    | Skipping audio device [b1] at index [0]
tidal-connect    | Skipping audio device [Headphones] at index [1]
tidal-connect    | Found audio device [Audio] as index [5]
tidal-connect    | Entering write_audio_config with card_index=[5] ...
tidal-connect    | Creating sound configuration file (card_index=[5], softvol=[yes]) ...
tidal-connect    | check_master=[numid=7,iface=MIXER,name='SoftMaster']
tidal-connect    | Cannot enable softvolume, a Master control already exists for the device at index [5]
tidal-connect    | Building asound.conf without softvolume ...
tidal-connect    | Sound configuration file created
tidal-connect    | Completed write_audio_config
tidal-connect    | Completed write_asound_if_needed.
tidal-connect    | pcm.!default {
tidal-connect    |   type plug
tidal-connect    |   slave.pcm {
tidal-connect    |     type hw
tidal-connect    |     card 5
tidal-connect    |   }
tidal-connect    | }
tidal-connect    | PLAYBACK_DEVICE=[default]
tidal-connect    | Starting Speaker Application in Background (TMUX)
tidal-connect    | Sleeping for a while (3 seconds)...
tidal-connect    | ENABLE_GENERATED_TONE=[yes]
tidal-connect    | Generated tone is enabled
tidal-connect    | Trying a short tone ...
tidal-connect    | Playing WAVE '/assets/audio/short-low-tone.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
tidal-connect    | tone_played=[1]
tidal-connect    | Starting TIDAL Connect ...
tidal-connect    | STARTING TidalConnect services, version: 1.1.3
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.front.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround40.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround71.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
tidal-connect    | Cannot connect to server socket err = No such file or directory
tidal-connect    | Cannot connect to server request channel
tidal-connect    | jack server is not running or cannot be started
tidal-connect    | JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
tidal-connect    | JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
tidal-connect    | STARTED TidalConnect services.
tidal-connect    | [2024-03-03 08:44:28.035] [tisoc] [warning] [PlaybackControllerImpl.cpp:472] Illegal state:1
tidal-connect    | [2024-03-03 08:44:28.490] [tisoc] [warning] [logger.cpp:22] [audio_worker.cpp:321] Attempting to initialize a decoder without initial data!
tidal-connect    | [2024-03-03 08:53:15] [error] handle_read_frame error: asio.system:104 (Connection reset by peer)
tidal-connect    | [2024-03-03 08:53:15] [info] asio async_shutdown error: asio.system:32 (Broken pipe)
tidal-connect    | [2024-03-03 09:00:06] [error] handle_read_frame error: asio.system:104 (Connection reset by peer)
tidal-connect    | [2024-03-03 09:00:06] [info] asio async_shutdown error: asio.system:32 (Broken pipe)
tidal-connect    | [2024-03-03 09:08:59] [error] handle_read_frame error: asio.system:104 (Connection reset by peer)
tidal-connect    | [2024-03-03 09:08:59] [info] asio async_shutdown error: asio.system:32 (Broken pipe)
tidal-connect    | [2024-03-03 09:17:33] [info] asio async_shutdown error: asio.misc:2 (End of file)
tidal-connect    | [2024-03-03 12:16:31.724] [tisoc] [warning] [PlaybackControllerImpl.cpp:472] Illegal state:1
tidal-connect    | [2024-03-03 12:16:53] [info] asio async_shutdown error: asio.misc:2 (End of file)
tidal-connect    | [2024-03-03 14:12:11.035] [tisoc] [warning] [PlaybackControllerImpl.cpp:472] Illegal state:1
tidal-connect    | [2024-03-03 14:12:49.728] [tisoc] [warning] [logger.cpp:22] [audio_worker.cpp:321] Attempting to initialize a decoder without initial data!
tidal-connect    | [2024-03-03 14:16:01] [error] handle_read_frame error: asio.system:104 (Connection reset by peer)
tidal-connect    | [2024-03-03 14:16:01] [info] asio async_shutdown error: asio.system:32 (Broken pipe)
tidal-connect    | [2024-03-03 14:19:14] [error] handle_read_frame error: asio.system:104 (Connection reset by peer)
tidal-connect    | [2024-03-03 14:19:14] [info] asio async_shutdown error: asio.system:32 (Broken pipe)
tidal-connect    | [2024-03-03 14:26:43.880] [tisoc] [warning] [PlaybackControllerImpl.cpp:472] Illegal state:0
tidal-connect    | [2024-03-03 14:26:43] [info] asio async_shutdown error: asio.misc:2 (End of file)

volumio@couch:~$ cat $HOME/tidal-connect/.env
FRIENDLY_NAME=Couch
MODEL_NAME=Raspberry Pi
MQA_CODEC=yes
CARD_NAME=Audio
ENABLE_SOFTVOLUME=yes
volumio@couch:~$ cat /proc/asound/cards
 0 [b1             ]: bcm2835_hdmi - bcm2835 HDMI 1
                      bcm2835 HDMI 1
 1 [Headphones     ]: bcm2835_headpho - bcm2835 Headphones
                      bcm2835 Headphones
 5 [Audio          ]: USB-Audio - iFi (by AMR) HD USB Audio
                      iFi (by AMR) iFi (by AMR) HD USB Audio at usb-0000:01:00.0-1.4, high speed

@GioF71
Copy link
Owner

GioF71 commented Mar 3, 2024

Hello, unfortunately this is the problem with softvolume:

tidal-connect | Cannot enable softvolume, a Master control already exists for the device at index [5]

Have you considered mopidy-tidal? I have a container image here and a sample config page here

@GioF71
Copy link
Owner

GioF71 commented Mar 3, 2024

Ops, sorry, the device is "SoftMaster", not master. So there is hope. I need to change the code of entrypoint.sh in order to avoid this false positive! Hang on...

@GioF71
Copy link
Owner

GioF71 commented Mar 3, 2024

Hello, as a stop-gap solution, I have create a custom asound.conf. So do the following:

cd $HOME/tidal-connect
git config pull.rebase false
git pull
./configure.sh -r ifi-zen-dac-v2-softvol -f Couch -m "Raspberry Pi" -c "yes"
docker-compose up -d

Cross your fingers because I don't have your exact DAC, so I might have done a mistake. But I tried everything then I replaced "D10" with "Audio". Let's hope this works!

GioF71 added a commit that referenced this issue Mar 3, 2024
* No volume control via phone when streaming Tidal from phone app  #136

* No need to escape single quotes
@MattRimkus
Copy link
Author

Thanks for your effort mate! You rock... It does work indeed!

@GioF71
Copy link
Owner

GioF71 commented Mar 3, 2024

Good to hear! I have also made changes so that the script does not wrongly believe that there is a "Master" control when there is a control that only contains "Master". If you want to try:

cd $HOME/tidal-connect
git config pull.rebase false
git pull
./configure.sh -n Audio -f Couch -m "Raspberry Pi" -c "yes"
docker-compose up -d

Should this not work, you can always execute the instructions from the previous post. This feedback might be useful for other users, so thank you in advance if you want to try.
Cheers

@GioF71
Copy link
Owner

GioF71 commented Mar 3, 2024

The previous post was edited... be sure to include "-n Audio" in the configure command

@MattRimkus
Copy link
Author

With this command from yesterday

./configure.sh -r ifi-zen-dac-v2-softvol -f Couch -m "Raspberry Pi" -c "yes"
docker-compose up -d

it didn't work at first but then all of a sudden it did... I don't really know what caused the change.

With

./configure.sh -n Audio -f Couch -m "Raspberry Pi" -c "yes"
docker-compose up -d

so far it doesn't work.

@GioF71
Copy link
Owner

GioF71 commented Mar 4, 2024

Hello, did you also execute the initial part?

cd $HOME/tidal-connect
git config pull.rebase false
git pull

I just tried this:

./configure.sh -n DAC -s S32_LE -f Desk -m "Raspberry Pi" -c "yes"

I used -s S32_LE only because my dac needs that for working properly, and the name of the device is DAC instead of Audio, and it worked for me.
Would you like to post the container logs with this configuration, using:

cd $HOME/tidal-connect
docker-compose logs

Thank you

@MattRimkus
Copy link
Author

Hello, did you also execute the initial part?

Yes I did... And I tried again just now. Won't cut it...

Attaching to tidal-connect
tidal-connect    | Tidal Connect - https://github.com/GioF71/tidal-connect.git - entrypoint.sh version 0.1.3
tidal-connect    | Tidal Connect - https://github.com/GioF71/tidal-connect.git - common.sh version 0.1.0
tidal-connect    | FRIENDLY_NAME=Couch
tidal-connect    | MODEL_NAME=Raspberry Pi
tidal-connect    | MQA_CODEC=yes
tidal-connect    | MQA_PASSTHROUGH=false
tidal-connect    | CARD_NAME=Audio
tidal-connect    | CARD_INDEX=
tidal-connect    | CARD_DEVICE=
tidal-connect    | File [asound.conf] has not been provided
tidal-connect    | File /etc/asound.conf does not exist.
tidal-connect    | Entering write_asound_if_needed ...
tidal-connect    | Specified CARD_NAME=[Audio]
tidal-connect    | Skipping audio device [b1] at index [0]
tidal-connect    | Skipping audio device [b1] at index [0]
tidal-connect    | Skipping audio device [Headphones] at index [1]
tidal-connect    | Found audio device [Audio] as index [5]
tidal-connect    | Entering write_audio_config with card_index=[5] ...
tidal-connect    | Creating sound configuration file (card_index=[5], softvol=[yes]) ...
tidal-connect    | Ok to enable softvolume, as no 'Master' control exists for the device at index [5]
tidal-connect    | Building asound.conf with softvolume ...
tidal-connect    | Setting PLAYBACK_DEVICE=[tidal-softvol]
tidal-connect    | Sound configuration file created
tidal-connect    | Completed write_audio_config
tidal-connect    | Completed write_asound_if_needed.
tidal-connect    | pcm.tidal-audio-device {
tidal-connect    |   type plug
tidal-connect    |   slave.pcm {
tidal-connect    |     type hw
tidal-connect    |     card 5
tidal-connect    |   }
tidal-connect    | }
tidal-connect    | pcm.tidal-softvol {
tidal-connect    |   type softvol
tidal-connect    |   slave {
tidal-connect    |     pcm "tidal-audio-device"
tidal-connect    |   }
tidal-connect    |   control {
tidal-connect    |     name "Master"
tidal-connect    |     card 0
tidal-connect    |   }
tidal-connect    | }
tidal-connect    | PLAYBACK_DEVICE=[tidal-softvol]
tidal-connect    | Starting Speaker Application in Background (TMUX)
tidal-connect    | Sleeping for a while (3 seconds)...
tidal-connect    | ENABLE_GENERATED_TONE=[yes]
tidal-connect    | Generated tone is enabled
tidal-connect    | Trying a short tone ...
tidal-connect    | Playing WAVE '/assets/audio/short-low-tone.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
tidal-connect    | tone_played=[1]
tidal-connect    | Starting TIDAL Connect ...
tidal-connect    | STARTING TidalConnect services, version: 1.1.3
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.front.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround40.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround71.0:CARD=0'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
tidal-connect    | ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
tidal-connect    | ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
tidal-connect    | ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
tidal-connect    | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
tidal-connect    | Cannot connect to server socket err = No such file or directory
tidal-connect    | Cannot connect to server request channel
tidal-connect    | jack server is not running or cannot be started
tidal-connect    | JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
tidal-connect    | JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
tidal-connect    | STARTED TidalConnect services.
tidal-connect    | [2024-03-04 11:14:25.659] [tisoc] [warning] [PlaybackControllerImpl.cpp:472] Illegal state:1
tidal-connect    | [2024-03-04 11:14:26.541] [tisoc] [warning] [logger.cpp:22] [audio_worker.cpp:321] Attempting to initialize a decoder without initial data!
tidal-connect    | [2024-03-04 11:28:45.888] [tisoc] [warning] [PlaybackControllerImpl.cpp:472] Illegal state:0
tidal-connect    | [2024-03-04 11:28:45] [info] asio async_shutdown error: asio.misc:2 (End of file)

@GioF71
Copy link
Owner

GioF71 commented Mar 4, 2024

I hope the previous configuration which uses the custom asound.conf still works.
Anyway would you like to also add the -s S32_LE and try again?

@GioF71
Copy link
Owner

GioF71 commented Mar 4, 2024

Maybe when making changes, it might be a good idea to force container recreation. And maybe watch the logs. Sometimes the binary core dumps, and the script waits up to 30 seconds before restarting, configurable with RESTART_WAIT_SEC in the env file. I need to add a configure.sh switch for this feature as well.

To start forcing container recreation and watch the logs in a one-liner, you can do:

docker-compose up -d --force-recreate && docker-compose logs -f

@MattRimkus
Copy link
Author

add the -s S32_LE and try again

That leaves me with no sound at all...

I then tried again with this

./configure.sh -n Audio -f Couch -m "Raspberry Pi" -c "yes"

followed by

docker-compose up -d --force-recreate && docker-compose logs -f

and now everything is up and running incl. changing volume via the rocker on my phone!

I reckon you just earned another bucket of coffee!! 🥇

@GioF71
Copy link
Owner

GioF71 commented Mar 4, 2024

Ok S32_LE is not needed for your DAC clearly :-)

But isn't this command

./configure.sh -n Audio -f Couch -m "Raspberry Pi" -c "yes"

the same command that failed before?
I suppose the binary simply failed to start for unknown reasons, and it was taking up to 30 sec to restart. I am preparing a new version of configure.sh which allows the "-w" switch that sets exactly the RESTART_WAIT_SEC variable. I usually keep that to 5. It might pollute the log a little but the app is more reactive.
Also the "--force-recreate" forces re-creation because docker-compose up -d doesn't even guarantee a container restart if the variables have not changed. So I also generally prefer to always use this switch when running tidal connect.

@MattRimkus
Copy link
Author

Yes

./configure.sh -n Audio -f Couch -m "Raspberry Pi" -c "yes"

gave me sound and volume control once - after a while. So maybe

docker-compose up -d --force-recreate && docker-compose logs -f

was needed to re-initialise the entire business and get it working from the get go.

In the meantime I managed to replicate my success on the 2nd Pi which is attached to my stereo in the living room!

Anyway, now I won't touch any of them for a while.

Thanks again for your awesome support!

@GioF71
Copy link
Owner

GioF71 commented Mar 4, 2024

Ok I understand the need for stability!

I invite you, please have a look at mopidy-tidal here, using my image. Of course have a look at the project references, they are mentioned at the first link. User tehkillerbee is amazing!

With that solution, you will have a web app which can play Tidal in full hi-res flac up to 24bit/192kHz (not mqa like this one) to your USB Dac. And it's open source software.
Don't worry, it won't break you current tidal-connect setup, just don't use both of them at the same time.

@GioF71
Copy link
Owner

GioF71 commented Mar 4, 2024

Ah forgot to ask, please star the repo if you can.
Thank you again for your support!

@MattRimkus
Copy link
Author

Hi,

me again... So you made me curious as to whether my almost 54 years old ears will be able to hear the difference between FLAC and Hi Res...

I have installed Mopidy and Mopidy-Tidal. Unfortunately I'm stuck right at the end of the instructions when it comes to logging in with Tidal.

I have edited my /etc/mopidy/mopidy.conf as instructed but

journalctl -u mopidy | tail -10

won't give me any link

Mar 09 20:04:15 mopidy mopidy[2222]: INFO     [TidalBackend-3 (_actor_loop)] mopidy_tidal.backend PKCE login web server port: 8989
Mar 09 20:04:15 mopidy mopidy[2222]: INFO     [TidalBackend-3 (_actor_loop)] mopidy_tidal.backend Quality: HI_RES_LOSSLESS
Mar 09 20:04:15 mopidy mopidy[2222]: INFO     [TidalBackend-3 (_actor_loop)] mopidy_tidal.backend Authentication: PKCE
Mar 09 20:04:15 mopidy mopidy[2222]: INFO     [TidalBackend-3 (_actor_loop)] mopidy_tidal.backend Login method: AUTO
Mar 09 20:04:15 mopidy mopidy[2222]: INFO     [TidalBackend-3 (_actor_loop)] mopidy_tidal.backend Using default client id & client secret from python-tidal
Mar 09 20:04:15 mopidy mopidy[2222]: INFO     [Audio-2 (_actor_loop)] mopidy.audio.actor Audio output set to "autoaudiosink"
Mar 09 20:04:15 mopidy mopidy[2222]: INFO     [MainThread] mopidy.commands Starting Mopidy core
Mar 09 20:04:15 mopidy mopidy[2222]: INFO     [MainThread] mopidy.commands Starting Mopidy frontends: HttpFrontend
Mar 09 20:04:15 mopidy mopidy[2222]: INFO     [HttpFrontend-9 (_actor_loop)] mopidy.http.actor HTTP server running at [::ffff:127.0.0.1]:6680
Mar 09 20:04:15 mopidy mopidy[2222]: INFO     [MainThread] mopidy.commands Starting GLib mainloop

Also I can't access the Mopidy Web Interface, neither port 8989 nor 6680 do anything. has rejected the connection.

Would you be so kind as to point me in the right direction even though this is not the Mopidy support department or even your project ;-)

Cheers,
Matt

@GioF71
Copy link
Owner

GioF71 commented Mar 9, 2024

Hello, sorry but I did not give enough information. I forgot to direct you to an example docker compose file which would use my docker image. I assume here that you'd prefer to use a docker image. So...

  1. Clone this repository:
cd $HOME
git clone https://github.com/GioF71/audio-tools.git
  1. Check you user id
id
  1. Check the audio group id:
getent group audio

If the first command shows that your uid is 1000, and the second shows that the audio gid is 29, the following instructions should be good to go. Otherwise you would need to replace 1000 and 29 with your values.

  1. Create your .env file:
cd $HOME/audio-tools/players/mopidy-tidal
echo "PUID=1000" > .env
echo "AUDIO_GID=29" >> .env
echo "AUDIO_OUTPUT=alsasink device=hw:Audio" >> .env
echo "TIDAL_QUALITY=HI_RES_LOSSLESS" >> .env
echo "TIDAL_AUTH_METHOD=PKCE" >> .env
  1. After that, you should be able to start the container:
cd $HOME/audio-tools/players/mopidy-tidal
docker-compose up -d
  1. In order to authenticate, open your browse at the http://your-host:8989/ and follow the instructions.
    Then open your browser at the http://your-host:6680/, and enjoy.

I hope this helps!

@GioF71
Copy link
Owner

GioF71 commented Mar 9, 2024

You were quite close with your effort. The mopidy was not reachable as it was exposing the port only on the localhost (127.0.0.1), that is why you could not reach the web interface!

@MattRimkus
Copy link
Author

Wow man, you really rock... Thanks a lot for your guidance at stupid o' clock! I really AM a Linux and Terminal noob and I get lost very easily as I'm lacking a lot of basics...

Unfortunately even after carrying out the steps you listed above the output is still the same. I still can't access the Mopidy web interface.

I then carried on reading GioF71/mopidy-docker and even fail to carry out ./local-build.sh because I don't know what's meant by "switch to the root directory of the repo".

Somehow I think I'm mixing up two sets of instructions here because even though I had installed docker at some point I can't remember ever building a container. I was still stuck at the end of thekillerbee's instruction set...

Kudoz for your patience!

@GioF71
Copy link
Owner

GioF71 commented Mar 10, 2024

Hello Matt, sorry it didn't work. Let me try answer your questions

  1. building: you don't need to execute the build script: the images are already available online. But if one should clone or fork the repository and want to maybe modify it and generate his/her own images, he/she might use that build script to do that.
    And "switch to the root of the container" generally mean to "cd" to the main directory of the repository, so e.g. for the "audio-tools" repository, you go to the root of the repository by typing:

cd $HOME/audio-tools

  1. Probably the container didn't work because there is the mopidy server already running, although not reachable over your network but occupying the ports 6680 and 8989. You can stop it using:

sudo systemctl stop mopidy

Then you can try again to restart the container using:

cd $HOME/audio-tools/players/mopidy-tidal
docker-compose up -d --force-recreate
  1. Try to reach mopidy. In order to authenticate, open your browse at the http://your-host:8989/ and follow the instructions.
    Then open your browser at the http://your-host:6680/, and enjoy.
    Replace "your-host" with the ip of the raspberry pi or the local network name of course.

If this has success, we can then proceed removing the packages you installed, as a final step.

@MattRimkus
Copy link
Author

Oh boy... I think I made a mess :-P

matt@mopidy:~/audio-tools/players/mopidy-tidal $ docker-compose up -d --force-recreate
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 704, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 399, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.11/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/usr/lib/python3.11/http/client.py", line 975, in send
    self.connect()
  File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30, in connect
    sock.connect(self.unix_socket)
PermissionError: [Errno 13] Permission denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 788, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/six.py", line 718, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 704, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 399, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.11/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/usr/lib/python3.11/http/client.py", line 975, in send
    self.connect()
  File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30, in connect
    sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 214, in _retrieve_server_version
    return self.version(api_version=False)["ApiVersion"]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/docker/api/daemon.py", line 181, in version
    return self._result(self._get(url), json=True)
                        ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 237, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 547, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 33, in <module>
    sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 81, in main
    command_func()
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 200, in perform_command
    project = project_from_options('.', options)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 60, in project_from_options
    return get_project(
           ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 152, in get_project
    client = get_client(
             ^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 41, in get_client
    client = docker_client(
             ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 170, in docker_client
    client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 197, in __init__
    self._version = self._retrieve_server_version()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 221, in _retrieve_server_version
    raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))

@GioF71
Copy link
Owner

GioF71 commented Mar 10, 2024

Yeah... docker-compose seems to not be working. Try reinstalling it with

sudo apt-get install docker-compose

@MattRimkus
Copy link
Author

Stuck in the mud

matt@mopidy:~/audio-tools/players/mopidy-tidal $ sudo apt-get install docker-compose
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
docker-compose is already the newest version (1.29.2-3).
0 upgraded, 0 newly installed, 0 to remove and 173 not upgraded.

@GioF71
Copy link
Owner

GioF71 commented Mar 10, 2024

So strange... Have you tried rebooting?

@MattRimkus
Copy link
Author

Well, the oldest question in IT support history did indeed take us a step further... Not quite there yet though

matt@mopidy:~/audio-tools/players/mopidy-tidal $ docker-compose up -d --force-recreate
Creating network "mopidy-tidal_default" with the default driver
Pulling mopidy (docker.io/giof71/mopidy:latest)...
latest: Pulling from giof71/mopidy
9112ed96bb0c: Pull complete
28304c4b1ec0: Pull complete
028142874972: Pull complete
ad7d0d143c4d: Pull complete
Digest: sha256:bbfb6c3c2400f630474783cb978a17f927f54db69bf76dea9e809554438743a2
Status: Downloaded newer image for giof71/mopidy:latest
Creating mopidy-tidal ...
Creating mopidy-tidal ... error

ERROR: for mopidy-tidal  Cannot start service mopidy: driver failed programming external connectivity on endpoint mopidy-tidal (9bd62baaee6f8c40c43c6a1bde4586e71b6de7e5941db6c88c159379fa79b26f): Error starting userland proxy: listen tcp4 0.0.0.0:6680: bind: address already in use

ERROR: for mopidy  Cannot start service mopidy: driver failed programming external connectivity on endpoint mopidy-tidal (9bd62baaee6f8c40c43c6a1bde4586e71b6de7e5941db6c88c159379fa79b26f): Error starting userland proxy: listen tcp4 0.0.0.0:6680: bind: address already in use
ERROR: Encountered errors while bringing up the project.

Do you think it's better so start over?

@GioF71
Copy link
Owner

GioF71 commented Mar 26, 2024

First version of the scrobbler is available here.
Of course it's still a little 'bleeding edge' but it mostly works

@mikegolant
Copy link

mikegolant commented Apr 24, 2024

hi
it looks like I have the same issue with the tidal-connect soft volume control
I have a self-built DAC connected to i2s raspberry-py + moode
the soft volume control didn't work in the beginning, but once I checked out to eea9d74 , the soft volume starts working. But after updating again - stop working
what can be an issue ?

@GioF71
Copy link
Owner

GioF71 commented Apr 24, 2024

I checked that commit and compared to the current head... there are no relevant changes. Mostly I have added presets, tried to remove the "version" property from docker-compose then reverted the change cause it caused issue with non-updated o.s., but no changes to the main code.

Can you post your .env file and the container logs?
Also, post the result of

cat /proc/asound/cards

Thank you

@mikegolant
Copy link

mikegolant commented Apr 24, 2024

@GioF71
Copy link
Owner

GioF71 commented Apr 24, 2024

Hello, I see you did not specify any of CARD_INDEX and CARD_NAME.
This should be OK as you only have one valid device available (did you blacklist the internal audio?), but the script decides to do nothing and just use sysdefault. I should probably do something different: if there is only card, in case nothing is specified, behave as if CARD_INDEX was set to 0.

Back to us, you should be good to go by just specifying

CARD_INDEX=0

or

CARD_NAME=sndrpirpidac

in your .env file.
The former choice looks more convenient, but the latter will still work, should you add another audio device over time.
Let me know if this helps!

@mikegolant
Copy link

I have already tried.
My default env was with CARD_INDEX=0
the same issue
tried again ...
docker-compose_logs.txt

@GioF71
Copy link
Owner

GioF71 commented Apr 24, 2024

Ok, it does not work, but for a different reason. See the logs:

�[36mtidal-connect |�[0m Cannot enable softvolume, a 'Master' control already exists for the device at index [0]
�[36mtidal-connect |�[0m Building asound.conf without softvolume ...

Your device already has a control device named 'Master', so unfortunately we cannot enable software volume on this app.
If you execute this:

amixer -c 0 controls | grep \'Master\'

it will probably return a line, which is what does not allow us to enable software volume. This app can only use a control which is named "Master".
See this resource for more details.

@mikegolant
Copy link

Would you happen to have a quick suggestion on what to change? :)
the soft volume was worked once ... :)

@GioF71
Copy link
Owner

GioF71 commented Apr 24, 2024

Are you sure about this? I need some elements to work on... that paper I linked seems to say that if there is a Master control, we cannot enable a software volume.
Did you change anything else, kernel versions maybe?
Don't get me wrong, I believe you when you say it once worked, but there must be something different now...

@GioF71
Copy link
Owner

GioF71 commented Apr 24, 2024

If you think it's something I changed in the code, maybe revert to that commit and see if softvol works. If it does, we have something to investigate.

@mikegolant
Copy link

I already tried to revert ... it's not helping...

@GioF71
Copy link
Owner

GioF71 commented Apr 24, 2024

I already tried to revert ... it's not helping...

Then there must be something else. Anything in /boot/config.txt? overlays, etc ...

@mikegolant
Copy link

I haven't updated the OS and haven't rebooted :)
just tidal-connect
after the update, the soft-volume started working, and after the next update, it stopped.
Of course, after the soft-volume stopped working, I started playing with moode configuration, but not with the kernel config and config.txt
now, I have the same configuration that was previously

@GioF71
Copy link
Owner

GioF71 commented Apr 24, 2024

uhm, I really can't figure out what might be the issue. What is the device you are using?

@GioF71
Copy link
Owner

GioF71 commented Apr 24, 2024

when you reverted to that commit, did you re-create the container? If you didn't already do that, I would try doing a

docker-compose up -d --force-recreate

Unless you are positive that the container was actually recreated.

@mikegolant
Copy link

mikegolant commented Apr 26, 2024

hi
This is the first that I have tried :)
The device is a custom DAC based on a pcm1792a chip connected to RaspberryPi 4 (i2s)
alsacap
*** Scanning for playback devices ***
Card 0, ID sndrpirpidac', name snd_rpi_rpi_dac'
Device 0, ID RPi-DAC HiFi pcm1794a-hifi-0', name RPi-DAC HiFi pcm1794a-hifi-0', 1 subdevices (1 available)
2 channels, sampling rate 8000..384000 Hz
Sample formats: S16_LE, S24_LE
Buffer size range from 4 to 131072
Period size range from 2 to 65536

  Subdevice 0, name `subdevice #0'

@mikegolant
Copy link

Feel free to let me know if you need more logs, etc.
Thank you very much for your help!

@GioF71
Copy link
Owner

GioF71 commented Apr 26, 2024

Not a lot more comes to my mind... have you tried adding:

CARD_FORMAT=S32_LE

?

@GioF71
Copy link
Owner

GioF71 commented Apr 26, 2024

Is Tidal Connect mandatory for you? Would you try a upmpdcli media server and playing back to mpd+upmpdcli? All could fit on your moode device and would support full hires, while this Tidal Connect tops @96kHz (except mqa unfolding on a MQA-enabled DAC, but that's different from full hires).
See here for the media server and here for the renderer.
All can be combined in one stack if you so prefer (media server would be the player itself).

@mikegolant
Copy link

S32_LE is not supported...
But I tried with S24_LE
It's not helps
Tidal connect is mandatory because the sound quality is much bet better than UPnP

@GioF71
Copy link
Owner

GioF71 commented Apr 26, 2024

Sorry it does not work, I am really out of ideas here.

Why do you say the sound quality is better? In my option Tidal Connect is the same at best, and is more limited.
Having both options I almost exclusively use UPnP. Even on the usability side, I have had issues with Tidal Connect, especially if I start playing using a phone and then want to switch to a tablet. It's a mess, they never got in sync.

If you think that network package loss with UPD happens with UPnP, fear not, it does not happen in this case. Network discovery uses UPD, but the audio stream comes reliably with https (so tcp).

@GioF71
Copy link
Owner

GioF71 commented Apr 26, 2024

Just to clarify... the problem with tidal-connect is "only" the missing software volume, of it does not work at all for you?
About the media server suggested before, if you enable upnp on your moode, you can play directly to moode, you don't need to create the "renderer" stack. Just saying, if you want to give it a try

@mikegolant
Copy link

The soft volume was not worked by default
but it started working with tidal-connect only once but was broken after the update
I really don't understand why the soft-volume has worked, but it has worked, and I'm trying to make it work again :)
The main advantage of tidal-connect service is that the audio stream is transmitted from the server directly to the device without extra conversation

@GioF71
Copy link
Owner

GioF71 commented Apr 26, 2024

The main advantage of tidal-connect service is that the audio stream is transmitted from the server directly to the device without extra conversation

Hello, the same happens when streaming using upnp! No conversions

@GioF71
Copy link
Owner

GioF71 commented Apr 26, 2024

About your device, do you have a link or some information about it?

@GioF71
Copy link
Owner

GioF71 commented Apr 26, 2024

As I see here, maybe try and post the output of:

aplay -D hw:0 --dump-hw-params /dev/zero

so we can see what format your card can support.

@GioF71
Copy link
Owner

GioF71 commented May 31, 2024

Hello @MattRimkus, I am closing this, feel free to reopen or open another one if you encounter any issue.

@GioF71 GioF71 closed this as completed May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants