sound: add Edirol UA-101 support
Add experimental support for the Edirol UA-101 audio/MIDI interface. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
0d64b568fc
commit
63978ab3e3
|
@ -1791,6 +1791,13 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
|
||||
The power-management is supported.
|
||||
|
||||
Module snd-ua101
|
||||
----------------
|
||||
|
||||
Module for the Edirol UA-101 audio/MIDI interface.
|
||||
|
||||
This module supports multiple devices, autoprobe and hotplugging.
|
||||
|
||||
Module snd-usb-audio
|
||||
--------------------
|
||||
|
||||
|
|
|
@ -21,6 +21,18 @@ config SND_USB_AUDIO
|
|||
To compile this driver as a module, choose M here: the module
|
||||
will be called snd-usb-audio.
|
||||
|
||||
config SND_USB_UA101
|
||||
tristate "Edirol UA-101 driver (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
select SND_PCM
|
||||
select SND_RAWMIDI
|
||||
help
|
||||
Say Y here to include support for the Edirol UA-101 audio/MIDI
|
||||
interface.
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called snd-ua101.
|
||||
|
||||
config SND_USB_USX2Y
|
||||
tristate "Tascam US-122, US-224 and US-428 USB driver"
|
||||
depends on X86 || PPC || ALPHA
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
|
||||
snd-usb-audio-objs := usbaudio.o usbmixer.o
|
||||
snd-usb-lib-objs := usbmidi.o
|
||||
snd-ua101-objs := ua101.o
|
||||
|
||||
# Toplevel Module Dependency
|
||||
obj-$(CONFIG_SND_USB_AUDIO) += snd-usb-audio.o snd-usb-lib.o
|
||||
obj-$(CONFIG_SND_USB_UA101) += snd-ua101.o snd-usb-lib.o
|
||||
obj-$(CONFIG_SND_USB_USX2Y) += snd-usb-lib.o
|
||||
obj-$(CONFIG_SND_USB_US122L) += snd-usb-lib.o
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3142,59 +3142,6 @@ static int create_ua1000_quirk(struct snd_usb_audio *chip,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a stream for an Edirol UA-101 interface.
|
||||
* Copy, paste and modify from Edirol UA-1000
|
||||
*/
|
||||
static int create_ua101_quirk(struct snd_usb_audio *chip,
|
||||
struct usb_interface *iface,
|
||||
const struct snd_usb_audio_quirk *quirk)
|
||||
{
|
||||
static const struct audioformat ua101_format = {
|
||||
.format = SNDRV_PCM_FORMAT_S32_LE,
|
||||
.fmt_type = USB_FORMAT_TYPE_I,
|
||||
.altsetting = 1,
|
||||
.altset_idx = 1,
|
||||
.attributes = 0,
|
||||
.rates = SNDRV_PCM_RATE_CONTINUOUS,
|
||||
};
|
||||
struct usb_host_interface *alts;
|
||||
struct usb_interface_descriptor *altsd;
|
||||
struct audioformat *fp;
|
||||
int stream, err;
|
||||
|
||||
if (iface->num_altsetting != 2)
|
||||
return -ENXIO;
|
||||
alts = &iface->altsetting[1];
|
||||
altsd = get_iface_desc(alts);
|
||||
if (alts->extralen != 18 || alts->extra[1] != USB_DT_CS_INTERFACE ||
|
||||
altsd->bNumEndpoints != 1)
|
||||
return -ENXIO;
|
||||
|
||||
fp = kmemdup(&ua101_format, sizeof(*fp), GFP_KERNEL);
|
||||
if (!fp)
|
||||
return -ENOMEM;
|
||||
|
||||
fp->channels = alts->extra[11];
|
||||
fp->iface = altsd->bInterfaceNumber;
|
||||
fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress;
|
||||
fp->ep_attr = get_endpoint(alts, 0)->bmAttributes;
|
||||
fp->datainterval = parse_datainterval(chip, alts);
|
||||
fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
|
||||
fp->rate_max = fp->rate_min = combine_triple(&alts->extra[15]);
|
||||
|
||||
stream = (fp->endpoint & USB_DIR_IN)
|
||||
? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK;
|
||||
err = add_audio_endpoint(chip, stream, fp);
|
||||
if (err < 0) {
|
||||
kfree(fp);
|
||||
return err;
|
||||
}
|
||||
/* FIXME: playback must be synchronized to capture */
|
||||
usb_set_interface(chip->dev, fp->iface, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_usb_create_quirk(struct snd_usb_audio *chip,
|
||||
struct usb_interface *iface,
|
||||
const struct snd_usb_audio_quirk *quirk);
|
||||
|
@ -3406,7 +3353,6 @@ static int snd_usb_create_quirk(struct snd_usb_audio *chip,
|
|||
[QUIRK_AUDIO_STANDARD_INTERFACE] = create_standard_audio_quirk,
|
||||
[QUIRK_AUDIO_FIXED_ENDPOINT] = create_fixed_stream_quirk,
|
||||
[QUIRK_AUDIO_EDIROL_UA1000] = create_ua1000_quirk,
|
||||
[QUIRK_AUDIO_EDIROL_UA101] = create_ua101_quirk,
|
||||
[QUIRK_AUDIO_EDIROL_UAXX] = create_uaxx_quirk
|
||||
};
|
||||
|
||||
|
|
|
@ -159,7 +159,6 @@ enum quirk_type {
|
|||
QUIRK_AUDIO_STANDARD_INTERFACE,
|
||||
QUIRK_AUDIO_FIXED_ENDPOINT,
|
||||
QUIRK_AUDIO_EDIROL_UA1000,
|
||||
QUIRK_AUDIO_EDIROL_UA101,
|
||||
QUIRK_AUDIO_EDIROL_UAXX,
|
||||
|
||||
QUIRK_TYPE_COUNT
|
||||
|
|
|
@ -1266,37 +1266,6 @@ YAMAHA_DEVICE(0x7010, "UB99"),
|
|||
}
|
||||
}
|
||||
},
|
||||
/* Roland UA-101 in High-Speed Mode only */
|
||||
{
|
||||
USB_DEVICE(0x0582, 0x007d),
|
||||
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
||||
.vendor_name = "Roland",
|
||||
.product_name = "UA-101",
|
||||
.ifnum = QUIRK_ANY_INTERFACE,
|
||||
.type = QUIRK_COMPOSITE,
|
||||
.data = (const struct snd_usb_audio_quirk[]) {
|
||||
{
|
||||
.ifnum = 0,
|
||||
.type = QUIRK_AUDIO_EDIROL_UA101
|
||||
},
|
||||
{
|
||||
.ifnum = 1,
|
||||
.type = QUIRK_AUDIO_EDIROL_UA101
|
||||
},
|
||||
{
|
||||
.ifnum = 2,
|
||||
.type = QUIRK_MIDI_FIXED_ENDPOINT,
|
||||
.data = & (const struct snd_usb_midi_endpoint_info) {
|
||||
.out_cables = 0x0001,
|
||||
.in_cables = 0x0001
|
||||
}
|
||||
},
|
||||
{
|
||||
.ifnum = -1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
/* has ID 0x0081 when not in "Advanced Driver" mode */
|
||||
USB_DEVICE(0x0582, 0x0080),
|
||||
|
|
Loading…
Reference in New Issue