Jump to content
IGNORED

Tidal Connect on Raspberry (how-to)


Recommended Posts

9 hours ago, Robert Pallmann said:

Here are two more prints, which are hopefully useful:

 

devices file print:

image.png.3c33e0196fc63576a62bfcc62f92f102.png

 

connect.service file print:

image.thumb.png.596fc9747a3f839a298dc325ba084ce1.png

 

Thank you!

Hi. Just add the slash '\' to the end of the line on says 'enable-websocket-log. Note all the lines upper of this ends with it. Save and restart with sudo systemctl daemon-reload, or just restart the rpi. 

Link to comment

Thank you all for your swift responses. It is truly appreciated. I really cannot thank you enough.

 

I feel like i have gotten closer but I am still not there. Any additional hints / things to check?

 

Here is where I got to:

 

I did a clean install, updated all the files, added the missing \, corrected the hw:2,0 after getting an error message and now tidal connect does appear to see the DAC. 

 

However, it still does not play music. I can connect to Tidal Connect in the Android App, but then I hit play, the play button just circles and it will not start.

 

I then went in and changed the default ALSA device as xthesaintx suggested. (from 0 to 2) It does not appear to have made any difference.

 

Here is the current status print:

image.thumb.png.a53ec8832da4f2214b12734982279a87.png

 

Again, thank you so so much for your help!

 

Link to comment

I see you're running a Schiit Modi 3+ which has an option to be powered externally, rather than rely on the Pi to do it.

I'd suggest trying that, I've had problems with some DAC not playing nice with relying on power from the Pi and have had to either be externally powered or go through a powered hub.

 

-- First stop the tidal service if it's running --

 

systemctl stop ifi-streamer-tidal-connect.service

 

--Some more audio config options --

 

sudo raspi-config

1. System Options

S2 Audio

[Select the DAC, it may show up as a number with nothing next to it](see screenshot, 0 is my DAC)

 

 

-- If you do the reorder as my above comment --

Do a reboot and aplay -l, your DAC should be HW 0,0 (Card 0).

So you will need to update the config for Tidal.

 

-- What happens when --

You run this command

 

/usr/ifi/ifi-tidal-release/bin/tidal_connect_application --tc-certificate-path /usr/ifi/ifi-tidal-release/id_certificate/IfiAudio_ZenStream.dat -f MusicPi --codec-mpegh true --codec-mqa true --model-name MusicPi --disable-app-security false --disable-web-security false --enable-mqa-passthrough true --log-level 3 --enable-websocket-log 0 --playback-device 'Schiit Modi 3+: USB Audio (hw:2,0)'

 

(Ctrl+C to cancel out)

If there is a problem with the naming of the DAC you should get an output similar to (in the last lines):

 

Could not find device: 'XXXX'. Fallback to default device

Valid devices are: 'XXXX' 'bcm2835 Headphones: - (hw:1,0)' 'sysdefault' 'front' 'surround40' 'iec958' 'spdif' 'lavrate' 'samplerate' 'speexrate' 'a52' 'upmix' 'vdownmix' 'default' 'dmix'

 

-----

  • I'd start with raspi-config, and card reorder and reboot.
  • Check aplay-l see that it's in card 0
  • Manually run the command, change (hw:2,0) to (hw:0,0) if needed
  • See if the name is correct, if not correct it in the command and run again.
  • Test that it works with streaming, if so change the Tidal playback-device config to match the command line.
  • systemctl daemon-reload
  • systemctl start ifi-streamer-tidal-connect.service

 

Screenshot 2022-02-10 at 7.40.45 AM.png

Link to comment

xthesaintx, thank you for all the suggestions. you have been super helpful!

 

I had quite a frustrating day. I got it to work for a little while, then got greedy and wanted to rename the Tidal Connect player name and after renaming it stopped working.

 

I then started over from scratch but could not get it to work. Here are my steps:

 

1) Change default device by creating the file you suggested sudo nano /etc/modprobe.d/alsa-base.conf

2) update raspi-config

3) run the tidal connect installer

4) update the device list using the following command:

        sudo ./usr/ifi/ifi-tidal-release/pa_devs/run.sh

    (this seems to update the devices list with the correct items rather than listing devices I dont have, like a SPDIF connector)

5) update the playing device by:

        sudo nano /lib/systemd/system/ifi-streamer-tidal-connect.service

    * add "\" to last line

    * insert: --playback-device "Schiit Modi 3+: USB Audio (hw:0,0)"

    (its device 0 since the default got changed in step 1 and 2)

6) set the service to start automatically after restarts

7) updated the default sample rate from 48khz to 44.1khz

           sudo nano /usr/share/alsa/alsa.conf
           *edit the sample rate: 
           defaults.pcm.dmix.rate 44100

     (i did this since when it worked once, it was stuttering. I then changed the sample rate and thats when it worked for a little while)

8) restarted and checked the status.

 

Tidal would connect but the play button would spin and not actually play. 

 

I then ran the long command you suggested and got the following result (device #0,0):

/usr/ifi/ifi-tidal-release/bin/tidal_connect_application --tc-certificate-path /usr/ifi/ifi-tidal-release/id_certificate/IfiAudio_ZenStream.dat -f MusicPi --codec-mpegh true --codec-mqa true --model-name MusicPi --disable-app-security false --disable-web-security false --enable-mqa-passthrough true --log-level 3 --enable-websocket-log 0 --playback-device 'Schiit Modi 3+: USB Audio (hw:0,0)'

 

image.thumb.png.03042a8da01b0752e815abd835d3d083.png

 

here is the status print (just in case)

 

image.thumb.png.82ffda350f17cce3e1f8789c0bfe2c74.png

 

I truly appreciate all your help! Thank you so much.

Link to comment

Will have a closer look when I get to a computer... I'm not sure what "ifi-tidal-release/pa_devs/run.sh" is doing, but I see some issues on GitHub about it and external dac... I've never run it, I'd suggest it could be an issue.  

 

I've also had problems renaming the service and it has broken it for me, so I leave it as the default.

Link to comment

Thanks again for your help!

 

I started once more without using the run.sh command. Unfortunately same result: still spinning play button and no connection. Oh, by the way, the DAC has its own power supply.

 

here is what i did:

1) Change default device by creating the file you suggested sudo nano /etc/modprobe.d/alsa-base.conf

2) update raspi-config

3) updated the default sample rate from 48khz to 44.1khz

4) run the tidal connect installer

5) update the device list manually

6) update the playing device file  

7) set the service to start automatically after restarts

8) restarted and checked the status.

 

Tidal would connect but the play button would spin and not actually play. 

 

Here is the output from the long command (as well as prints from the other files and status)

image.thumb.png.65dd386268b792954cad4ce5f12cd4bb.png

status file print:

image.thumb.png.2e598f75282df0a3eb7bb664001e8219.png

devices file print:

image.png.04d3feadf4c83d65a4e85fbbace71465.png

tidal connect service file print:

image.thumb.png.e9ca3dc9aef3150bd84d1f50a095d66e.png

Link to comment

I'd try for starters, editing the device file

 

sudo nano /usr/ifi/ifi-tidal-release/pa_devs/devices

 

--

Mine for example is:

--

device#0=rockchip-spdif: - (hw:0,0)

device#1=JDS Labs Element II: USB Audio (hw:0,0)

device#2=sysdefault

device#3=default

device#4=dmix

Number of devices = 5

--

So I'd suggest editing it back to your original version (attached), just update the USB Audio (hw:1,0) to (hw:0,0)

 

A lot of the status/run errors seem to be ALSA not finding devices you have listed.

 

--

I've attached a screenshot of my aplay -L and aplay -l

you can see in the aplay -L because I've just set my Audioengine D1 as default with the reorder and raspi-config it just propagates to all those other "devices" in your list.

 

Ideally the goal of setting up the dac is getting it just to be the default sound out for the Pi, the only thing you really should have to worry about with the Tidal connect is getting the name correct in the config file.

 

----

 

I've just noticed in your screenshots it looks like you're running Moode, not stock Raspbian, I don't know what effect that will have as it is it's own bespoke image.  I've only set-up Tidal Connect on standard headless Raspbian images (Tidal Connect, Airplay, MPD and Spotify Connect are all pretty easy to setup)

image.png.3c33e0196fc63576a62bfcc62f92f102.png

Screenshot 2022-02-11 at 7.53.09 AM.png

Link to comment
20 minutes ago, Robert Pallmann said:

SUCCESS!!!!!!

 

I think the remove V4 and install V3 did it. I did not mess with the devices yet. (and now will not)

 

THANK YOU!!!!!!

 

No problem! Glad it's working... The v3 / v4 thing did my head in, I had mine all set up and was going great and I think installed or updated php and it broke it, many hours getting to the bottom of that one.

Link to comment
  • 4 weeks later...

Managed to get this working on a Pi with a HifiBerry DAC+ Pro. Glad we finally have the ability to do this direct to the streamer, previously I was using Airplay 2. A couple of questions:

 

Is there a way to tell what quality the stream is from Tidal Connect, or will it just default to the highest available for your subscription?

 

The --Codec-mqa true , is this forcing streaming MQA to the Pi and then doing the unwrap to decode for the DAC, or do you need to do something special to unwrap MQA?

 

Link to comment
2 hours ago, Wosp95 said:

Managed to get this working on a Pi with a HifiBerry DAC+ Pro. Glad we finally have the ability to do this direct to the streamer, previously I was using Airplay 2. A couple of questions:

 

Is there a way to tell what quality the stream is from Tidal Connect, or will it just default to the highest available for your subscription?

 

The --Codec-mqa true , is this forcing streaming MQA to the Pi and then doing the unwrap to decode for the DAC, or do you need to do something special to unwrap MQA?

 

 

That's right. It forces streaming max quality of the song by default. it will change to the max quality available from each song. I have tested right now that if you change de quality from tidal app, on the next song it will play that quality selected.

Link to comment
9 hours ago, Wosp95 said:

Managed to get this working on a Pi with a HifiBerry DAC+ Pro. Glad we finally have the ability to do this direct to the streamer, previously I was using Airplay 2. A couple of questions:

 

Is there a way to tell what quality the stream is from Tidal Connect, or will it just default to the highest available for your subscription?

 

The --Codec-mqa true , is this forcing streaming MQA to the Pi and then doing the unwrap to decode for the DAC, or do you need to do something special to unwrap MQA?

 

MQA - should depend on your DAC whether or not it's handled by hardware or software.

The Tidal app will show what quality it's streaming at.

Link to comment
  • 2 weeks later...

Nevermind, i got it working, but the sound is abysmal! I am currently using a jack to jack cable with a JBL Charge 5 and this DAC:

 

InnoMaker Raspberry Pi HIFI DAC HAT PCM5122 HIFI DAC Audio Card Expansion Board for Raspberry Pi 4 3 B+ Pi Zero etc. (DAC HAT) : Amazon.de: Gewerbe, Industrie & Wissenschaft

Connect1.jpg

Connect2.jpg

 

PS: I did use the moode OS GUI beforehand to test the DAC and the sound was amazing.

 

EDIT: I tried setting MQA to false, didn't help.

Link to comment

Disregard my previous post. I connected my Denon AVR X2000 to the RCA plugs from the DAC and everything is working as intended! Super happy!

BUT: Could someone explain what this means?: "illegal state", "broken pipe", "connection reset by peer", "attempting to initialize a decoder without initial data"

image.thumb.png.7b0db08157582f097c50c5e466e9f4cc.png

Link to comment
2 hours ago, phimabu said:

Disregard my previous post. I connected my Denon AVR X2000 to the RCA plugs from the DAC and everything is working as intended! Super happy!

BUT: Could someone explain what this means?: "illegal state", "broken pipe", "connection reset by peer", "attempting to initialize a decoder without initial data"

image.thumb.png.7b0db08157582f097c50c5e466e9f4cc.png

 

All in one reply to your posts:

  • Audio jack on the pi is awful, RCA on the DAC hat is the way to go, it's not a bad wee one you got. 
  • MQA to false :- unless you're DAC has a MQA unfolder, not much point setting it to true, and MQA is technically lossy, so I usually stick to the lossless HiFi with Tidal
  • "Attempting to initialize a decoder without initial data" - If it works, ignore the errors, this version of Tidal connect is "appropriated" from a ifi media streamer, so it's going to have it's oddities running on hardware it wasn't intended for. Hence the libcurl 3/4 errors and random crashes.

I've removed all my streaming from my PI, I use it as a MPD player hooked up to a DAC and it runs my media centre but for streaming I use WiiM mini - it puts out bit perfect via toslink, so hooks up to the DAC, it's got a great app on iOS and android, intergrates with Siri and Alexa, and does Tidal connect, Spotify connect, Airplay, Bluetooth, integrates with all the major music services (heart radio, deezer, qobuz)..... and it's cheaper than a Pi, I picked mine up from AliExpress for $80 (NZD) (55USD)

 

https://wiimhome.com/Overview.html

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...