diff mbox series

[RFC,RESEND] ALSA: usb-audio: quirks for Roland MX-1

Message ID 20190429130149.2074b987@ardbeg.dac.vtoc.de (mailing list archive)
State New, archived
Headers show
Series [RFC,RESEND] ALSA: usb-audio: quirks for Roland MX-1 | expand

Commit Message

Julian Wiesener April 29, 2019, 10:01 a.m. UTC
Hi,

i did send the patch a few month ago, however i didn't got any feedback.

The Patch workarrounds the fact that the device appears to be working ASYNC, however it will be hanging, not playing or capturing a single byte. The 2 channel Altset kind of works, but sound is distorded. The 18 channel Altset works as intended.

Comments

Takashi Iwai April 29, 2019, 2:32 p.m. UTC | #1
On Mon, 29 Apr 2019 12:01:49 +0200,
Julian Wiesener wrote:
> 
> Hi,
> 
> i did send the patch a few month ago, however i didn't got any feedback.
> 
> The Patch workarrounds the fact that the device appears to be working ASYNC, however it will be hanging, not playing or capturing a single byte. The 2 channel Altset kind of works, but sound is distorded. The 18 channel Altset works as intended.

The code change itself looks OK.  Could you prepare the proper patch
that is applied to kernel git tree and resubmit?  It needs to be a
patch file that is directly applicable via git-am.  Please put the
explanation above in the changelog.  Also it'd be good to put the
comment concisely as well.

Last but not least, don't forget to put your signed-off-by line, too.


thanks,

Takashi
diff mbox series

Patch

diff --git a/quirks-table.h.orig b/quirks-table.h
index b345beb..7272b46 100644
--- a/quirks-table.h.orig
+++ b/quirks-table.h
@@ -1777,6 +1777,109 @@  YAMAHA_DEVICE(0x7010, "UB99"),
 		}
 	}
 },
+{
+	/* has ID 0x006e when not in "Advanced Driver" mode */
+	USB_DEVICE(0x0582, 0x01a3),
+	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+		.vendor_name = "Roland",
+		.product_name = "MX-1",
+		.ifnum = QUIRK_ANY_INTERFACE,
+		.type = QUIRK_COMPOSITE,
+		.data = (const struct snd_usb_audio_quirk[]) {
+			{
+				.ifnum = 0,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 1,
+				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
+				.data = & (const struct audioformat) {
+					.formats = SNDRV_PCM_FMTBIT_S32_LE,
+					.channels = 0x12,
+					.iface = 1,
+					.altsetting = 1,
+					.altset_idx = 1,
+					.endpoint = 0x0d,
+					.ep_attr = USB_ENDPOINT_XFER_ISOC |
+						USB_ENDPOINT_SYNC_NONE,
+					.rates = SNDRV_PCM_RATE_96000,
+					.rate_min = 96000,
+					.rate_max = 96000,
+					.nr_rates = 1,
+					.rate_table = (unsigned int[]) { 96000 }
+				}
+			},
+			{
+				.ifnum = 1,
+				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
+				.data = & (const struct audioformat) {
+					.formats = SNDRV_PCM_FMTBIT_S32_LE,
+					.channels = 2,
+					.iface = 1,
+					.altsetting = 2,
+					.altset_idx = 2,
+					.endpoint = 0x0d,
+					.ep_attr = USB_ENDPOINT_XFER_ISOC |
+						USB_ENDPOINT_SYNC_NONE,
+					.rates = SNDRV_PCM_RATE_96000,
+					.rate_min = 96000,
+					.rate_max = 96000,
+					.nr_rates = 1,
+					.rate_table = (unsigned int[]) { 96000 }
+				}
+			},
+			{
+				.ifnum = 2,
+				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
+				.data = & (const struct audioformat) {
+					.formats = SNDRV_PCM_FMTBIT_S32_LE,
+					.channels = 0x12,
+					.iface = 2,
+					.altsetting = 1,
+					.altset_idx = 1,
+					.endpoint = 0x8e,
+					.ep_attr = USB_ENDPOINT_XFER_ISOC |
+						USB_ENDPOINT_SYNC_NONE,
+					.rates = SNDRV_PCM_RATE_96000,
+					.rate_min = 96000,
+					.rate_max = 96000,
+					.nr_rates = 1,
+					.rate_table = (unsigned int[]) { 96000 }
+				}
+			},
+			{
+				.ifnum = 2,
+				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
+				.data = & (const struct audioformat) {
+					.formats = SNDRV_PCM_FMTBIT_S32_LE,
+					.channels = 2,
+					.iface = 2,
+					.altsetting = 2,
+					.altset_idx = 2,
+					.endpoint = 0x8e,
+					.ep_attr = USB_ENDPOINT_XFER_ISOC |
+						USB_ENDPOINT_SYNC_NONE,
+					.rates = SNDRV_PCM_RATE_96000,
+					.rate_min = 96000,
+					.rate_max = 96000,
+					.nr_rates = 1,
+					.rate_table = (unsigned int[]) { 96000 }
+				}
+			},
+			{
+				.ifnum = 3,
+				.type = QUIRK_MIDI_FIXED_ENDPOINT,
+				.data = & (const struct snd_usb_midi_endpoint_info) {
+					.out_cables = 0x0001,
+					.in_cables  = 0x0001
+				}
+			},
+			{
+				.ifnum = -1
+			}
+		}
+	}
+},
 /* this catches most recent vendor-specific Roland devices */
 {
 	.match_flags = USB_DEVICE_ID_MATCH_VENDOR |