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 for TC-Helicon GoXLR #121

Closed
Toniob opened this issue Nov 17, 2021 · 22 comments
Closed

Support for TC-Helicon GoXLR #121

Toniob opened this issue Nov 17, 2021 · 22 comments

Comments

@Toniob
Copy link

Toniob commented Nov 17, 2021

Hi,

I’m the owner of a GoXLR : https://www.tc-helicon.com/product.html?modelCode=P0CQK . It is a usb sound mixer that is not supported officially with Linux. The main issue is that the GoXLR is a multi inputs / multi outputs device, but it is not seen as one. It works great under Windows thanks to a driver. With Linux, it is seen as a single usb sound device with a single multichannel output. Right now, I managed with other people to separate those channels with pulseaudio or jack or even pipewire, using loopback modules for example. For exemple, Front Left and Front Right are the stereo output named "System". Rear left and rear right are another stereo output named "Game". There are other outputs, and it is the same mechanism for the inputs.

I opened an issue on pipewire, but someone told me it wasn’t possible to separate the in/outputs with a profile : https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1787 .

I then wondered if it was possible with a kernel quirk, which I asked : https://bugzilla.kernel.org/show_bug.cgi?id=215035 .

I was adviced to open a ticket here. So here I am. Do you think it would be possible to create a profile for my device ?

alsa-info.txt
pipewire.conf.txt

@perexg
Copy link
Member

perexg commented Nov 18, 2021

I created a test configuration for one stereo stream at perexg@goxlr (patch URL: https://github.com/perexg/alsa-ucm-conf/commit/goxlr.patch).

Please, get the latest alsa-ucm-conf from this repo, pull / unpack it somewhere and redirect (symlink) /usr/share/alsa/ucm2 to the unpacked ucm2 tree (backup/rename the original /usr/share/alsa/ucm2 tree). Also, apply the above patch.

Let me know, if the Speaker / System device is detected, eventually show me the PW log.

@Toniob
Copy link
Author

Toniob commented Nov 19, 2021

I did it but when I do so, I don’t have the output anymore.

pw-dump.txt
spa-acp-tool.txt

@perexg
Copy link
Member

perexg commented Nov 19, 2021

Thanks, the spa-acp-tool output is sufficient. Could you show me output from alsaucm -c hw:2 get _alibcfg ?

UPDATE: I did some tests locally, but it seems like a bummer from pipewire. It handles incorrectly the private alsa-lib configurations for the PCM devices.

@Toniob
Copy link
Author

Toniob commented Nov 19, 2021

Here it is
alsaucm.txt

@perexg
Copy link
Member

perexg commented Nov 19, 2021

Also alsaucm -c hw:2 dump text ?

UPDATE: Could you add Syntax 4 to the ucm2/USB-Audio/GoXLR/GoXLR.conf for a test (as the first line)?

@Toniob
Copy link
Author

Toniob commented Nov 19, 2021

Here is the dump
alsaucm_dump.txt

If I do add Syntax 4 as the first line of the file, I now have a warning
ALSA lib parser.c:2107:(parse_master_file) unknown master file field Syntax
Is it expected ?

For the following tests, is there a way to reload the ucm configuration without rebooting ?

@perexg
Copy link
Member

perexg commented Nov 19, 2021

Here is the dump alsaucm_dump.txt

If I do add Syntax 4 as the first line of the file, I now have a warning ALSA lib parser.c:2107:(parse_master_file) unknown master file field Syntax Is it expected ?

Ahh. OK. The syntax cannot be changed here. Please, modify Syntax 3 to Syntax 4 in USB-Audio/USB-Audio.conf .

For the following tests, is there a way to reload the ucm configuration without rebooting ?

It should be enough to restart pipewire / run acp tool or alsaucm.

@Toniob
Copy link
Author

Toniob commented Nov 19, 2021

It works with Syntax 4 moved to the USB-Audio.conf file. I’ve got the output showing in Gnome settings and I can play audio.

alsaucm_dump.txt
alsaucm_cfg.txt

@perexg
Copy link
Member

perexg commented Nov 19, 2021

OK, now it's the time to analyze the channel / output jack mapping. What output jack is connected to first two channels?

In configuration, look for the two bindings lines:

bindings.0 0
bindings.1 1

Change just the second value (like bindings.0 2 bindings.1 3 and so on - test and describe the used stereo output. I'll add missing devices.

@Toniob
Copy link
Author

Toniob commented Nov 19, 2021

You have the corresponding outputs in my pipewire.conf file in the first message
0 1 : System
2 3 : Game
4 5 : Music
6 7 : Voice Chat
8 9 : Sample

Thanks a lot for your work. It helps a lot.

@perexg
Copy link
Member

perexg commented Nov 19, 2021

I updated perexg@goxlr for playback.

@Toniob
Copy link
Author

Toniob commented Nov 19, 2021

Thanks. It is not working currently. Here is my last working GoXLR-HiFi.conf file.
GoXLR-HiFi.conf.txt

I changed the bindings to 8 and 9 for Sample, not 10 and 11. But it doesn’t change the fact that the moment I uncomment one more Sectiondevice part, it isn’t working anymore. With only one sectiondevice
spa-1sectiondevice.txt
It is ok and I can use my output in Gnome Settings.

With 2 or more uncommented
spa-2sectiondevice.txt
And my outputs, even the system one, totally disappear.

@perexg
Copy link
Member

perexg commented Nov 19, 2021

I updated perexg@goxlr again. The playback device has 10 channels total, right ?

@Toniob
Copy link
Author

Toniob commented Nov 19, 2021

You’re right, it got 10 channels : FL, FR, RL, RR, SL, SR, FC, LFE, AUX0, AUX1. I tried your new patch, but it still not working. In fact, the moment I uncomment something else than the System sectiondevice, it doesn’t work anymore.
spa.txt

Also, is there something to force 48khz and s32le to get rid of this

Device goxlr_system:GoXLR doesn't support 44100 Hz, changed to 48000 Hz.
Device goxlr_system:GoXLR doesn't support sample format s16le, changed to s32le.

@perexg
Copy link
Member

perexg commented Nov 19, 2021

I updated perexg@goxlr again. The channels settings were at the wrong place.

@Toniob
Copy link
Author

Toniob commented Nov 19, 2021

It works ! Wonderful ! Thank you so much.
spa.txt

One mistake from my side. Maybe somewhere pipewire and ucm differs in naming the outputs. But Voice chat and music are inverted. Music should be 6 and 7 and Voice is 4 and 5.
I think System should be the output with the priority (you put sample). And I still have the sample and rate warning.

Can we now try with the inputs ?

@Toniob
Copy link
Author

Toniob commented Nov 19, 2021

Can you please also add this usb id : 1220:8FE4 , which is another version of the GoXLR (the Mini version but it works the same) ? Thanks

@perexg
Copy link
Member

perexg commented Nov 19, 2021

I updated perexg@goxlr again. I simplified playback (needs verification) and added capture (input). I don't know how many channels the PCM capture device has. It should be tweaked in the config. Also, the mono mic channel is not readable from the pipewire config. I expect errors somewhere.

@Toniob
Copy link
Author

Toniob commented Nov 19, 2021

Thanks a lot again. It works if I take off the Mono mic. But I checked on windows, and this input isn’t present. I changed your file to make the names the same as Windows. What do you think ?

GoXLR-HiFi.conf.txt

@Toniob
Copy link
Author

Toniob commented Nov 19, 2021

Damn ! Another issue. Everything is working fine with a kernel 5.10 (which I was using for the tests). But if I reboot to the same system but with a kernel 5.14, the profile is gone. There is only the "off" profile available. Do you have an idea ?

spa-5.14.txt

The fact is, I don’t have sound working on a 5.14 kernel even when I don’t use this new ucm profile. The multichannel stays mute. So it’s not because of what we’ve done, I had the problem before. But I was hoping it will solve this issue.

@perexg
Copy link
Member

perexg commented Nov 19, 2021

Report this in the kernel's bugzilla: https://bugzilla.kernel.org . It appears like a kernel bug:

Trying _ucm0001.goxlr_sample_input:GoXLR with SND_PCM_NO_AUTO_FORMAT ...
snd_pcm_hw_params_any failed
unable to initialize slave
Error opening PCM device _ucm0001.goxlr_sample_input:GoXLR: Invalid argument

It's better to test the input using arecord or any other simple application.

@Toniob
Copy link
Author

Toniob commented Nov 19, 2021

The bug is reported : https://bugzilla.kernel.org/show_bug.cgi?id=215079

Thanks again for your kind help.

@perexg perexg closed this as completed in 97beee6 Nov 22, 2021
ninelore pushed a commit to ninelore/alsa-ucm-conf-cros that referenced this issue Jun 10, 2024
This hardware has multichannel output and input, but it's expected
to work in separate stereo groups.

Use dsnoop/dshare alsa-lib plugins to split the multichannel stream to
stereo devices.

Fixes: alsa-project#121
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants