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

Support to a Tidal Connect #371

Open
nmcmartins opened this issue Dec 12, 2020 · 6 comments
Open

Support to a Tidal Connect #371

nmcmartins opened this issue Dec 12, 2020 · 6 comments
Labels
enhancement New feature or request plugins For general plugin issues and requests

Comments

@nmcmartins
Copy link

An excellent improvement will be to include support for Tidal Connect.

@nmcmartins nmcmartins added the enhancement New feature or request label Dec 12, 2020
@shawaj shawaj added the plugins For general plugin issues and requests label Jan 2, 2021
@shawaj
Copy link
Contributor

shawaj commented Jan 2, 2021

More info on Tidal connect

It appears to be closed source. You have to register your interest here and wait to hear back from them.

@shawaj
Copy link
Contributor

shawaj commented Jan 2, 2021

@shawaj
Copy link
Contributor

shawaj commented Jan 3, 2021

Have almost got this running as a plugin. Have pushed my dev branch here #399

Full error output...
root@2ec9b5a:/usr/ifi/ifi-tidal-release/bin# /usr/ifi/ifi-tidal-release/bin/tidal_connect_application \
>                         --tc-certificate-path "/usr/ifi/ifi-tidal-release/id_certificate/IfiAudio_ZenStream.dat" \
>                         --netif-for-deviceid wlan0 \
>                         -f "balenaSound stream to project" \
>                         --codec-mpegh true \
>                         --codec-mqa false \
>                         --model-name "balenaSound Streamer"
STARTING TidalConnect services, version: 1.1.3
[2021-01-03 21:19:00.254] [tisoc] [info] [HttpClient.cpp:25] certification path: /etc/ssl/certs
Expression 'GetExactSampleRate( hwParams, &defaultSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 895
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 934
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 934
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 934
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
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
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib conf.c:5014:(snd_config_expand) Unknown parameters {AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2  CARD 0}
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM iec958:{AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2  CARD 0}
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
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
[2021-01-03 21:19:00.409] [tisoc] [debug] [DeviceInfo.cpp:103] mac addr : "dc:a6:32:a4:af:4d"
[2021-01-03 21:19:00.409] [tisoc] [debug] [DeviceInfo.cpp:113] device id: "c263d56a5eb7cf4c137755762be5fb00"
[2021-01-03 21:19:00.409] [tisoc] [trace] [avahiImpl.cpp:33] serviceName : balenaSound Streamer-e322c9768461956dbefe40c0d0bae127
[2021-01-03 21:19:00.409] [tisoc] [info] [ServiceManager.cpp:19] service registered: clientcomm
[2021-01-03 21:19:00.409] [tisoc] [info] [ServiceManager.cpp:19] service registered: queue
[2021-01-03 21:19:00.409] [tisoc] [info] [ServiceManager.cpp:19] service registered: playback
[2021-01-03 21:19:00.409] [tisoc] [info] [ServiceManager.cpp:19] service registered: session
[2021-01-03 21:19:00.409] [tisoc] [info] [ServiceManager.cpp:19] service registered: speaker
[2021-01-03 21:19:00.409] [tisoc] [info] [ServiceManager.cpp:19] service registered: mdns
[2021-01-03 21:19:00.409] [tisoc] [debug] [SpeakerCommunicatorImpl.cpp:72] ## SpeakerCommunicator Config ##
[2021-01-03 21:19:00.409] [tisoc] [debug] [SpeakerCommunicatorImpl.cpp:73]  controller-unix-socket-path : "/tmp/tisoc-controller"
[2021-01-03 21:19:00.409] [tisoc] [info] [SpkconServer.cpp:38] SpkconServer start
[2021-01-03 21:19:00.409] [tisoc] [info] [SpkconServer.cpp:442] updateConnectionState:0->1
[2021-01-03 21:19:00.410] [tisoc] [debug] [SpkconServer.cpp:156] socket create success. fd=3
[2021-01-03 21:19:00.411] [tisoc] [info] [SpkconServer.cpp:66] SpkconServer start ret:true
[2021-01-03 21:19:00.412] [tisoc] [info] [SpkconServer.cpp:384] packetSenderThread start
[2021-01-03 21:19:00.412] [tisoc] [debug] [Service.cpp:29] started  :: speaker
[2021-01-03 21:19:00.412] [tisoc] [debug] [avahiImpl.cpp:57] config.useDaemon_:false
[2021-01-03 21:19:00.412] [tisoc] [debug] [avahiImpl.cpp:58] config.autoStart_:true
[2021-01-03 21:19:00.412] [tisoc] [info] [SpkconServer.cpp:261] socketControlThread start.
[2021-01-03 21:19:00.413] [tisoc] [debug] [SpkconServer.cpp:286] wait connect.
[2021-01-03 21:19:00.413] [tisoc] [error] [avahiImpl.cpp:358] avahi_client_new() FAILED: Daemon not running
[2021-01-03 21:19:00.413] [tisoc] [error] [avahiImpl.cpp:70] avahi start failed.
[2021-01-03 21:19:00.413] [tisoc] [debug] [Service.cpp:29] started  :: mdns
[2021-01-03 21:19:00.413] [tisoc] [info] [ServiceManager.cpp:27] service started: mdns
[2021-01-03 21:19:00.414] [tisoc] [info] [ServiceManager.cpp:28] 
useDaemon   : 0
autoStart   : 1
serviceName : balenaSound Streamer-e322c9768461956dbefe40c0d0bae127
serviceType : _tidalconnect._tcp
modelName   : balenaSound Streamer
capability  : 1
port        : 2019
deviceId    : e322c9768461956dbefe40c0d0bae127
friendlyName: balenaSound stream to project
[2021-01-03 21:19:00.414] [tisoc] [trace] [PlaybackControllerImpl.cpp:79] ## PlaybackController Config ##
[2021-01-03 21:19:00.414] [tisoc] [debug] [PlaybackControllerImpl.cpp:80]  disable-web-security : false
[2021-01-03 21:19:00.415] [tisoc] [debug] [Service.cpp:29] started  :: playback
[2021-01-03 21:19:00.415] [tisoc] [info] [ServiceManager.cpp:27] service started: playback
[2021-01-03 21:19:00.415] [tisoc] [info] [ServiceManager.cpp:28] 
disableWebSecurity  : 0
[2021-01-03 21:19:00.469] [tisoc] [debug] [Service.cpp:29] started  :: clientcomm
[2021-01-03 21:19:00.469] [tisoc] [info] [ServiceManager.cpp:27] service started: clientcomm
[2021-01-03 21:19:00.470] [tisoc] [info] [ServiceManager.cpp:28] 
websocket-port      : 2019
disable-app-security: 0
enable-websocket-log: 0
[2021-01-03 21:19:00.472] [tisoc] [debug] [Service.cpp:29] started  :: session
[2021-01-03 21:19:00.473] [tisoc] [info] [ServiceManager.cpp:27] service started: session
[2021-01-03 21:19:00.473] [tisoc] [info] [ServiceManager.cpp:28] 

[2021-01-03 21:19:00.473] [tisoc] [trace] [QueueManagerImpl.cpp:43] ## QueueManager Config ##
[2021-01-03 21:19:00.473] [tisoc] [debug] [QueueManagerImpl.cpp:44]  disable-web-security : false
[2021-01-03 21:19:00.474] [tisoc] [debug] [Service.cpp:29] started  :: queue
[2021-01-03 21:19:00.474] [tisoc] [info] [ServiceManager.cpp:27] service started: queue
[2021-01-03 21:19:00.475] [tisoc] [info] [ServiceManager.cpp:28] 
disableWebSecurity_: 0

STARTED TidalConnect services.

The key error is:

[2021-01-03 21:19:00.413] [tisoc] [error] [avahiImpl.cpp:358] avahi_client_new() FAILED: Daemon not running
[2021-01-03 21:19:00.413] [tisoc] [error] [avahiImpl.cpp:70] avahi start failed.

Basically I think it is trying to use avahi / avahi-daemon - but it can't because balenaOS doesn't have systemd in the containers. So I think I maybe need to find some way to use DBUS to work with avahi in the balena HostOS.

Bit in over my head now to be honest! Will keep messing around with it.

But the good news is that the tidal connect service is authenticating and it is running - it just doesn't actually advertise properly over mDNS so the Tidal app can't find it.

Loads more info here too - #399 (comment)

@shawaj
Copy link
Contributor

shawaj commented Jan 4, 2021

@nmcmartins good news - i got it working #399 (comment)

Need to tidy it up and sort out volume control and some other stuff but it is working so far. If you want you can test it using balena CLI...

@npmstart-pray
Copy link

Any updates/progress reports?

@marcgarciamarti
Copy link

@nmcmartins good news - i got it working #399 (comment)

Need to tidy it up and sort out volume control and some other stuff but it is working so far. If you want you can test it using balena CLI...

Hi! Could you provide guidance on how to enable this?

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugins For general plugin issues and requests
Projects
None yet
Development

No branches or pull requests

4 participants