All of lore.kernel.org
 help / color / mirror / Atom feed
* Best way to add support a USB audio device where only the second usb configuration works
@ 2023-01-26  5:03 Marijn Kruisselbrink
  0 siblings, 0 replies; only message in thread
From: Marijn Kruisselbrink @ 2023-01-26  5:03 UTC (permalink / raw)
  To: alsa-devel

(disclaimer: I'm fairly new to kernel stuff, alsa and low level usb
things in general, so my terminology might all not be correct, and I
might be missing obvious stuff, but:)

I've been trying (and succeeding) to get a SoundDevices MixPre II 10
to work well under linux. What I figured out is that this device
advertises two usb configurations. The first configuration claims to
be a UAC1 interface, exposing stereo in and output channels. This
configuration isn't actually class compliant though, or at least
neither playback nor recording are working right with this
configuration. The second configuration on the other hand claims to be
a UAC2 interface, exposing the full 12 in and 4 output channels the
device is supposed to support. And in this configuration everything
I've tried seems to work perfectly.

I'm not sure what the best/cleanest way would to actually make
snd-usb-audio/the linux kernel select this second configuration. In my
experimenting I made this work by adding a usb_device_driver to
snd-usb-audio that makes sure to select the second configuration for
this particular USB device. Is that the right approach? Or would it be
better for this to be an entirely separate module?

I also wonder if this is something that would make sense to address in
the generic usb driver's usb_choose_configuration method? Currently it
seems that for audio devices it always picks the first configuration,
unless one of the configurations uses the UAC3 protocol (in which case
it picks the first UAC3 configuration). For this device in question,
the first (non compliant/non functioning) configuration claims to use
UAC1 protocol, while the second (and seemingly functioning completely
fine) configuration uses UAC2. Should the generic logic prefer UAC2
configurations over UAC1 configurations, like it already prefers UAC3
configurations over anything else? Or is there a particular reason why
UAC2 doesn't get that treatment?

Or maybe I'm missing some other way of making sure this second
configuration is used for this device?

Thanks for any advice/help you can give me,
Marijn

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-26  5:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-26  5:03 Best way to add support a USB audio device where only the second usb configuration works Marijn Kruisselbrink

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.