Git Product home page Git Product logo

tidal-connect's Introduction

tidal-connect

A simple script used to configure a docker-compose stack for Tidal Connect.

Support

ko-fi
Please see the Goal
Please note that support goal is limited to cover running costs for subscriptions to music services.

Issue on the Raspberry Pi 5

If you use a Raspberry Pi 5, you might encounter an issue that shows with the following content in the container logs:

/app/ifi-tidal-release/bin/tidal_connect_application: error while loading shared libraries: libsystemd.so.0: ELF load command alignment not page-aligned

This issue can be solved by editing the file /boot/firmware/config.txt using the following command:

sudo nano /boot/firmware/config.txt

Add the following line in the all section:

kernel=kernel8.img

You will need to reboot, then restart the container.

News

I am trying to document all the configurations I have encountered with my own dacs and through your tickets. Look here and here.
Look in the samples and userconfig directories. They might contain a good file for your dac. It something for you isn't already there, open an issue, and we will create a sample file for your dac, which will also help other users.
Also, consider the new mopidy-tidal alternative. Visit this page for an example configuration. You will also find the references to the underlying projects.

Disclaimers

Contents

This repository does not contain the Tidal Connect software. There is only a docker-compose.yaml file, a configurator script, and a modified entrypoint which is just used for selecting the desired audio output more easily and reliably.

Credit

All the hard work has been done by the owner of the repository mentioned in the References section and in the other repositories from which his one has been forked. I am just trying to provide a way to run their container more easily in certain environments (where the index of your audio device is not the same on every restart).

No support from Tidal

This solution is not and will probably never be supported by Tidal. It might stop working at any time.

Alternatives

If you need to have a supported solution, look at Tidal Connect enabled products. A cheap one is the ubiquitous Wiim Mini/Pro/Pro+/Amp. Another option is represented by Google Chromecast/Chromecast Audio devices. Also, if you use Apple devices, you can already stream to AirPlay-enabled devices.
Even your current TV might already be used as an endpoint for Tidal via the embedded Chromecast functionality, or via AirPlay.

UPnP

Alternatively, if you are not scared of some DIY, you might want to create an upnp/dlna renderer, maybe with upmpdcli (you might use my docker image for upmpdcli) and mpd (you might use my docker image for mpd), and then use some Android app like BubbleUPnP or mConnect Lite (this one is also on iOS/iPadOS), connect those apps to Tidal and then stream to your upnp/dlna renderer.
Starting late November 2023, BubbleUPnP supports hires flac, see this post on Reddit. This is something that, from what I know, is not supported by this Tidal Connect application, and will probably never be.

Tidal Plugin for upmpdcli

Another solution might be my Tidal Plugin for Upmpdcli but again, there will be no support from Tidal. This solution works well with Tidal HiFi or with HiFi+ with MQA DACs.
This solution supports native HiRes flac playback (HI_RES_LOSSLESS so up to 24/192) to and mpd/upmpdcli player. If you configure it to play only up to HI_RES (so up to 24/48 and unfolding on a DAC), it will work on pretty much any UPnP renderer.
See here for a configuration for the HI_RES_LOSSLESS enabled media server.

Logitech Media Server

Another alternative, if you have a HiFi subscription and/or are ok with being limited to standard resolution or mqa-encoded tracks, is using Logitech Media Server and Squeezelite, for which you might use my docker image for squeezelite.
Even considering that after February 2024 the mysqueezebox online services will be shut down, there is a new, very promising, and I'd say already very usable plugin here by community heroes michaelherger and philippe44. This solution does not currently support Tidal HiRes while it supports MQA encoded streams: there will be no software-based unfolding, but a MQA enabled DAC should do that instead.

References

The contents of this repository entirely rely on this repository from GitHub user TonyTrump. A big thank you to the author for the great work.
It will also use his docker image.

Why

I created this repository because it was very inconvenient for me to figure out the string to put for the PLAYBACK_DEVICE variable. I even failed for one of my DAC, I don't know honestly why, but as far as I understand, the ifi-pa-devs-get for some reason refuses to see the device. The most relevant issue I found about this issue is this, but it does not seems to have an easy solution.
Additionally, even if you can specify the correct string for your DAC, I found that the resulting configuration would be error-prone as the string reports both the device name and the device index. AFAIK the index can change across restarts, so outside of a known and controlled setup (which is probably represented by the I*i devices) this situation can an will lead to errors or unwanted configurations.
Keep in mind that the audio device index can also be changed because one time the (usb) device is powered on during boot, and another time it isn't.
This is my experience, unless I am missing something obvious. If so, I will be glad to be corrected.
The work in this repository consists in slightly altering the container startup phase (the entrypoint.sh file), in such a way that a custom /etc/asound.conf is created with (hopefully) the correct device index, regardless of the order of the audio devices, which can vary across restarts. The underlying application then always uses the default audio device.

Requirements

You will need a single-board computer (or anyway, a computer) with an armhf architecture (arm64 should work as well), running docker and docker-compose.
A Raspberry Pi 3/4 will work. If you plan to use a usb dac and hi-res audio, consider at least using a Pi 3b+ or, even better, a Pi 4b.
I am also running this on as Asus Tinkerboard. With this hardware, my suggestion is to not allow it to scale down the cpu frequency too much, or you might experience every kind of crackling noises along with what will remain of your music. In my experience, I am having good result if I set the minimum frequency at least about 600MHz, but, of course, YMMV.

Usage

Install Docker

Docker is a prerequisite. On debian and derived distributions (this includes Raspberry Pi OS, DietPi, Moode Audio, Volumio), we can install the necessary packages using the following commands:

sudo apt-get update
sudo apt-get install docker.io docker-compose
sudo usermod -a -G docker $USER

The last command adds the current user to the docker group. This is not mandatory; if you choose to skip this step, you might need to execute docker-compose commands by prepending sudo.

Clone the repository

You need to clone the repository. Make sure that git is installed using the following command on debian and derived distributions (again, this includes Raspberry Pi OS, DietPi, Moode Audio, Volumio):

sudo apt-get update
sudo apt-get install -y git

Move to the your home directory and clone the repository using the commands:

cd
git clone https://github.com/GioF71/tidal-connect.git

Update the repository

If you just downloaded the repository, you can skip this step.
If you previously cloned the repository, it might have been updated in the meantime. Move to the directory and pull the changes:

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

Configure

From the repository directory, just run the configure.sh bash script, specifying the following parameters:

PARAM DESCRIPTION VARIABLE
-n Sound card name (e.g. DAC), if not specified and also card index isn't, sysdefault is used CARD_NAME
-i Sound card index, not recommended: if not specified and also card name isn't, sysdefault is used CARD_INDEX
-d Sound card device, optional CARD_DEVICE
-s Card format, optional (S32_LE, S16_LE, etc) CARD_FORMAT
-l Enables softvolume, defaults to yes ENABLE_SOFTVOLUME
-g Enables generated tone, defaults to yes ENABLE_GENERATED_TONE
-f Friendly name, defaults to TIDAL connect FRIENDLY_NAME
-m Model name, defaults to Audio Streamer MODEL_NAME
-c MQA Codec, defaults to false MQA_CODEC
-p MQA Passthrough, defaults to false MQA_PASSTHROUGH
-r Asound file prefix ASOUND_FILE_PREFIX
-o Force playback device FORCE_PLAYBACK_DEVICE
-a Name of the virtual sound card in the generated asound.conf file CREATED_ASOUND_CARD_NAME
-t Sleep time in seconds be, defaults to 3 SLEEP_TIME_SEC
-w Restart wait time in seconds, defaults to 10 RESTART_WAIT_SEC
-e Custom client id, defaults to empty string CLIENT_ID
-b log level, defaults to 3 LOG_LEVEL
-h override default certificate path CERTIFICATE_PATH
-j Disable control app if set to 1, defaults to 0 DISABLE_CONTROL_APP
-v DNS Server list, defaults to 8.8.8.8 8.8.4.4 (Google's DNS servers) DNS_SERVER_LIST

I recommend to use the -n parameter instead of -i, because the index of the devices might change across restarts.
If you already used the configure.sh command and you are experiencing issues (because of the card has changed its index), you can run the command again. In the latest version, the card index is calculated during the container startup phase and hopefully there will not be any need to use configure.sh again unless you change the audio device you want to use.

Example

Configure for sound card named "DAC", using friendly name "Aune S6 USB DAC" and model name "Asus Tinkerboard":

cd $HOME/tidal-connect
bash configure.sh -n DAC -f "Aune S6 USB DAC" -m "Asus Tinkerboard"

If no error is reported, you will find a new (or updated) .env file.
If you find a spurious .asound.conf file there, it probably was generated by a previous version of the configure.sh script, and you can safely delete it.
So now you can run the docker-compose.yaml as usual:

cd $HOME/tidal-connect
docker-compose up -d

Environment Variables

The container can be entirely configured using the environment variables listed on the following table:

VARIABLE DESCRIPTION
CARD_NAME Alsa name of the audio card. Example for xmos dac might be DAC while e.g. it is D10 for a Topping D10
CARD_INDEX Alsa index of the audio card
CARD_DEVICE Audio device, optional
CARD_FORMAT Audio format, optional (S32_LE, S16_LE, etc)
FORCE_PLAYBACK_DEVICE If set and if there is an asound.conf provided or selected via a prefix in userconfig, this will be the playback device
FRIENDLY_NAME Friendly name of the device, will be shown on Tidal Apps. Defaults to TIDAL connect.
ASOUND_FILE_PREFIX Search asound.conf with this prefix, a . is used as separator
CREATED_ASOUND_CARD_NAME When creating asound.conf, use this as the declared device name
ENABLE_SOFTVOLUME Generate a configuration with softvolume if set to yes, defaults to no
ENABLE_GENERATED_TONE Generates a tone before starting the app, defaults to yes
MODEL_NAME Model name of the device. Defaults to Audio Streamer.
MQA_CODEC Can't comment a lot on this, defaults to false.
MQA_PASSTHROUGH Can't comment a lot on this, defaults to false.
SLEEP_TIME_SEC Sleep time before starting the real app, after starting tmux. Defaults to 3.
RESTART_ON_FAIL Enables auto restart (see issue #16), defaults to 1 (which means restart is enabled).
RESTART_WAIT_SEC Wait time in seconds before trying restart (see RESTART_ON_FAIL), defaults to 10.
CLIENT_ID Set custom client id, defaults to an empty string
LOG_LEVEL Application log level, defaults to 3
CERTIFICATE_PATH Override default certificate path
DISABLE_CONTROL_APP Disable control app if set to 1, defaults to 0
DNS_SERVER_LIST The DNS serves to be used, defaults to 8.8.8.8 8.8.4.4 (Google's DNS servers).

Please note that if both CARD_NAME and CARD_INDEX are specified, only CARD_NAME will be considered.
Also, if both CARD_NAME and CARD_INDEX are not specified, sysdefault (the system default audio device) will be used.

Volumes

Here is the list of volumes:

VOLUME DESCRIPTION
/userconfig Might contain user-provided configurations.

User-provided configurations

Custom asound.conf

If you put an asound.conf file in the userconfig directory of the repository, this file will be copied to /etc/asound.conf, so you can implement your custom configuration. You might need to set the variable FORCE_PLAYBACK_DEVICE according to the contents of the provided file, unless the device you want to play to is named custom.

Installation on Moode Audio or Volumio

It is possible to use this solution for easy installation of Tidal Connect on Moode Audio and Volumio.
It is required to have a ssh connection to the Moode/Volumio audio box. In order to enable ssh on Volumio, refer to this page.
Those two platforms do not ship docker out of the box (unsurprisingly), so docker installation is required. See Docker Installation earlier in this page.

Configure Audio

If you have just installed docker with the previous commands, it is probably a good idea to logoff your current ssh session, then log back in. Otherwise, just open a ssh connection to your box.
We need to configure the audio output you want to use for Tidal Connect.
If your device only has one output, or if that output is also configured as the default output, no configuration might be needed other than the Friendly and Model name.

Single audio device

On one of my boxes, I have a Hifiberry Dac+ Pro Hat, so when I use the command:

cat /proc/asound/cards

I get:

pi@moode-living:~/git/tidal-connect $ cat /proc/asound/cards
 0 [sndrpihifiberry]: HifiberryDacp - snd_rpi_hifiberry_dacplus
                      snd_rpi_hifiberry_dacplus

Great, the operating system has just disabled the onboard audio and set the Hifiberry HAT as the default card.
So let's configure Tidal Connect:

cd $HOME/tidal-connect
./configure.sh -f "Living Aux1" -m "Raspberry Pi"

We are not specifying anything (not the card index and neither the name) because there is only one output available.
Replace the first and second strings to your liking. Once configured, start the service as usual:

cd $HOME/tidal-connect
docker-compose up -d

Multiple audio devices

On another one of my boxes, I have an usb dac connected, so when I use the command:

cat /proc/asound/cards

I get:

moode@moode:~ $ cat /proc/asound/cards
 0 [b1             ]: bcm2835_hdmi - bcm2835 HDMI 1
                      bcm2835 HDMI 1
 1 [Headphones     ]: bcm2835_headpho - bcm2835 Headphones
                      bcm2835 Headphones
 2 [X20            ]: USB-Audio - XMOS USB Audio 2.0
                      XMOS XMOS USB Audio 2.0 at usb-0000:01:00.0-1.2, high speed

So in this setup, the operating system has not disabled the onboard audio. Even if you have configured Moode so that is will use the USB DAC, this might not be enough for Tidal Connect to automatically select that card.
The safest way (at least IMO) is to use the string that identifies the dac as card name: So let's configure Tidal Connect:

cd $HOME/tidal-connect
./configure.sh -n "X20" -f "Desktop" -m "Raspberry Pi"

Replace the second and third strings to your liking. Once configured, start the service as usual:

cd $HOME/tidal-connect
docker-compose up -d

Caveat

Audio device locking

Tidal Connect will access exclusively your audio device if you select it in your desktop/mobile Tidal App.
If you want to play to the selected audio device from other sources, you will need to disconnect from the Tidal app you are using.
Similarly, you won't be able to play to a device if this device is already playing something from another source.
In order to check if a device is playing, follow the instructions in the next paragraphs.

Check Audio device is playing, by index

Say you have selected your card by its index (not recommended), and that the index is 1, you can execute the following command:

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

If this does not say "closed", it means that the audio device is being currently used.

Check Audio device is playing, by name

Say you have selected your card by its name, and that the name is D10, you can execute the following command:

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

If this does not say "closed", it means that the audio device is being currently used.

Hardware changes

Remember that, should you change something to your Moode/Volumio setup, maybe replacing the audio-hat with an USB DAC, you will most likely need to reconfigure Tidal Connect accordingly.

Volumio integration

Please be aware that this solution will not be completely equivalent to the built-in premium feature of Volumio. That solution (probably) allows the attached (touch) display to show the currently playing song, while this solution for sure does not allow that or any other related features.

Mandatory IPV6 support

Tidal connect won't work if your system does not support ipv6. See this issue.
Afaik, there is no solution or workaround available other than, somehow, enabling ipv6.

DietPi

On DietPi (which I am running on my Asus Tinkerboard), you might need to enable avahi-daemon, if this is not enabled yet.
You might find the following on the logs:

[tisoc] [error] [avahiImpl.cpp:358] avahi_client_new() FAILED: Daemon not running

This can be fixed by installing the avahi-daemon. It is not installed by default on DietPi, so we can installing it with this command:

sudo apt-get install avahi-daemon

An already started tidal-connect container should start working immediately, at least that is what happened with my setup.

Change History

Date Comment
2024-07-01 Add asound.conf for Apple USB dongle, see #187
2024-07-01 Add support for 48kHz tone, see #187
2024-06-17 Add presets for hdmi on raspberry pi
2024-04-08 Add sample config file for hifiberry dac plus
2024-04-06 Reverted removal of optional version property in docker-compose file (#160)
2024-04-02 Remove optional version property in docker-compose file
2024-04-02 Add sample config file for Yulong D200 USB DAC
2024-03-27 Add sample config file for hifiberry digi+ pro
2024-03-13 Support for disabling control app
2024-03-13 Support for overriding certificate path
2024-03-13 Support for log level
2024-03-13 Support for custom clientid
2024-03-04 Lowered default for RESTART_WAIT_SEC to 10
2024-03-04 Add logs.sh, restart.sh and restart-watch.sh scripts
2024-03-04 Add -w for RESTART_WAIT_SEC to configure.sh
2024-03-04 Corrected configure.sh (sequence of opts)
2024-03-04 Add aune-s6 dac configuration with softvolume
2024-03-03 Fix software volume, avoid to give up for a device which only contains Master (see #136)
2024-02-22 Add support for software volume
2024-02-22 Add support for configuration self-test using a generated tone
2024-02-17 Add support for newer variables in configure.sh, see #108
2024-01-30 Add support for ASOUND_FILE_PREFIX, see #101
2024-01-26 Assume custom playback device when asound.conf is provided, see #90
2024-01-25 Support custom asound.conf, support forced PLAYBACK device, see #80
2024-01-25 Revert latest change, see (#78)
2024-01-24 Always create sysdefault in asound.conf and log device names, see #76
2024-01-23 Add support for optional card device (CARD_DEVICE) and format (CARD_FORMAT), see #72
2023-09-12 Clarify how to install on Volumio, see issue #29
2023-09-04 Allow default audio card selection, see issue #22
2023-07-18 Allow user-specified dns server(s), see issue #13
2023-07-07 Fixed asound.conf generation from card index, see issue #2
2023-06-02 First unfolding seems to be working
2023-06-02 Some effort to avoid resampling
2023-06-02 MQA passthrough defaults to false
2023-06-01 Using hardware mode
2023-06-01 Resolve device name at container startup
2023-05-29 First working version

tidal-connect's People

Contributors

giof71 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tidal-connect's Issues

tidal-connect running on Raspberry Pi 5 / Debian 12 ?

Hello,

I used to run tidal-connect on moOde, using a Pi 4 connected via USB to my OPPO UDP-205 DAC.

For some reason, I can't make it work on a Pi 5 running Debian 12. Also tried on a clean Pi OS Lite image, without moOde - no luck. Everything seems to be correctly configured and I'm able to play songs using aplay but I can´t see the Pi on my Windows or IOS Tidal apps.

My logs look "okay" except for:

  • Cannot enable softvolume, a 'Master' control already exists for the device at index [0]
  • /app/ifi-tidal-release/bin/tidal_connect_application: error while loading shared libraries: libsystemd.so.0: ELF load command alignment not page-aligned

Before I post my full configs/logs, am I missing anything ? Is there any known compatibility issue ?

Thanks
Vasco

Error device locked (unlocked)

Hi!

I updated my Moode and tidal connect to latest version but now i have those errors, tidal connect won't showing in tidal apps.

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    | Tidal Connect - https://github.com/GioF71/tidal-connect.git - common.sh version 0.1.1
tidal-connect    | FRIENDLY_NAME=Moode
tidal-connect    | MODEL_NAME=Raspberry Pi 4b
tidal-connect    | MQA_CODEC=false
tidal-connect    | MQA_PASSTHROUGH=false
tidal-connect    | CARD_NAME=NOT_SET
tidal-connect    | CARD_INDEX=3
tidal-connect    | CARD_DEVICE=192.168.0.1
tidal-connect    | CARD_FORMAT=
tidal-connect    | CREATED_ASOUND_CARD_NAME=
tidal-connect    | ENABLE_SOFTVOLUME=yes
tidal-connect    | ENABLE_GENERATED_TONE=yes
tidal-connect    | ASOUND_FILE_PREFIX=
tidal-connect    | FORCE_PLAYBACK_DEVICE=
tidal-connect    | SLEEP_TIME_SEC=3
tidal-connect    | RESTART_ON_FAIL=1
tidal-connect    | RESTART_WAIT_SEC=10
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_INDEX=[3]
tidal-connect    | Set card_index=[3]
tidal-connect    | Entering write_audio_config with card_index=[3] ...
tidal-connect    | Creating sound configuration file (card_index=[3], softvol=[yes]) ...
tidal-connect    | Ok to enable softvolume, as no 'Master' control exists for the device at index [3]
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 3
tidal-connect    |     device 192.168.0.1
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    | ALSA lib pcm_hw.c:1723:(_snd_pcm_hw_open) Invalid type for device
tidal-connect    | aplay: main:788: audio open error: Invalid argument
tidal-connect    | tone_played=[0]
tidal-connect    | Device locked/invalid, won't start the application ...
tidal-connect    | Sleeping 10 seconds before restarting ...
tidal-connect    | Trying a short tone ...
tidal-connect    | ALSA lib pcm_hw.c:1723:(_snd_pcm_hw_open) Invalid type for device
tidal-connect    | aplay: main:788: audio open error: Invalid argument
tidal-connect    | tone_played=[0]
tidal-connect    | Device locked/invalid, won't start the application ...
tidal-connect    | Sleeping 10 seconds before restarting ...
tidal-connect    | Trying a short tone ...
tidal-connect    | ALSA lib pcm_hw.c:1723:(_snd_pcm_hw_open) Invalid type for device
tidal-connect    | aplay: main:788: audio open error: Invalid argument
tidal-connect    | tone_played=[0]
tidal-connect    | Device locked/invalid, won't start the application ...
tidal-connect    | Sleeping 10 seconds before restarting ...
tidal-connect    | Trying a short tone ...
tidal-connect    | ALSA lib pcm_hw.c:1723:(_snd_pcm_hw_open) Invalid type for device
tidal-connect    | aplay: main:788: audio open error: Invalid argument
tidal-connect    | tone_played=[0]
tidal-connect    | Device locked/invalid, won't start the application ...
tidal-connect    | Sleeping 10 seconds before restarting ...
tidal-connect    | Trying a short tone ...
tidal-connect    | ALSA lib pcm_hw.c:1723:(_snd_pcm_hw_open) Invalid type for device
tidal-connect    | aplay: main:788: audio open error: Invalid argument
tidal-connect    | tone_played=[0]
tidal-connect    | Device locked/invalid, won't start the application ...
tidal-connect    | Sleeping 10 seconds before restarting ...
tidal-connect    | Trying a short tone ...
tidal-connect    | ALSA lib pcm_hw.c:1723:(_snd_pcm_hw_open) Invalid type for device
tidal-connect    | aplay: main:788: audio open error: Invalid argument
tidal-connect    | tone_played=[0]
tidal-connect    | Device locked/invalid, won't start the application ...
tidal-connect    | Sleeping 10 seconds before restarting ...
tidal-connect    | Trying a short tone ...
tidal-connect    | ALSA lib pcm_hw.c:1723:(_snd_pcm_hw_open) Invalid type for device
tidal-connect    | aplay: main:788: audio open error: Invalid argument
tidal-connect    | tone_played=[0]
tidal-connect    | Device locked/invalid, won't start the application ...
tidal-connect    | Sleeping 10 seconds before restarting ...
tidal-connect    | Trying a short tone ...
tidal-connect    | ALSA lib pcm_hw.c:1723:(_snd_pcm_hw_open) Invalid type for device
tidal-connect    | aplay: main:788: audio open error: Invalid argument
tidal-connect    | tone_played=[0]
tidal-connect    | Device locked/invalid, won't start the application ...
tidal-connect    | Sleeping 10 seconds before restarting ...

Suddenly stopped working

First of all, thank you for your selfless contribution. I successfully installed it on a Raspberry Pi 4B running moode not long ago, and can play Tidal music through Tidal-connect normally. But it suddenly stopped working today, the progress bar didn't move after clicking play. I tried restarting the os, or reconfiguring configure.sh and restarting the container, but the issue was not solved.
This is my configuration:

~/tidal-connect $ cat /proc/asound/cards
  0 [b1]: bcm2835_hdmi - bcm2835 HDMI 1
                       bcm2835 HDMI 1
  1 [Headphones]: bcm2835_headpho - bcm2835 Headphones
                       bcm2835 Headphones
  2 [DAC]: USB-Audio - SMSL USB DAC
                       SMSL SMSL USB DAC at usb-0000:01:00.0-1.2, high speed

./configure.sh -n "DAC" -f "MoOde TIDAL connect" -m "MoOde Audio Streamer"

[Feature] Add support for a prefix for asound.conf

Add ASOUND_FILE_PREFIX variable. If set, this will be used as prefix.
e.g. say that

ASOUND_FILE_PREFIX=topping-d10

instead of looking for asound.conf in userconfig, we will look for

topping-d10.asound.conf

Moode - Tidal_Connect - CamillaDSP

Hello

I wanted to thank you for the great job.

My question concerns CamillaDSP support in Moode.

Is it possible to run tidal-connect with certain parameters so that CamillaDSP will work in Moode?

regards
mirmil

Revert #72

I changed entrypoint.sh so that it would create a device named sysdefault instead of default.
Of course it worked on my setup, not so for @looun (issue #72)
So I am reverting this change.

Not an issue but

I just wanted to say THANK YOU for all the great work and the lifetime you invested! This finally gave me a chance to upgrade moodeaudio to 64 bits and it still works fine on moode 9.02.

No audio on moodeaudio

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!

volume control

not really a big issue for me, because my DAC has a volume control.
Is it possible to get Tidal App volume control working for a USB DAC?

Play on rAudio: [WebsocketServer Start Error] Address family not supported by protocol

Please help me check! Cannot connect to rAudio (Pi 4)
rAudio: https://github.com/rern/rAudio

Get log: [WebsocketServer Start Error] Address family not supported by protocol

rAudio:~/tidal-connect # time nslookup tidal.com
Server: 192.168.11.1
Address: 192.168.11.1#53

Non-authoritative answer:
Name: tidal.com
Address: 13.35.166.34
Name: tidal.com
Address: 13.35.166.55
Name: tidal.com
Address: 13.35.166.123
Name: tidal.com
Address: 13.35.166.88
;; ;; Question section mismatch: got 34.166.35.13.in-addr.arpa/PTR/IN
;; communications error to 192.168.11.1#53: timed out
;; ;; Question section mismatch: got 34.166.35.13.in-addr.arpa/PTR/IN
;; communications error to 192.168.11.1#53: timed out
;; ;; Question section mismatch: got 34.166.35.13.in-addr.arpa/PTR/IN
;; communications error to 192.168.11.1#53: timed out
;; no servers could be reached

real 0m15.400s
user 0m0.028s
sys 0m0.033s

rAudio:~/tidal-connect # cat /proc/asound/cards
0 [sndrpirpidac ]: RPi-simple - snd_rpi_rpi_dac
snd_rpi_rpi_dac

rAudio:~/tidal-connect # ./configure.sh -i 0 -f "Pi4" -m "Pi 4 rAudio"
card_index=[0]
card_name=[]
Setting FRIENDLY_NAME to [Pi4]
Setting MODEL_NAME to [Pi 4 rAudio]
MQA_CODEC not specified
MQA_PASSTHROUGH not specified
SLEEP_TIME_SEC not specified
DNS_SERVER_LIST not specified
Setting CARD_INDEX to [0]

Final .env file:

FRIENDLY_NAME=Pi4
MODEL_NAME=Pi 4 rAudio
CARD_INDEX=0
CARD_NAME=NOT_SET
rAudio:~/tidal-connect # docker-compose up -d
[+] Running 1/1
✔ Container tidal-connect Started

                                                                                                                                              0.2s

rAudio:~/tidal-connect # docker-compose logs
tidal-connect | FRIENDLY_NAME=Pi4
tidal-connect | MODEL_NAME=Pi 4 rAudio
tidal-connect | MQA_CODEC=false
tidal-connect | MQA_PASSTHROUGH=false
tidal-connect | CARD_NAME=NOT_SET
tidal-connect | CARD_INDEX=0
tidal-connect | Set card_index=[0]
tidal-connect | Creating sound configuration file (card_index=0)...
tidal-connect | Sound configuration file created.
tidal-connect | defaults.pcm.card 0
tidal-connect | pcm.!default {
tidal-connect | type plug
tidal-connect | slave.pcm hw
tidal-connect | }
tidal-connect | Starting Speaker Application in Background (TMUX)
tidal-connect | Sleeping for a while (3 seconds)...
tidal-connect | Starting TIDAL Connect ...
tidal-connect | STARTING TidalConnect services, version: 1.1.3
tidal-connect | Expression 'GetExactSampleRate( hwParams, &defaultSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 895
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.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 pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
tidal-connect | ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
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 | [2023-08-31 04:12:00.571] [tisoc] [critical] [DeviceInfo.cpp:56] ioctl error. ret=-1, errno="No such device"
tidal-connect | [2023-08-31 04:12:00.571] [tisoc] [critical] [DeviceInfo.cpp:57] [ASSERT] generateDeviceId(0)
tidal-connect | [2023-08-31 04:12:00] [info] asio listen error: asio.system:97 (Address family not supported by protocol)
tidal-connect | [2023-08-31 04:12:00.592] [tisoc] [error] [WebsocketServer.hpp:67] [WebsocketServer Start Error] Address family not supported by protocol
tidal-connect | STARTED TidalConnect services.

Topping E30 II

Hi, today I tested with a topping E30 II USB DAC and here it doesn't seem to work. I'm getting restart loops with the following error:
" /app/ifi-tidal-release/bin/tidal_connect_application: error while loading shared libraries: libsystemd.so.0: ELF load command alignment not page-aligned"

The config loaded is this, so the DAC is found (Card name is really "II" as shown:

Tidal Connect - https://github.com/GioF71/tidal-connect.git - entrypoint.sh version 0.1.7
tidal-connect | Tidal Connect - https://github.com/GioF71/tidal-connect.git - common.sh version 0.1.5
tidal-connect | FRIENDLY_NAME=MoodeHiFi
tidal-connect | MODEL_NAME=USB-Audio - E30 II
tidal-connect | MQA_CODEC=false
tidal-connect | MQA_PASSTHROUGH=false
tidal-connect | CARD_NAME=II
tidal-connect | CARD_INDEX=
tidal-connect | CARD_DEVICE=
tidal-connect | CARD_FORMAT=
tidal-connect | CREATED_ASOUND_CARD_NAME=
tidal-connect | ENABLE_SOFTVOLUME=yes
tidal-connect | ENABLE_GENERATED_TONE=yes
tidal-connect | ASOUND_FILE_PREFIX=
tidal-connect | FORCE_PLAYBACK_DEVICE=
tidal-connect | SLEEP_TIME_SEC=3
tidal-connect | RESTART_ON_FAIL=1
tidal-connect | RESTART_WAIT_SEC=10
tidal-connect | CLIENT_ID=
tidal-connect | LOG_LEVEL=3
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=[II]
tidal-connect | Found audio device [II] as index [0]
tidal-connect | Entering write_audio_config with card_index=[0] ...
tidal-connect | Creating sound configuration file (card_index=[0], softvol=[yes]) ...
tidal-connect | check_master=[numid=5,iface=MIXER,name='Master']
tidal-connect | Cannot enable softvolume, a 'Master' control already exists for the device at index [0]
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 0
tidal-connect | }
tidal-connect | }

How can I be sure that sound path is "bitperfect"?

Hi,
I installed tidal-connect by your script on a Raspberry Pi 4 with Moode, connected to an integrated amplifier (Mission 778X) by USB .
Using Tidal app from my iphone, I read "MQA" under title of song (and effectively it sound very good!).
How can I ensure that sound path from Tidal to my ampli is "bitperfect", without re-encoding/resampling?

Thanks

No volume control via phone when streaming Tidal from phone app

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

no sound with max/mqa

Hello,

i am running this container on a rasberry pi 2 with moode.
The rasberry is connected to a hifiberry digi+ head. The .env is complete default. Tracks with "high" works but not tracks with max/mqa. Any help would be nice.

How do you use this with sound over hdmi?

I'm using an rpi4, with 64-bit raspi-os on it.
I would like to try to play audio over my hdmi cord, as it goes to my receiver which is also my home theater setup.
I was able to get this working with the default pi audo jack cord, but whenever I try to use hdmi, I get this error:
Sleeping 10 seconds before restarting ...
Trying a short tone ...
Playing WAVE '/assets/audio/short-low-tone.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:1299: Sample format non available
Available formats:

  • IEC958_SUBFRAME_LE
    tone_played=[0]
    Device locked/invalid, won't start the application ...

Any idea how to fix this? Or do you have to use a standalone DAC/unused source

Also, my end goal is to get this to work in kodi, and maybe make my own addon to support this. Any idea on how to start, or if that is even possible?

Tidal Connect Docker on rAudio 64 bit working!

I have successfully run your Tidal Connect Docker on rAudio 64 bit (Pi 4).
However, there was a small modification to automatically assign the Sound Card from rAudio to Tidal Connect.
Everything is working perfectly, thank you once again!

I've stored them here: https://github.com/lovehifi/tidal-raudio-pi4

Docker logs:
rAudio:/tmp # docker logs c052cb141226
Card number: 0
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.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
Device info for the card number: REIYIN Bluetooth Audio WT- HD05: USB Audio (hw:0,0)
FRIENDLY_NAME=rAudio
MODEL_NAME=Pi 4
MQA_CODEC=false
MQA_PASSTHROUGH=false
CARD_NAME=
CARD_INDEX=
BEFORE
defaults.pcm.card 0
defaults.ctl.card 0

Specified CARD_NAME=[REIYIN Bluetooth Audio WT- HD05: USB Audio (hw:0,0)]
defaults.pcm.card 0
defaults.ctl.card 0

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.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.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
[2023-10-06 13:24:11.907] [tisoc] [critical] [DeviceInfo.cpp:56] ioctl error. ret=-1, errno="No such device"
[2023-10-06 13:24:11.907] [tisoc] [critical] [DeviceInfo.cpp:57] [ASSERT] generateDeviceId(0)
STARTED TidalConnect services.
[2023-10-06 13:24:40.207] [tisoc] [warning] [PlaybackControllerImpl.cpp:472] Illegal state:1
[2023-10-06 13:24:42.999] [tisoc] [warning] [logger.cpp:22] [audio_worker.cpp:321] Attempting to initialize a decoder without initial data!

Coreelec/tidal-connect Hi-Res/MQA bad streaming to SPDIF out

hello, after some trouble i have successful run docker tidal-connect on amlogic box(Ki pro) with Coreelec ;) ...very nice

When i playback the hi-fi(44.1k/16bit) track it's work fine SPDIF out to my external DAC loxjie D30, without any issues.
when i playback Hi-Res/MQA playback very bad with lot of noise,interruption.

I have force also:
--codec-mqa true
--enable-mqa-passthrough true

When i playback with kodi addon or Mconnect/UPnp there are not issues, but i prefer tidal-connect ;)
Thanks.

MQA still enabled?

Running default args (and also as false) gives me magenta MQA light on SMSL D6s DAC for all 24bit songs, even though Tidal on Windows gives FLAC. Is this expected?

Args as true does same but blue MQA light.

How to completely disable MQA, to get FLAC?

Error running tidal_connect_application

Error running tidal_connect_application - looping restarts within the container.

RPiOS: 11.9 Bullseye 32-bit | Linux: 6.1.21+ 32-bit
Model: Pi-Zero 1.1
Audio: Audiotrak ProDigy CUBE

I know RPi Zero W could have performance issues but it would be great if it at least would have started.

pi@piair:~ $ cat /proc/asound/cards
 0 [b1             ]: bcm2835_hdmi - bcm2835 HDMI 1
                      bcm2835 HDMI 1
 1 [CUBE           ]: USB-Audio - Audiotrak ProDigy CUBE
                      GYROCOM C&C Co., LTD Audiotrak ProDigy CUBE at usb-20980000.usb-1, full speed
pi@piair:~/tidal-connect $ tail ./.env
FRIENDLY_NAME=Desktop
MODEL_NAME=Raspberry Pi
CARD_NAME=CUBE

logs.sh (a part of an output):

pi@piair:~/tidal-connect $ ./logs.sh
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.1
tidal-connect    | FRIENDLY_NAME=Desktop
tidal-connect    | MODEL_NAME=Raspberry Pi
tidal-connect    | MQA_CODEC=false
tidal-connect    | MQA_PASSTHROUGH=false
tidal-connect    | CARD_NAME=CUBE
tidal-connect    | CARD_INDEX=
tidal-connect    | CARD_DEVICE=
tidal-connect    | CARD_FORMAT=
tidal-connect    | CREATED_ASOUND_CARD_NAME=
tidal-connect    | ENABLE_SOFTVOLUME=yes
tidal-connect    | ENABLE_GENERATED_TONE=yes
tidal-connect    | ASOUND_FILE_PREFIX=
tidal-connect    | FORCE_PLAYBACK_DEVICE=
tidal-connect    | SLEEP_TIME_SEC=3
tidal-connect    | RESTART_ON_FAIL=1
tidal-connect    | RESTART_WAIT_SEC=10
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=[CUBE]
tidal-connect    | Skipping audio device [b1] at index [0]
tidal-connect    | Skipping audio device [b1] at index [0]
tidal-connect    | Found audio device [CUBE] as index [1]
tidal-connect    | Entering write_audio_config with card_index=[1] ...
tidal-connect    | Creating sound configuration file (card_index=[1], softvol=[y                                                                                                             es]) ...
tidal-connect    | Ok to enable softvolume, as no 'Master' control exists for th                                                                                                             e device at index [1]
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 1
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 b                                                                                                             it Little Endian, Rate 44100 Hz, Stereo
tidal-connect    | tone_played=[1]
tidal-connect    | Starting TIDAL Connect ...
tidal-connect    |
tidal-connect    | /entrypoint.sh: line 77:   115 Illegal instruction     (core                                                                                                              dumped) /app/ifi-tidal-release/bin/tidal_connect_application --tc-certificate-pa                                                                                                             th "/app/ifi-tidal-release/id_certificate/IfiAudio_ZenStream.dat" --playback-dev                                                                                                             ice CUBE -f "${friendly_name}" --model-name "${model_name}" --codec-mpegh true -                                                                                                             -codec-mqa ${mqa_codec} --disable-app-security false --disable-web-security fals                                                                                                             e --enable-mqa-passthrough ${mqa_passthrough} --log-level 3 --enable-websocket-l                                                                                                             og "0"
tidal-connect    | TIDAL Connect Container Stopped.
tidal-connect    | Sleeping 10 seconds before restarting ...

Apple USB-C to 3.5mm Headphone Jack on Moode with softvol

MoOde Release: 8.3.9 2024-02-23
RaspiOS: 11.9 Bullseye 32-bit

cat /proc/asound/cards
 1 [A              ]: USB-Audio - USB-C to 3.5mm Headphone Jack A
                      Apple, Inc. USB-C to 3.5mm Headphone Jack A at usb-3f980000.usb-1.5, full speed

.env:

MQA_PASSTHROUGH=true
FRIENDLY_NAME=Tidal Connect
ENABLE_GENERATED_TONE=no
CARD_NAME=DAC
CARD_FORMAT=S24_3LE
ENABLE_SOFTVOL=yes
ASOUND_FILE_PREFIX=applejack

userconfig/applejack.asound.conf:

pcm.softvol {
    type            softvol
    slave {
        pcm         "hw:CARD=A,DEV=0"
    }
    control {
        name        "SoftMaster"
        card        "A"
    }
}

pcm.!default {
    type             plug
    slave {
        pcm         "softvol"
    }
}

ctl.!default {
    type hw
    card "A"
}

USB XMOS audio device not shown

thank you so much for this great script
it was a breeze to setup with Pi OS on a Pi4B. So far i can only make it work with an old USB DAC and not my new and good quality USB XMOS Dac. It´s neither listed under "aplay -l" nor "lsusb".
I can´t seem to find somebody having similar issues, so i might aswell ask here.
Best!

[Feature] Avoid stop when audio output is busy

If we start/restart the container while the selected audio output is used by any other application, the container will stop and require manual intervention in order to restart.
We might need an automatic restart cycle.

Is it possible to run TidalConnect on MoOdeAudio?

I have RPi4. Is it possible to run TidalConnect on MOodeAudio? I performed 'install docker', 'clone' and 'update' one by one. The option to select TIDALCONNECT does not appear in the application list. What am I doing wrong? Is something missing? Does the latest MOode system block the ability to activate this script?

Invalid interpolation format for "tidal-connect" option in service "services":

Hello,

I get this error:

pi@moode:~/tidal-connect $ docker-compose up -d                                                                                               
ERROR: Invalid interpolation format for "tidal-connect" option in service "services": "CARD_NAME=${CARD_NAME:-}"

I have tried ./configure.sh -f "Desktop" -m "Raspberry Pi" or ./configure.sh -i "2" -f "Desktop" -m "Raspberry Pi" but no solution.

pi@moode:~ $ cat /proc/asound/cards
 0 [b1             ]: bcm2835_hdmi - bcm2835 HDMI 1                                                                                           
                      bcm2835 HDMI 1                                                                                                          
 1 [Headphones     ]: bcm2835_headpho - bcm2835 Headphones                                                                                    
                      bcm2835 Headphones                                                                                                      
 2 [M4             ]: USB-Audio - M4                                                                                                          
                      MOTU M4 at usb-0000:01:00.0-1.2, high speed                                                                             
pi@moode:~ $

any idea about this?

How to turn on service?

Hi!

I was installed this on moode audio 8.3.3 but after install it doesn't showing in tidal apps.

Tidal connect inconsistent from tidal app

Since yesterday I have setup this library on a pi 4 running moode audio. I have had no problems playing music from my PC to my raspberry through tidal connect and it is working like a charm! However when trying with the tidal app on my phone (Pixel 7) i am getting a lot of inconsistencies. Last night my phone wasn't able to discover the tidal connect device although today it is able to identify the device. However when I click on it to begin playing, rarely it starts playing and most often it doesn't connect at all. There is a spinning loader on the top of the app for 100ms and then nothing happens. I have tried changing the dns in the configuration to my router's ip address but it didn't help. The raspberry and the phone are both connected via wifi to the same access point. (PC is connected via ethernet and is working fine)

Here is the line i use to generate the config
./configure.sh -n "b1" -f "Home theater" -m "Raspberry Pi" -d "192.168.1.1" -c "true" -p "true"

Thanks for your help and this awesome repo!

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.