• Welcome to ASR. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Need a *.yml for 2 Channels in and 8 Channels out using SB X4

bwhitejr

Member
Joined
Dec 31, 2024
Messages
16
Likes
1
I am having trouble getting CamillaDSP for my Raspberry Pi 4 which is connected to a SoundBlaster X4 all installed and working correctly. I am able get it to play the speaker-test and get all of the channels working, but I can't seem to get a *.yml file configured correctly. I am using *.yml files from several different 8 Channel installation instructions and find no consensus on the format. I just need a basic one. No filters, just the basic I/O settings so it will pass the ./camilladsp --check test.
Thanks for any and all help, it would be greatly appreciated.

-bw-
 
Can you run the following on the terminal and let us know what it shows?

arecord -l
aplay -l

arecord will show your capture devices and aplay the output devices.

I just setup a Hifiberry DAC8X and Hifiberry ADC8X with CamillaDSP on a Pi 5 and I didn't have to create any yaml files, I did everything in the CamillaDSP GUI.
 
The first image is the output of those commands on my Raspberry Pi 5. I then went to the section in the Devices tab in the CamillaDSP GUI and set the capture and playback device to what the output showed.
 

Attachments

  • 1772567796802.png
    1772567796802.png
    98.7 KB · Views: 52
  • 1772567845703.png
    1772567845703.png
    108.1 KB · Views: 54
Here is what I get from arecord and aplay (arecord-aplay.jpg). Error message (x4_8ch.jpg) I get when I --check the config file (x4_8ch.yml).
Any help would be appreciated.
-bw-
 

Attachments

  • arecord-aplay.jpg
    arecord-aplay.jpg
    60.8 KB · Views: 37
  • x4_8ch_error.jpg
    x4_8ch_error.jpg
    41.7 KB · Views: 35
  • x4_8ch.yml.txt
    x4_8ch.yml.txt
    2.5 KB · Views: 36
I would try and load a default config and then goto to Capture Device then Device and find something that looks like in the terminal output. Same for the Playback Device.
 
I appreciate the help. I think I will get the x4_ch8.yml figured out now. But I am really confused about what and where to install CamillaDSPGUI. Like backend and services etc.
Seems there are many ways to get this installed.
I just want to have a headless Pi4 running CamillaDSP and administer it using CamillaDSPGUI over my WiFi.
I assume I can attach a stereo input signal source to the SB X4 and get the 8 Channels back out of the SB X4 1/8" channel outputs.

-bw-
 
I suggest following the tutorial in my signature, it gives step-by-step instructions on how to implement CamillaDSP on a headless RPi4. You just need to make a configuration for your specific hardware.

CamillaGUI is also referred to as the backend (https://github.com/HEnquist/camillagui-backend). Thes days, it is a standalone bundle that you download (https://github.com/HEnquist/camillagui-backend/releases/download/v3.0.3/bundle_linux_armv7.tar.gz) and unpack on the RPi. You can run it from anywhere, but my tutorial installs it in /opt/camillagui_backend/.

Services are used to automatically start CamillaDSP and CamillaGUI. If you follow my tutorial you will end up with a working CamillaDSP setup that can be managed solely via a web browser on a machine connected to the same network as your RPi using camillaGUI.

Michael
 
Michael,
Thanks for your reply. I have tried everything. I can't even get example *.yml files to work. There is always an error of some kind that I can't figure out how to fix.
Is there a surefire way to get my SB X4 to use 2 channels in and 8 channels out using CamillaDSPGUI as the front end when it is properly configured.
I should start over with a blank microSD. I don't need anything fancy just some IIR filters and some FIR filters that are mapped to the appropriate channels.
If I started over and used RPI-CamillaDSP. Will I be able do the above?
 
There are a few things you need to get correct when making a configuration for a new device.

1) Capture channel count
2) Sample format
3) Playback channel count
4) Appropriate mixer for your capture / playback channel counts

If you run "cat /proc/asound/X4/stream0" and report the results I can help you get those things correct.

IMO using the GUI to make / modify a configuration is easier than working directly in the yml file as you don't need to worry about making format errors, but it isn't strictly required. Using the RPi-CamillaDSP tutorial you should be able to get a running camilladsp / camillagui setup in about 10-15 minutes, and then you can worry about messing with the configuration file in the GUI.

Michael
 
Michael,
Hers is the output:

pi@camilla-64:~ $ cat /proc/asound/X4/stream0
Creative Technology Ltd Sound Blaster X4 at usb-0000:01:00.0-1.1, high speed : USB Audio

Playback:
Status: Stop
Interface 4
Altset 1
Format: S16_LE
Channels: 2
Endpoint: 0x01 (1 OUT) (ASYNC)
Rates: 48000, 96000, 192000
Data packet interval: 125 us
Bits: 16
Channel map: FL FR
Sync Endpoint: 0x83 (3 IN)
Sync EP Interface: 4
Sync EP Altset: 1
Implicit Feedback Mode: No
Interface 4
Altset 2
Format: S16_LE
Channels: 6
Endpoint: 0x01 (1 OUT) (ASYNC)
Rates: 48000, 96000, 192000
Data packet interval: 125 us
Bits: 16
Channel map: FL FR FC LFE RL RR
Sync Endpoint: 0x83 (3 IN)
Sync EP Interface: 4
Sync EP Altset: 2
Implicit Feedback Mode: No
Interface 4
Altset 3
Format: S16_LE
Channels: 8
Endpoint: 0x01 (1 OUT) (ASYNC)
Rates: 48000, 96000, 192000
Data packet interval: 125 us
Bits: 16
Channel map: FL FR FC LFE RL RR SL SR
Sync Endpoint: 0x83 (3 IN)
Sync EP Interface: 4
Sync EP Altset: 3
Implicit Feedback Mode: No
Interface 4
Altset 4
Format: S24_3LE
Channels: 2
Endpoint: 0x01 (1 OUT) (ASYNC)
Rates: 48000, 96000, 192000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR
Sync Endpoint: 0x83 (3 IN)
Sync EP Interface: 4
Sync EP Altset: 4
Implicit Feedback Mode: No
Interface 4
Altset 5
Format: S24_3LE
Channels: 6
Endpoint: 0x01 (1 OUT) (ASYNC)
Rates: 48000, 96000, 192000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR FC LFE RL RR
Sync Endpoint: 0x83 (3 IN)
Sync EP Interface: 4
Sync EP Altset: 5
Implicit Feedback Mode: No
Interface 4
Altset 6
Format: S24_3LE
Channels: 8
Endpoint: 0x01 (1 OUT) (ASYNC)
Rates: 48000, 96000, 192000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR FC LFE RL RR SL SR
Sync Endpoint: 0x83 (3 IN)
Sync EP Interface: 4
Sync EP Altset: 6
Implicit Feedback Mode: No

Capture:
Status: Stop
Interface 5
Altset 1
Format: S16_LE
Channels: 2
Endpoint: 0x81 (1 IN) (ASYNC)
Rates: 48000, 96000
Data packet interval: 500 us
Bits: 16
Channel map: FL FR
Interface 5
Altset 2
Format: S24_3LE
Channels: 2
Endpoint: 0x81 (1 IN) (ASYNC)
Rates: 48000, 96000
Data packet interval: 500 us
Bits: 24
Channel map: FL FR
 
Thanks!

Sample Format: Use S16LE or S24LE3 for both capture and playback. I'd use S24LE3 for best performance. This was likely the issue as you previously had S32LE.

Sample Rate: Use 48000 or 96000 Hz. This shouldn't be an issue as you were already using 48000 Hz.

Capture Channels: Use 2. This shouldn't be an issue as you were already using 2.

Playback Channels: Use 2, 6 or 8. This shouldn't be an issue as you were already using 8.

Michael
 
This what I get now with S24LE3:


I also was getting a "snd_pcm_hw_params_set_format" error. Don't know where that param is set.
 

Attachments

  • underrun.png
    underrun.png
    28.7 KB · Views: 35
I guess I don’t have a firm grasp on how this is supposed to work. I envision a Bluetooth device connected as the input to the SB X4. The RPi4 processes the audio stream and distributes the audio into the 8 potential output channels on the X4. Implementing the IIR and FIR filtering assigned in the *.yml config file. My question is: To make this work. Do I need as ALSA loopback or a USB gadget? And if so, which is better? Also, speaker-test responds with front-left, front-right, Side-left, side-right, etc. Which channel is which numbered 0-7?
 
When you say a bluetooth device connected as the input to the SB X4, what do you exactly mean?

Are you talking about a bluetooth DAC or SPDIF output device that you would connect directly to the X4 input? If so you would use the X4 as your CamillaDSP capture device like in your current configuration.

If you mean using something like bluez-alsa (https://github.com/arkq/bluez-alsa) you could use one side of the ALSA loopback as bluez-alsa playback (Loopback,1) and the other side as CamillaDSP capture device (Loopback,0). At one point I had instructions for this in my tutorial but have removed them, see below for reference, but note I haven't tried them in a few years.

First install blue-alsa-utils.

Rich (BB code):
sudo apt install bluez-alsa-utils

Modify bluealsa service to use a2dp-sink profile.

Rich (BB code):
sudo nano /lib/systemd/system/bluez-alsa.service

Add bolded text to "ExecStart".

Rich (BB code):
ExecStart=/usr/bin/bluealsa $OPTIONS -p a2dp-sink

Reboot RPi.

Rich (BB code):
sudo reboot

Run bluetoothctl to pair your device.

Rich (BB code):
bluetoothctl

Once you are in bluetoothctl setup pairing agent and make RPi discoverable.

Rich (BB code):
default-agent
discoverable on

Pair your device and say yes to all prompts.

Make your device trusted so that the RPi will accept connections in the future and exit bluetoothctl. XX:XX:XX:XX:XX:XX is the MAC address of your device, when you pair your device you should see this listed in the bluetoothctl output.

Rich (BB code):
trust XX:XX:XX:XX:XX:XX
exit

Setup service to run bluealsa-aplay playing to the ALSA loopback. You will need to change "ExecStart" line to reflect your device MAC address.

Rich (BB code):
sudo nano /lib/systemd/system/bluealsa-aplay.service

Rich (BB code):
[Unit]
After=syslog.target
StartLimitIntervalSec=10
StartLimitBurst=10

[Service]
Type=simple
ExecStart=bluealsa-aplay XX:XX:XX:XX:XX:XX -D plughw:Loopback,1
Restart=always
RestartSec=1
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=bluealsa-aplay
User=root
Group=root

[Install]
WantedBy=multi-user.target

Enable service and reboot RPi.

Rich (BB code):
sudo systemctl enable bluealsa-aplay
sudo reboot

CamillaDSP also now has bluetooth capture device functionality which could be used without the loopback (https://github.com/HEnquist/camilladsp#bluealsa) but I haven't tried it.

You would only use the USB gadget as your CamillaDSP capture device if you had some sort of bluetooth device that acted as a USB host. Basically the gadget appears to the USB host as a USB audio device and CamillaDSP runs between the gadget capture device and your DAC.

Based on the output you provided earlier, this is how I assume the channels are assigned.

0: FL
1: FR
2: FC
3: LFE
4: RL
5: RR
6: SL
7: SR

Michael
 
Last edited:
Michael,
I mean a bluME-Pro as my Bluetooth input device it has stereo analog, coax and fiber output. I take it that I would configure it as a USB capture device, not a alsa loopback?
How would I configure it to use Toslink fiber input?
 
Sounds like you want to do this:

Are you talking about a bluetooth DAC or SPDIF output device that you would connect directly to the X4 input? If so you would use the X4 as your CamillaDSP capture device like in your current configuration.

If you want to use SPDIF input on the X4, you need a TOSLINK to mini TOSLINK cable, something like this -> https://www.monoprice.com/product?p_id=1557.

I am not sure how the X4 handles clocking. My guess is if it detects a TOSLINK input it clocks to the TOSLINK input but it isn't clear from the manual. Run "amixer -c X4" to see if there is some sort of clock option in ALSA.

In general I suggest you read through the CamillaDSP GitHub docs as well as my tutorial to get a better understanding of how CamillaDSP works.

Michael
 
Michael,
I started over and installed CamillaDSP per your instructions. I now have a CamillaDSP web page and a working *.yml file. The web page says CamillaDSP is running but I don't see any input on the Input levels. I connected a stereo analog input playing music to the X4 input, but only get the same output on the FR/FL output. Nothing on the other channels. Do I need a ALSA Loopback to make this work? What am I missing? I am this close.
 
Are your mixer and signal chain tabs and pages filled put?
 
The web page says CamillaDSP is running but I don't see any input on the Input levels. I connected a stereo analog input playing music to the X4 input, but only get the same output on the FR/FL output.

When you get output from FR/FL, do the CamillaDSP input levels show anything? If they don't show anything, I'd make sure you can record something outside of CamillaDSP.

From glancing at the documentation for the SB X4, it looks like there are two different output modes, SPDIF out and Speaker out. I assume you want Speaker out, but unclear to me if you can select this in alsamixer. Similarly, there are different input modes, Aux In, Microphone, SPDIF in, and What U Hear, again, I assume you can select the mode you want in alsamixer.

It also looks like there is some speaker configuration (Stereo vs 5.1 vs 7.1) as well as mixer functionality in the Windows / Mac Creative app. Unclear if those settings will stay in place on Linux, but I would adjust them how you want (presumably 7.1).

I am not sure I can help you troubleshoot anymore as I don't have the X4.

Michael
 
Back
Top Bottom