TonyTromp / tidal-connect-docker

This is the dockerized version of Tidal Connect Raspberry binairies. Can be seemlessly used in HifiberryOS or any other RPi based operating system running Docker.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Volume control not working on HIFIBERRY DAC2 PRO

lomdar67 opened this issue · comments

Probably not a issue just me being stupid:

NO VOLUME * Please check your volume setting on your device and use your device to increase the volume. If setup/dac is recognized it you will see volume changes also updating in the HifiBerry Audio Controls.

If I understand it correctly volume control with e.g. the iOS or Android Tidal app should be working, right?

I have a HIFIBERRY DAC2 PRO with a Raspberry 3B+ running HifiBerryOS (latest version). I've installed the latest version of the docker image (yesterday). So far Tidal Connect is working very well, but I can't control volume. Is there anything I can try or do?

Best regards,
Michael

Same configuration. Same problem

Probably not a issue just me being stupid:

NO VOLUME * Please check your volume setting on your device and use your device to increase the volume. If setup/dac is recognized it you will see volume changes also updating in the HifiBerry Audio Controls.

If I understand it correctly volume control with e.g. the iOS or Android Tidal app should be working, right?

I have a HIFIBERRY DAC2 PRO with a Raspberry 3B+ running HifiBerryOS (latest version). I've installed the latest version of the docker image (yesterday). So far Tidal Connect is working very well, but I can't control volume. Is there anything I can try or do?

Best regards, Michael

Sad to see the volume control is still not working on the HIFIBERRY DAC2 PRO. yes, volume control should be working via the mobile IOS/Android device.

Can you please help me debug this issue as i dont own a HIFIBERRY DAC2 PRO

  1. Please pull/download the latest version
  2. Install using the installation script. During installation it will ask for a playback device (typically your DAC is the first choice '0')
  3. Open the speaker-controller application using the script: ./show-speaker-controller
  4. Try and play a song from Tidal using your mobile device
  5. In the UI terminal check if the speaker_controller app does anything for you e.g. 'P' for play/pause -/+ for Volume controls
  6. If the above works: try with your mobile IOS/Android device to change the volume
  7. IMPORTANT: Exit the Application using tmux key-combination: ctrl+b, d (detach)

Repeat steps 2-7 with a different audio device (maybe audio mixer or sysdefault works, i am curious to know).

Hope this helps you both.

Thanks,
Tony

Probably not a issue just me being stupid:
NO VOLUME * Please check your volume setting on your device and use your device to increase the volume. If setup/dac is recognized it you will see volume changes also updating in the HifiBerry Audio Controls.
If I understand it correctly volume control with e.g. the iOS or Android Tidal app should be working, right?
I have a HIFIBERRY DAC2 PRO with a Raspberry 3B+ running HifiBerryOS (latest version). I've installed the latest version of the docker image (yesterday). So far Tidal Connect is working very well, but I can't control volume. Is there anything I can try or do?
Best regards, Michael

Sad to see the volume control is still not working on the HIFIBERRY DAC2 PRO. yes, volume control should be working via the mobile IOS/Android device.

Can you please help me debug this issue as i dont own a HIFIBERRY DAC2 PRO

  1. Please pull/download the latest version
  2. Install using the installation script. During installation it will ask for a playback device (typically your DAC is the first choice '0')
  3. Open the speaker-controller application using the script: ./show-speaker-controller
  4. Try and play a song from Tidal using your mobile device
  5. In the UI terminal check if the speaker_controller app does anything for you e.g. 'P' for play/pause -/+ for Volume controls
  6. If the above works: try with your mobile IOS/Android device to change the volume
  7. IMPORTANT: Exit the Application using tmux key-combination: ctrl+b, d (detach)

Repeat steps 2-7 with a different audio device (maybe audio mixer or sysdefault works, i am curious to know).

Hope this helps you both.

Thanks, Tony

Sure, Tony. And let me say I am a pig in the mud with the work you have done as is it now.... Thank you very much.
The UI shows complete control. Says the artist, the state... everything. If I touch the volume control, the bars with ### become narrower or wider, so the commands are catched by the speaker controller app... The only issue is that those controls have no effect
...
image
image

Hello Tony,

I did pull the latest Git updates around 19:00 CET.

These are the devices that show up:

0=snd_rpi_hifiberry_dacplus: HiFiBerry DAC+ Pro HiFi pcm512x-hifi-0 (hw:0,0)
1=sysdefault
2=default
3=dmix

I did a install with all 4 devices.

For device 0:

P,L,K do work
When I press + or - I see, that the volume in the Tidal iPhone app and speaker_controller changes, but the volume I hear doesn't change at all.

For device 1:
same as device 0

For device 2:
same as device 0

When I select device 3 I see Tidal Connect in the app and I can connect, but I can't play anything.

Hope that helps.

Best reagards,
Michael

It seems that speaker_application works as expected (and controls are captured correctly), but the commands are now trickled down to the DAC volume / DAC device for some odd reason. I will need to research the drivers on this device, but will be tricky as i have no way of testing the HIFIBERRY DAC2 PRO.

Question.
What is your dtoverlay for your DAC in /boot/config.txt ?

this is mine (and hifiberry-dac is the one to use even that i have a DAC+DSP)

dtoverlay=vc4-fkms-v3d,audio=off
dtoverlay=hifiberry-dac

Would you be able to change the dtoverlay and try if those settings work?

image
Will check with yours...
mmmm. Config txt is R/O. Have to extract the memory card to edit from outside. Will try tomorrow

It seems that speaker_application works as expected (and controls are captured correctly), but the commands are now trickled down to the DAC volume / DAC device for some odd reason. I will need to research the drivers on this device, but will be tricky as i have no way of testing the HIFIBERRY DAC2 PRO.

Question. What is your dtoverlay for your DAC in /boot/config.txt ?

this is mine (and hifiberry-dac is the one to use even that i have a DAC+DSP)

dtoverlay=vc4-fkms-v3d,audio=off
dtoverlay=hifiberry-dac

Would you be able to change the dtoverlay and try if those settings work?

This is strange. I didn't have a overlay for the DAC:

# Please note that this is only a sample, we recommend you to change it
to fit # your needs.
# You should override this file using a post-build script.
# See http://buildroot.org/manual.html#rootfs-custom
# and http://elinux.org/RPiconfig for a description of config.txt syntax

# We always use the same names, the real used variant is selected by
# BR2_PACKAGE_RPI_FIRMWARE_{DEFAULT,X,CD} choice
start_file=start.elf
fixup_file=fixup.dat

kernel=zImage

# To use an external initramfs file
#initramfs rootfs.cpio.gz

# Disable overscan assuming the display supports displaying the full
resolution # If the text shown on the screen disappears off the edge,
comment this out disable_overscan=1

# How much memory in MB to assign to the GPU on Pi models having
# 256, 512 or 1024 MB total memory
gpu_mem_256=100
gpu_mem_512=100
gpu_mem_1024=100
# Enable I2C and SPI
dtparam=i2c=on
dtparam=spi=on
dtoverlay=i2c-gpio,i2c_gpio_sda=0,i2c_gpio_scl=1
dtoverlay=vc4-fkms-v3d,audio=off

I added you overlay and did a reboot

dtoverlay=hifiberry-dac

But after the reboot the line was changed to

dtoverlay=hifiberry-blocked

Will check with yours... mmmm. Config txt is R/O. Have to extract the memory card to edit from outside. Will try tomorrow

Just remount the partition as read/write:

mount -o remount,rw /dev/mmcblk0p1 /boot

I use mount -o remount,rw /boot which works similarly as described above.

Also i find a setting that could be related to our issue, as i read about HIFIBERRY DAC2 having a Hardware Volume option.

Can you execute the following command:

/opt/hifiberry/bin/alsa-mode

This returns SOFTVOL for me and i am curious if its different on your device.

btw very strange that you dont have a overlay for your DAC at all (and the soundcard works)?
For me the settings were added automatically (since latest release) and now works out of the box.
In previous versions i needed to set it manually to dac+dsp overlay else it would play any audio.

Did you have a look at: https://www.hifiberry.com/docs/software/configuring-linux-3-18-x/ ?

My guess is you need the same dtoverlay as jrotaetxe :

dtoverlay=hifiberry-dacplus

After that and a reboot i am curious about the

/opt/hifiberry/bin/alsa-mode

output.

Also i found the following binairy. which doesnt do anything on my DAC, but maybe does something on yours.

/opt/hifiberry/bin/fix-dacadcpro-mixer

This is my output for the amixer command. Please let me know if you have differences

amixer

Simple mixer control 'DSPVolume',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 255 [100%]
  Front Right: 255 [100%]
Simple mixer control 'Softvol',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 255 [100%]
  Front Right: 255 [100%]

From documentation:
https://www.hifiberry.com/docs/data-sheets/datasheet-dac-adc/

"Hardware volume control for DAC. You can control the output volume using “alsamixer” or any application that supports ALSA mixer controls." - I am not sure if this explicitt means that volume can ONLY be set through alsamixer.

Some of me search lead to this thread on Volumio: https://community.volumio.org/t/solved-rasp-b-hifiberry-dac-nohardware-volume-control/2467/3 and indeed suggests the volume control is done in hw. Not sure how i can make the tidal_application to use the right control.

So my guess is that we need a working dtoverlay and then set

select-playback-device

to use dmixer (digital mixer)

I use mount -o remount,rw /boot which works similarly as described above.

Also i find a setting that could be related to our issue, as i read about HIFIBERRY DAC2 having a Hardware Volume option.

Can you execute the following command:

/opt/hifiberry/bin/alsa-mode

This returns SOFTVOL for me and i am curious if its different on your device.

It also returns SOFTVOL:

# /opt/hifiberry/bin/alsa-mode
SOFTVOL
#

/opt/hifiberry/bin/fix-dacadcpro-mixer

Yes, the DAC was working without the overlay. It is a fresh HiFiBerry OS install with the latest version.

I added dtoverlay=hifiberry-dacplus and this gets not changed after reboot.

alsa-mode is still SOFTVOL after reboot, no output from fix-dacadcpro-mixer and here is amixer:

# /opt/hifiberry/bin/alsa-mode
SOFTVOL
# /opt/hifiberry/bin/fix-dacadcpro-mixer
# amixer
Simple mixer control 'Headphone',0
  Capabilities: pvolume pvolume-joined
  Playback channels: Mono
  Limits: Playback 0 - 63
  Mono: Playback 54 [86%] [0.00dB]
Simple mixer control 'DSP Program',0
  Capabilities: enum
  Items: 'FIR interpolation with de-emphasis' 'Low latency IIR with de-emphasis'                                                                  'High attenuation with de-emphasis' 'Fixed process flow' 'Ringing-less low late                                                                 ncy FIR'
  Item0: 'FIR interpolation with de-emphasis'
Simple mixer control 'DSPVolume',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 255 [100%]
  Front Right: 255 [100%]
Simple mixer control 'Analogue',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 1
  Mono:
  Front Left: Playback 1 [100%] [0.00dB]
  Front Right: Playback 1 [100%] [0.00dB]
Simple mixer control 'Analogue Playback Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 1
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Auto Mute',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [on]
  Front Right: Playback [on]
Simple mixer control 'Auto Mute Mono',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Auto Mute Time Left',0
  Capabilities: enum
  Items: '21ms' '106ms' '213ms' '533ms' '1.07s' '2.13s' '5.33s' '10.66s'
  Item0: '21ms'
Simple mixer control 'Auto Mute Time Right',0
  Capabilities: enum
  Items: '21ms' '106ms' '213ms' '533ms' '1.07s' '2.13s' '5.33s' '10.66s'
  Item0: '21ms'
Simple mixer control 'Clock Missing Period',0
  Capabilities: enum
  Items: '1s' '2s' '3s' '4s' '5s' '6s' '7s' '8s'
  Item0: '1s'
Simple mixer control 'Deemphasis',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Digital',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 207
  Mono:
  Front Left: Playback 207 [100%] [0.00dB] [on]
  Front Right: Playback 207 [100%] [0.00dB] [on]
Simple mixer control 'Max Overclock DAC',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 40
  Mono: 0 [0%]
Simple mixer control 'Max Overclock DSP',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 40
  Mono: 0 [0%]
Simple mixer control 'Max Overclock PLL',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 20
  Mono: 0 [0%]
Simple mixer control 'Softvol',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 255 [100%]
  Front Right: 255 [100%]
Simple mixer control 'Volume Ramp Down Emergency Rate',0
  Capabilities: enum
  Items: '1 sample/update' '2 samples/update' '4 samples/update' 'Immediate'
  Item0: '1 sample/update'
Simple mixer control 'Volume Ramp Down Emergency Step',0
  Capabilities: enum
  Items: '4dB/step' '2dB/step' '1dB/step' '0.5dB/step'
  Item0: '4dB/step'
Simple mixer control 'Volume Ramp Down Rate',0
  Capabilities: enum
  Items: '1 sample/update' '2 samples/update' '4 samples/update' 'Immediate'
  Item0: '1 sample/update'
Simple mixer control 'Volume Ramp Down Step',0
  Capabilities: enum
  Items: '4dB/step' '2dB/step' '1dB/step' '0.5dB/step'
  Item0: '1dB/step'
Simple mixer control 'Volume Ramp Up Rate',0
  Capabilities: enum
  Items: '1 sample/update' '2 samples/update' '4 samples/update' 'Immediate'
  Item0: '1 sample/update'
Simple mixer control 'Volume Ramp Up Step',0
  Capabilities: enum
  Items: '4dB/step' '2dB/step' '1dB/step' '0.5dB/step'
  Item0: '1dB/step'

select-playback-device doesn't find anything:

# ./select-playback-device

Found output devices...

Choose your output Device (0-9): 

But when I run install_hifiberry.sh the four devices show up:

# ./install_hifiberry.sh
Running environment:
  FRIENDLY_NAME:            hifiberry
  MODEL_NAME:               hifiberry
  BEOCREATE_SYMLINK_FOLDER: /opt/beocreate/beo-extensions/tidal
  DOCKER_DNS:               8.8.8.8
  DOCKER_IMAGE:             edgecrush3r/tidal-connect:latest
  BUILD_OR_PULL:            pull
  MQA_PASSTHROUGH:          false
  MQA_CODEC:                false
  PWD:                      /data/tidal-connect-docker

Thu Feb  3 09:58:24 CET 2022 hifiberry install_hifiberry.sh[2129]: [INFO]: Pre-flight checks.
Thu Feb  3 09:58:24 CET 2022 hifiberry install_hifiberry.sh[2129]: [INFO]: Checking to see if Docker is running.
Thu Feb  3 09:58:24 CET 2022 hifiberry install_hifiberry.sh[2129]: [INFO]: Confirmed that Docker daemon is running.
Thu Feb  3 09:58:24 CET 2022 hifiberry install_hifiberry.sh[2129]: [INFO]: Checking to see if Docker image edgecrush3r/tidal-connect:latest exists.
Thu Feb  3 09:58:24 CET 2022 hifiberry install_hifiberry.sh[2129]: [INFO]: Docker image edgecrush3r/tidal-connect:latest exist on the local machine.
Thu Feb  3 09:58:25 CET 2022 hifiberry install_hifiberry.sh[2129]: [INFO]: Select audio output device

Found output devices...

0=snd_rpi_hifiberry_dacplus: HiFiBerry DAC+ Pro HiFi pcm512x-hifi-0 (hw:0,0)
1=sysdefault
2=default
3=dmix
Choose your output Device (0-9):

But when I select dmix playback through Tidal Connect is no longer working.

BTW : I tested Volumio and volume control is working there with Tidal Connect through the Tidal app on my phone.

Hi. My results are consistent with those presented by lomdar67
Regards

ok that is good to know. For now i am a bit in the dark (i first thought maybe the SOFTVOL was different but seems the same). Since i didnt create the speaker_application it will be hard to modify, so hope i can create a workaround.

I have added in the README that HIFIBERRY DAC PLUS volume control doesnt work as of now. Hope we can find a fix soon.

Hi there, has there been any update to this problem? I'm considering getting a DAC2 Pro but it might not be a good idea if it's very inconvenient to change the volume.

If you want Volume control via iOS/Android i can not recommend this. Then again if you can control the volume via the reciever it might be just a incovinience. For the money you still get a nice DAC that plays nice with the other players in the OS, with exception for Tidal. You might have more luck with another OS/Tidal but almost all tidal connect raspberry implementations are based of the same binaries found on github. Since we never get a opensource tidal binary, it will be hard to implement. maybe one day there will be a official implementation of HifiberryOS, but right now this really needs help of the community as it goes beyond my reach.

Hi.
I use the normal Hifiberry-dac and also have no control over the volume.
I have to turn my amp to nearly zero befor starting Tidal playback because ist default at 100% or more no matter witch volume was played with other integrations bevor.
Just for your information.

I use the latest version of HifiBerryOS, a RPi4 and a hifiberry-dac

I have to turn my amp to nearly zero befor starting Tidal playback because ist default at 100% or more no matter witch volume was played with other integrations bevor

Same here. If I could reduce the default volume by lets say 50% even if its a set volume, that would be better. For some reason, the output voltage of the DAC is really high, forcing the preamp volume control to a very very low setting. So we lose granual volume control.

I have the same problem using Hifiberry DAC+ Pro.
No volume control from the Tidal app on my iPhone. The sound is set to max as default.

It works without problems on Volumio OS using the same hardware. If Volumio uses the same binary the problem with volume control should be somewhere else.

I can confirm the same problem with the Hifiberry MiniAmp. Playing is working fine, but volume control is working neither via app nor via HifiberryOS web interface.