History

ALSA: usb-audio: Add quirk for Fiero SC-01

Fiero SC-01 is a USB sound card with two mono inputs and a single stereo output. The inputs are composed into a single stereo stream. The device uses a vendor-provided driver on Windows and does not work at all without it. The driver mostly provides ASIO functionality, but also alters the way the sound card is queried for sample rates and clocks. ALSA queries those failing with an EPIPE (same as Windows 10 does). Presumably, the vendor-provided driver does not query it at all, simply matching by VID:PID. Thus, I consider this a buggy firmware and adhere to a set of fixed endpoint quirks instead. The soundcard has an internal clock. Implicit feedback mode is required for the playback. I have updated my device to v1.1.0 from a Windows 10 VM using a vendor- provided binary prior to the development, hoping for it to just begin working. The device provides no obvious way to downgrade the firmware, and regardless, there's no binary available for v1.0.0 anyway. Thus, I will be getting another unit to extend the patch with support for that. Expected to be a simple copy-paste of the existing one, though. There were no previous reports of that device in context of Linux anywhere. Other issues have been reported though, but that's out of the scope.

Egor Vorontsov committed 4 years ago

Commit 4fb7c241 parent 11bea262 files · +70 −0Browse files

Unified · Split

2 files
  1. sound/usb/quirks-table.h +68 −0
  2. sound/usb/quirks.c +2 −0
sound/usb/quirks-table.h+68−0
@@ -4167,6 +4167,74 @@ YAMAHA_DEVICE(0x7010, "UB99"), · 4166 unmodified lines
4167 }4167 }
4168 }4168 }
4169},4169},
4170{
4171 /*
4172 * Fiero SC-01 (firmware v1.1.0)
4173 */
4174 USB_DEVICE(0x2b53, 0x0031),
4175 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
4176 .vendor_name = "Fiero",
4177 .product_name = "SC-01",
4178 .ifnum = QUIRK_ANY_INTERFACE,
4179 .type = QUIRK_COMPOSITE,
4180 .data = &(const struct snd_usb_audio_quirk[]) {
4181 {
4182 .ifnum = 0,
4183 .type = QUIRK_AUDIO_STANDARD_INTERFACE
4184 },
4185 /* Playback */
4186 {
4187 .ifnum = 1,
4188 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
4189 .data = &(const struct audioformat) {
4190 .formats = SNDRV_PCM_FMTBIT_S32_LE,
4191 .channels = 2,
4192 .fmt_bits = 24,
4193 .iface = 1,
4194 .altsetting = 1,
4195 .altset_idx = 1,
4196 .endpoint = 0x01,
4197 .ep_attr = USB_ENDPOINT_XFER_ISOC |
4198 USB_ENDPOINT_SYNC_ASYNC,
4199 .rates = SNDRV_PCM_RATE_48000 |
4200 SNDRV_PCM_RATE_96000,
4201 .rate_min = 48000,
4202 .rate_max = 96000,
4203 .nr_rates = 2,
4204 .rate_table = (unsigned int[]) { 48000, 96000 },
4205 .clock = 0x29
4206 }
4207 },
4208 /* Capture */
4209 {
4210 .ifnum = 2,
4211 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
4212 .data = &(const struct audioformat) {
4213 .formats = SNDRV_PCM_FMTBIT_S32_LE,
4214 .channels = 2,
4215 .fmt_bits = 24,
4216 .iface = 2,
4217 .altsetting = 1,
4218 .altset_idx = 1,
4219 .endpoint = 0x82,
4220 .ep_attr = USB_ENDPOINT_XFER_ISOC |
4221 USB_ENDPOINT_SYNC_ASYNC |
4222 USB_ENDPOINT_USAGE_IMPLICIT_FB,
4223 .rates = SNDRV_PCM_RATE_48000 |
4224 SNDRV_PCM_RATE_96000,
4225 .rate_min = 48000,
4226 .rate_max = 96000,
4227 .nr_rates = 2,
4228 .rate_table = (unsigned int[]) { 48000, 96000 },
4229 .clock = 0x29
4230 }
4231 },
4232 {
4233 .ifnum = -1
4234 }
4235 }
4236 }
4237},
4170 4238
4171#undef USB_DEVICE_VENDOR_SPEC4239#undef USB_DEVICE_VENDOR_SPEC
4172#undef USB_AUDIO_DEVICE4240#undef USB_AUDIO_DEVICE
sound/usb/quirks.c+2−0
@@ -1915,6 +1915,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { · 1914 unmodified lines
1915 QUIRK_FLAG_ALIGN_TRANSFER),1915 QUIRK_FLAG_ALIGN_TRANSFER),
1916 DEVICE_FLG(0x1224, 0x2a25, /* Jieli Technology USB PHY 2.0 */1916 DEVICE_FLG(0x1224, 0x2a25, /* Jieli Technology USB PHY 2.0 */
1917 QUIRK_FLAG_GET_SAMPLE_RATE),1917 QUIRK_FLAG_GET_SAMPLE_RATE),
1918 DEVICE_FLG(0x2b53, 0x0031, /* Fiero SC-01 (firmware v1.1.0) */
1919 QUIRK_FLAG_GENERIC_IMPLICIT_FB),
1918 1920
1919 /* Vendor matches */1921 /* Vendor matches */
1920 VENDOR_FLG(0x045e, /* MS Lifecam */1922 VENDOR_FLG(0x045e, /* MS Lifecam */