Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Hardware volume control & multiroom (SABAJ A30a)
#1
Hey team. I have Moode set up in 3 rooms, and was attempting to make this a 'multi room' setup now. All three rooms are rasp pis, with combo dac+amps attached.

Unfortunately, the main room has a SABAJ A30a which does not seem to support 'hardware volume control'. I can include the full `lsusb` output if people need. Does anyone know of a way to test if this is a driver issue, vs just a limitation of the device? Can I load something at boot time of the pi, or make some software adjustment to enable this showing up?

Assuming I can't get the SABAJ to present that hardware volume: How strict is the requirement for hardware volume control when using multiroom? I would be happy to forego being able to adjust the volume on the app (and to use the knob on the amp instead), or to suffer any quality loss from 'software' volume control since it uses that at the moment and sounds fine. Perhaps there is a way to force enable multiroom receiver in the configuration, without using the gui, knowing that some parts will be broken.

Here's some `sudo alsacap` outputs:

Code:
# The SABAJ, no hardware volume control:
...
Card 2, ID `AUDIO', name `SABAJ USB AUDIO'
 Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
   2 channels, sampling rate 44100..768000 Hz
   Sample formats: S32_LE, SPECIAL, DSD_U32_BE
   Buffer size range from 16 to 1536000
   Period size range from 8 to 768000

     Subdevice 0, name `subdevice #0'

# An Aiyima T9, with hardware volume control:
...
Card 2, ID `Audio', name `USB HIFI Audio'
  Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
    2 channels, sampling rate 44100..192000 Hz
    Sample formats: S16_LE, S24_3LE
    Buffer size range from 22 to 384000
    Period size range from 11 to 192000

      Subdevice 0, name `subdevice #0'

And here is lsusb output showing hardware volume control entry on the Aiyima:

Code:
# Aiyima T9 Pro, partway through `lsusb -v -d 262a:9123`:
...
     AudioControl Interface Descriptor:
       bLength                18
       bDescriptorType        36
       bDescriptorSubtype      6 (FEATURE_UNIT)
       bUnitID                10
       bSourceID               3
       bmaControls(0)     0x00000003
         Mute Control (read/write)
       bmaControls(1)     0x0000000c
         Volume Control (read/write)
       bmaControls(2)     0x0000000c
         Volume Control (read/write)
       iFeature                0

The output of lsusb for the SABAJ sadly has no similar entry (nothing "FEATURE_UNIT" or with 'Volume' in it). Though it does have a lot of stuff.

Moode version is 8.3.0 on all the units, and the firmware on the SABAJ is MCU_FW_220928, for what it's worth. It's specs say it uses an "XMOS XU208 USB Interface".

Happy to post any other logs if people are interested and can offer advice.
Reply
#2
I plugged the SABAJ A30a into a machine running Linux kernel 6.2.8 -- and the lsusb output is the same. That is, no volume control listed. Doesn't bode well for this AMP being used in that way I guess.
Reply
#3
The multiroom receiver app does not have its own volume control and so it relies on ALSA (Hardware) volume. You should still be able to adjust volume manually using the devices phy volume control.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#4
Ah, thanks Tim. What's the simplest way to bypass the UI preventing me from enabling the receiver in multiroom config, for that device?

I'm comfortable editing some files over SSH, just not sure which ones are used for multiroom config. (Or if I should use moodeutl).

If I had to guess, I try and populate /boot/moodecfg.ini properly, then use moodeutl to import those settings. Is that correctish?
Reply
#5
In the script /var/www/trx-config.php look for the line below.

Code:
$_multiroom_rx_disable = ($_SESSION['alsavolume'] == 'none' || $_SESSION['mpdmixer'] == 'software') ? 'disabled' : '';

Comment it out in case you want to revert it later and then add a line below it setting the var to blank. This will result in the SET button being enabled so you can turn the receiver on.

Code:
//$_multiroom_rx_disable = ($_SESSION['alsavolume'] == 'none' || $_SESSION['mpdmixer'] == 'software') ? 'disabled' : '';
$_multiroom_rx_disable = '';
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
(04-06-2023, 12:04 PM)Tim Curtis Wrote: In the script /var/www/trx-config.php look for the line below.

Perfect! Thanks again.

Since I can't see a good way to tell, before purchasing, whether or not a particular USB DAC/Amp has the hardware volume control feature or not (short of emailing the manufacturers to ask), it would be great it multiroom could support 'software volume' in some fashion one day for Moode users.

I'm imagining the sender operating a software volume control, effectively shared across all the receivers (which are set to 100%), that adjusts the output level of the audio prior to it being sent to trx. Similar to how Airplay / Spotify work, but obviously their apps adjust the volume level before it arrives at Moode. Users would adjust individual rooms using physical knobs to find a good level for the volume being centrally adjusted.


Not requesting the feature directly (I recognise it is far from top priority) just throwing it out there.

If there is a file or two I can hack on to achieve something similar to the above, let me know and if I get it working I can throw a PR on github one day.
Reply
#7
Actually Airplay and Spotify Connect receivers both provide their own software volume control routines. Their clients just send volume level requests.

The Multiroom receiver moOde uses does not have a volume control routine, it just receives audio packets and forwards them them on to the ALSA output thus volume control has to be via something external like ALSA Hardware volume or a physical volume control on the audio device.

IME most audio devices that have XMOS USB chipsets support ALSA hardware volume. It's odd that the Sabaj device apparently does not. You might want to ask the manufacturer about that or ask on Audio Science Review forum.

A good amp board for multiroom would be something like the Raspberry Pi DigiAMP+
https://www.raspberrypi.com/products/digiamp-plus/
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#8
(04-06-2023, 02:37 PM)Tim Curtis Wrote: IME most audio devices that have XMOS USB chipsets support ALSA hardware volume. It's odd that the Sabaj device apparently does not. You might want to ask the manufacturer about that or ask on Audio Science Review forum.

Yeah I was surprised too -- and have posted in the SABAJ A30a thread on Audio Science Review (great forum). The manufacturer hasn't replied to an email I sent them; I had hoped it might be addressed in a future firmware update, but companies rarely offer those for very long so I'm not hoping for much.

Appreciate the link to the digiamp. I've got one room left to add, so will likely pick up one of those. Cheers again Tim.

For anyone who happens to follow along later -- adjusting the trx-config.php to allow the sender to be set did work, and volume adjustment is limited to physically turning the knob, which is fine by me for now : )
Reply
#9
I'll add to the TODO list to allow receiver to be started even though no audio device has no ALSA Hardware volume. The help would just need to contain a NOTICE that if the audio device does not support ALSA Hardware volume, it needs to have a physical volume control. Something like that.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: