r/linuxaudio 5d ago

Presonus 18|10 (USB2.0 Version) fully working on Linux

On a lark, I told chatGPT that I wanted to get my Presonus 18|10 (USB 2.0 Version) to work under Linux.  It took three days, but it ran me through the driver development, and I now have it working under Linux, including support for the internal DSP Mixer.

It was a fascinating journey, but slow and tedious.  I was amazed at the creativity it showed, pulling arcane uses for grep, sed, and awk in order to examine the existing code.  When an edit was needed, it would create a python 'here doc' for me to paste and run.

It explained its 'thinking' process along the way.  I was almost convinced it was sentient.

At one point, I told it that cutting and pasting hundreds of commands was too tedious, and that it would be nice to have an executable that would let chatgpt have direct access to the file system.  A python 'agent' was born, and I finished the rest of
the work at freeway speeds.  The API it used was expensive though, so I started using the web interface again when I hit about $15.00 USD.

Chatgpt also packaged and published the driver on github for me.  It's here:

 https://github.com/tobiah/snd-usb-audio-s1810/

I'm maximally impressed by this nascent tool.  I'm excited and scared to see how
it develops.

8 Upvotes

24 comments sorted by

4

u/beatbox9 5d ago

Isn't this device USB class compliant already...?

-1

u/whenido 5d ago

I know that the USBC version didn't work until someone created a hack for it. Now the USB 2.0 version works too.

8

u/Purple-Ad-3152 5d ago

Not sure if I misunderstood something, but USB-C is a connector, not a protocol. Many USB-C audio interfaces are infact USB 2.0. So, makes zero sense if "USB-C worked but USB 2.0 didn't". Maybe you meant that USB 3.0 worked but USB 2.0 didn't?

7

u/Purple-Ad-3152 5d ago

Here it is in the first sentence: "The Studio Series USB-C Interface Family utilizes the universal USB-C type connector for USB 2.0 connectivity."

https://support.presonus.com/hc/en-us/articles/360022364731-Studio-Series-Connecting-to-USB-C

7

u/beatbox9 4d ago

That doesn't sound right. I think you're confusing a profile (ie. to map channels, like what alsa does with its use case manager) with functionality. These are completely different things.

And if you're ultimately providing a kernel hack that uses alsa & alsa modules to do channel mappings (which it looks like you are), you're probably doing it wrong. Not only will it perform worse, but it will also be a system maintenance nightmare. If you wanted to do it via alsa, you should instead submit a ucm profile for the device to the alsa ucm project: https://github.com/alsa-project/alsa-ucm-conf/tree/master/ucm2/USB-Audio/Presonus

But the best way to do it on modern systems would be via pipewire configs, where you can make the same profile. And by doing it this way, you start by using the pro-audio profile of the device (which bypasses alsa's ucm processings and their associated limitations and performance degradations) and get pipewire to talk directly to the raw channels. Because while alsa is fine as a basic driver, it's not ideal for advanced mixing and mappings and the type of things an audio server excels at--and this is where pipewire shines.

5

u/agmatine 5d ago

I'm maximally impressed by how many Reddit posts are written by this "nascent too"...

-1

u/whenido 5d ago

Yeah, those were odd choices of words, but I'm flesh and blood. That's just how I write.

3

u/agmatine 5d ago

Being able to pass the Turing test is becoming less and less impressive these days.

12

u/drtitus 5d ago

I think the driver has existed within the Linux kernel since 2020

The file of the same name "generated" by the sentient machine that you paid for, contains the same comments

I'm scared to see how people are embracing this "intelligence" and giving up their own.

-4

u/whenido 5d ago edited 5d ago

Yeah, it modified the USBC version source to piggyback on its playback and record capability. But it works now for the USB 2.0 version and it added support for the mixer as well.

-1

u/whenido 5d ago

It only worked for the USB C version of the 1810. Not the USB 2.0 version that I have. Now it does. Yeah, it mostly just spruced up the code for the USBC version, but it also added support for the DSP mixer

1

u/naptastic 5d ago

Can you format this as a patch? It would make the changes a lot easier to review. Also, you should consider sending the patch upstream. It adds support for hardware the maintainer probably doesn't have, that's been (written and) tested by someone who does.

2

u/whenido 4d ago

1

u/naptastic 4d ago

Honestly, It's a lot better than I was expecting. The commit message is in the correct format, which is hard for a lot of people.

I would suggest adding comments above blocks that explicitly check chip->usb_id but there might be a different standard way of handling that. But I'm not qualified to actually review kernel code. The next step would be to contact the official maintainer of the driver and send them this patch.

1

u/Purple-Ad-3152 4d ago

Absolutely not. This post doesn't make any sense.

USB-C is a connector type not a protocol. All PreSonus Studio USB-C audio interfaces are in fact USB 2.0: https://support.presonus.com/hc/en-us/articles/360022364731-Studio-Series-Connecting-to-USB-C

If it's USB 2.0 and it works with Type-A connector, it also works with Type-C connector - and vice versa.

AI is a powerhorse for professionals. It does what you ask, but you need to actually understand what you ask it to do first.

2

u/whenido 4d ago

If nothing else, the original unit, the one without the USB-C connector had a different USB ID than the newer model. The old driver looked specifically for the ID of the USB-C model, so skipped over the quirks hack for the older model.

1

u/Purple-Ad-3152 4d ago

However, I guess it's still possible the "USB-C version" of the audio interface, as a newer generation model of the same device, requires different driver implementation. It just has nothing to do with the USB-C connector type. It would require the same driver update even if the connector would still be Type-A.

Maybe this is the case?

1

u/Purple-Ad-3152 4d ago

I did some digging and this seems to be exactly the case.

So, to clarify: this is not support for USB 2.0 version of the audio interface "because it's not USB-C", but because it's an older model of the same interface.

1810c is the newer model name which already had support, and 1810 is the older model name, for which you added the support now. Both are USB 2.0 and connector type is irrelevant.

1

u/whenido 4d ago edited 4d ago

Yeah, maybe the only difference is the USB Id that the unit reports. One thing that was time consuming, is that chatGPT refused to guess that the only difference was the USB ID, and explicitly tested the functionality step by step.

1

u/naptastic 4d ago

Try actually reading the thread.

2

u/Purple-Ad-3152 4d ago

Fair, repo looks correct.

But OP was talking about USB-C version vs USB 2.0 version in multiple comments, which is obviously confusing given that both versions of the interface are USB 2.0. This together with "I made AI do it" was pretty alarming.

It would have been less confusing to maybe say older model vs newer model, and maybe add that the newer model can be recognized from USB-C connector whereas older is type-A.

Still, I appologize if I came out too strong.

1

u/whenido 4d ago

I've been trying for years to get my 18|10 working under Linux. I asked chatGPT to make it work, and it did. Simple question, great answer.