ALSA: snd-usb-audio: support for Edirol UA-4FX device
PATCH 1/1 ALSA: snd-usb-audio: support for Edirol UA-4FX device
From: Pedro Lopez-Cabanillas <[email protected]>
Renamed the old quirk function for ua-700/ua-25 to become more generic. Added a new quirk for the Edirol UA-4FX.
sound/usb/usbaudio.c +12 -12
@@ -2996,12 +2996,12 @@ static int create_standard_audio_quirk(struct snd_usb_audio *chip, }/* -* Create a stream for an Edirol UA-700/UA-25 interface. The only way -* to detect the sample rate is by looking at wMaxPacketSize. +* Create a stream for an Edirol UA-700/UA-25/UA-4FX interface. +* The only way to detect the sample rate is by looking at wMaxPacketSize. */ -static int create_ua700_ua25_quirk (struct snd_usb_audio *chip, -struct usb_interface *iface, -const struct snd_usb_audio_quirk *quirk) +static int create_uaxx_quirk (struct snd_usb_audio *chip, +struct usb_interface *iface, +const struct snd_usb_audio_quirk *quirk) {static const struct audioformat ua_format = { .format =SNDRV_PCM_FORMAT_S24_3LE ,
@@ -3016,8 +3016,8 @@ static int create_ua700_ua25_quirk(struct snd_usb_audio *chip,struct audioformat *fp;int stream, err; -/* both PCM and MIDI interfaces have 2 altsettings */ -if (iface->num_altsetting !=2 ) +/* both PCM and MIDI interfaces have 2 or more altsettings */ +if (iface->num_altsetting <2 )return -ENXIO ; alts = &iface->altsetting[1 ]; altsd =get_iface_desc (alts);
@@ -3031,20 +3031,20 @@ static int create_ua700_ua25_quirk(struct snd_usb_audio *chip, .type = QUIRK_MIDI_FIXED_ENDPOINT, .data = &ua700_ep }; -static const struct snd_usb_midi_endpoint_info ua25_ep = { +static const struct snd_usb_midi_endpoint_info uaxx_ep = { .out_cables =0x0001 , .in_cables =0x0001 }; -static const struct snd_usb_audio_quirk ua25_quirk = { +static const struct snd_usb_audio_quirk uaxx_quirk = { .type =QUIRK_MIDI_FIXED_ENDPOINT , - .data = &ua25_ep + .data = &uaxx_ep };if (chip->usb_id ==USB_ID (0x0582 ,0x002b ))return snd_usb_create_midi_interface (chip, iface, &ua700_quirk);else return snd_usb_create_midi_interface (chip, iface, - &ua25_quirk); + &uaxx_quirk); }if (altsd->bNumEndpoints !=1 )
@@ -3376,9 +3376,9 @@ static int snd_usb_create_quirk(struct snd_usb_audio *chip, [QUIRK_MIDI_CME] = snd_usb_create_midi_interface, [QUIRK_AUDIO_STANDARD_INTERFACE] = create_standard_audio_quirk, [QUIRK_AUDIO_FIXED_ENDPOINT] = create_fixed_stream_quirk, - [QUIRK_AUDIO_EDIROL_UA700_UA25] = create_ua700_ua25_quirk, [QUIRK_AUDIO_EDIROL_UA1000] = create_ua1000_quirk, [QUIRK_AUDIO_EDIROL_UA101] = create_ua101_quirk, + [QUIRK_AUDIO_EDIROL_UAXX] = create_uaxx_quirk };if (quirk->type <QUIRK_TYPE_COUNT ) {
sound/usb/usbaudio.h +1 -1
@@ -159,9 +159,9 @@ enum quirk_type {QUIRK_MIDI_US122L ,QUIRK_AUDIO_STANDARD_INTERFACE ,QUIRK_AUDIO_FIXED_ENDPOINT , -QUIRK_AUDIO_EDIROL_UA700_UA25 ,QUIRK_AUDIO_EDIROL_UA1000 ,QUIRK_AUDIO_EDIROL_UA101 , +QUIRK_AUDIO_EDIROL_UAXX , QUIRK_TYPE_COUNT };
sound/usb/usbquirks.h +36 -6
72 lines not on this page · raw message
Signature · 1 line
1.5.2.4
At Mon, 6 Oct 2008 21:56:09 +0200,
Quoted 7 lines · [email protected] wrote:
From: Pedro Lopez-Cabanillas <[email protected]>
Renamed the old quirk function for ua-700/ua-25 to become more generic. Added a new quirk for the Edirol UA-4FX.
Signed-off-by Pedro Lopez-Cabanillas <[email protected]>
I already applied the patch on my sound git tree.
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
Could you post the patch against it?
thanks,
Takashi
Quoted 5 lines · Takashi Iwai
At Mon, 6 Oct 2008 21:56:09 +0200,
Quoted 2 lines · [email protected] wrote:
From: Pedro Lopez-Cabanillas <[email protected]>
Quoted 8 lines
Quoted 4 lines
Renamed the old quirk function for ua-700/ua-25 to become more generic. Added a new quirk for the Edirol UA-4FX.
Signed-off-by Pedro Lopez-Cabanillas <[email protected]>I already applied the patch on my sound git tree.
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.gitCould you post the patch against it?
Sure. I will do it in just a minute.
Regards,
Pedro