All of lore.kernel.org
 help / color / mirror / Atom feed
* A plea for help on mixer support for Fast Track Ultra (8R)
@ 2011-05-18 15:19 Felix Homann
  2011-05-18 15:29 ` Felix Homann
  2011-05-18 17:51 ` Daniel Mack
  0 siblings, 2 replies; 34+ messages in thread
From: Felix Homann @ 2011-05-18 15:19 UTC (permalink / raw)
  To: alsa-devel; +Cc: Grant Diffey, Daniel Mack

[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]

Hi,

I need some help again by someone who's more familiar with Alsa's inner 
working than I am. This might be you, Daniel ;-)

I've attached a patch series that would add support for the mixer in 
M-Audio's Fast Track Ultra (8R) devices.

BUT, it will break others!

It will break others in that mixer controls will show up multiple times. 
The reason for this seems to be my ambitiuos calling of 
snd_usb_create_mixer() for quirked devices in card.c. To circumvent the 
problem of a control showing up multiple times, I check for duplicates 
in add_unique_control_to_empty_mixer() and skip controls already present.

This doesn't work for devices which are not using 
add_unique_control_to_empty_mixer(), in other words *all* devices not 
using my messy patch...

So, probably the best thing would be to have some kind of entry in 
quirks-table.h to tell which device would need to be "mixerquirked" to 
prevent other devices to be disturbed. How can this be done?

I would highly appreciate anybody coming up with a proper solution.

Kind regards,

Felix


[-- Attachment #2: 0001-Raise-MAX_CHANNELS-to-16-as-needed-by-Fast-TRack-Ult.patch --]
[-- Type: text/x-patch, Size: 714 bytes --]

>From d698eefa94673ab9869de2614338cd2e0998ab3a Mon Sep 17 00:00:00 2001
From: Felix Homann <fex@yerbouti>
Date: Wed, 18 May 2011 09:09:24 +0200
Subject: [PATCH - Basic mixer support for Fast Track Ultra 1/6]Raise MAX_CHANNELS to 16 as needed by Fast TRack Ultra (8R)


Signed-off-by: Felix Homann <linuxaudio@showlabor.de>

diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h
index b4a2c81..06d035f 100644
--- a/sound/usb/mixer.h
+++ b/sound/usb/mixer.h
@@ -24,7 +24,7 @@ struct usb_mixer_interface {
 	u8 xonar_u1_status;
 };
 
-#define MAX_CHANNELS	10	/* max logical channels */
+#define MAX_CHANNELS	16	/* max logical channels */
 
 struct usb_mixer_elem_info {
 	struct usb_mixer_interface *mixer;
-- 
1.7.4.1


[-- Attachment #3: 0002-Move-USB_MIXER_-enum-to-mixer.h.patch --]
[-- Type: text/x-patch, Size: 1213 bytes --]

>From 1319e39fc58114f7d277966a845b09b47dbb3730 Mon Sep 17 00:00:00 2001
From: Felix Homann <linuxaudio@showlabor.de>
Date: Wed, 18 May 2011 09:17:44 +0200
Subject: [PATCH - Basic mixer support for Fast Track Ultra 2/6]Move USB_MIXER_ enum to mixer.h
 This facilitates using it in mixer_quirks.c


Signed-off-by: Felix Homann <linuxaudio@showlabor.de>

diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 5e47757..ea95ce2 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -86,16 +86,6 @@ struct mixer_build {
 	const struct usbmix_selector_map *selector_map;
 };
 
-enum {
-	USB_MIXER_BOOLEAN,
-	USB_MIXER_INV_BOOLEAN,
-	USB_MIXER_S8,
-	USB_MIXER_U8,
-	USB_MIXER_S16,
-	USB_MIXER_U16,
-};
-
-
 /*E-mu 0202/0404/0204 eXtension Unit(XU) control*/
 enum {
 	USB_XU_CLOCK_RATE 		= 0xe301,
diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h
index 06d035f..86af922 100644
--- a/sound/usb/mixer.h
+++ b/sound/usb/mixer.h
@@ -1,6 +1,15 @@
 #ifndef __USBMIXER_H
 #define __USBMIXER_H
 
+enum {
+	USB_MIXER_BOOLEAN,
+	USB_MIXER_INV_BOOLEAN,
+	USB_MIXER_S8,
+	USB_MIXER_U8,
+	USB_MIXER_S16,
+	USB_MIXER_U16,
+};
+
 struct usb_mixer_interface {
 	struct snd_usb_audio *chip;
 	struct list_head list;
-- 
1.7.4.1


[-- Attachment #4: 0003-Add-mixer-quirk-for-Fast-Track-Ultra-devices.patch --]
[-- Type: text/x-patch, Size: 5041 bytes --]

>From 84a7175d0c05e5f9cf2a6d7c682ba6904686df64 Mon Sep 17 00:00:00 2001
From: Felix Homann <linuxaudio@showlabor.de>
Date: Wed, 18 May 2011 10:05:34 +0200
Subject: [PATCH - Basic mixer support for Fast Track Ultra 3/6]Add mixer quirk for Fast Track Ultra devices


Signed-off-by: Felix Homann <linuxaudio@showlabor.de>

diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index ea95ce2..1c37792 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -542,6 +542,31 @@ static int add_control_to_empty(struct mixer_build *state, struct snd_kcontrol *
 	return 0;
 }
 
+/* 
+ * This is almost the same as 'add_control_to_empty' but using a mixer instead of a mixer_build
+ * it simplifies building a mixer for devices without proper descriptors,
+ * e.g. the Fast Track Ultra devices
+ */ 
+int add_unique_control_to_empty_mixer(struct usb_mixer_interface *mixer, struct snd_kcontrol *kctl)
+{
+	struct usb_mixer_elem_info *cval = kctl->private_data;
+	int err;
+	
+	/* No duplicates! */
+	if (snd_ctl_find_id(mixer->chip->card, &kctl->id))
+		return 0;
+
+	if ((err = snd_ctl_add(mixer->chip->card, kctl)) < 0) {
+		snd_printd(KERN_ERR "cannot add control (err = %d)\n", err);
+		return err;
+	}
+	
+	cval->elem_id = &kctl->id;
+	cval->next_id_elem = mixer->id_elems[cval->id];
+	mixer->id_elems[cval->id] = cval;
+	
+	return 0;
+}
 
 /*
  * get a terminal name string
@@ -1331,6 +1356,57 @@ static void build_mixer_unit_ctl(struct mixer_build *state,
 	add_control_to_empty(state, kctl);
 }
 
+/*
+ * build a mixer unit control and give it a name
+ *
+ * this is essentially identical to build_mixer_unit_ctl but doesn't
+ * rely on proper descriptors to get a name for a control.
+ * At least, useful for Fast Track Ultra devices.
+ */
+
+int build_named_mixer_unit_ctl(struct usb_mixer_interface *mixer,
+	int in_pin, int in_ch, int unitid, int val_type, unsigned int cmask, char* ctrl_name, int channels)
+{
+	struct usb_mixer_elem_info *cval;
+	struct snd_kcontrol *kctl;
+	int err;
+	
+	cval = kzalloc(sizeof(*cval), GFP_KERNEL);
+	if (! cval)
+		return -1;
+	
+	cval->mixer = mixer;
+	cval->id = unitid;
+	cval->control = in_ch + 1; /* based on 1 */
+	cval->val_type = val_type; /* like USB_MIXER_S16 etc. */
+	if (!((0 < channels) && (channels <= MAX_CHANNELS)))
+		return -1;
+	cval->channels = 1;
+	cval->cmask = cmask;
+	/* get min/max values */
+	get_min_max(cval, 0);
+	
+	kctl = snd_ctl_new1(&usb_feature_unit_ctl, cval);
+	if (! kctl) {
+		snd_printk(KERN_ERR "cannot malloc kcontrol\n");
+		kfree(cval);
+		return -1;
+	}
+	
+	kctl->tlv.c = mixer_vol_tlv;
+	kctl->vd[0].access |= 
+		SNDRV_CTL_ELEM_ACCESS_TLV_READ |
+		SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK;
+	kctl->private_free = usb_mixer_elem_free;
+	
+	sprintf(kctl->id.name, ctrl_name);
+	
+	if (err = add_unique_control_to_empty_mixer(mixer, kctl))
+		return err;
+	
+	return 0;
+}
+
 
 /*
  * parse a mixer unit
diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h
index 86af922..6fe7bea 100644
--- a/sound/usb/mixer.h
+++ b/sound/usb/mixer.h
@@ -61,6 +61,9 @@ void snd_usb_mixer_notify_id(struct usb_mixer_interface *mixer, int unitid);
 
 int snd_usb_mixer_set_ctl_value(struct usb_mixer_elem_info *cval,
 				int request, int validx, int value_set);
+int build_named_mixer_unit_ctl(struct usb_mixer_interface *mixer,
+		int in_pin, int in_ch, int unitid, int val_type, 
+		unsigned int cmask, char* ctrl_name, int channels);
 void snd_usb_mixer_inactivate(struct usb_mixer_interface *mixer);
 int snd_usb_mixer_activate(struct usb_mixer_interface *mixer);
 
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 73dcc82..e87f359 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -500,6 +500,36 @@ void snd_emuusb_set_samplerate(struct snd_usb_audio *chip,
 	}
 }
 
+/*
+ * Create mixer controls for Fast Track Ultra (8R)
+ */
+int snd_ftu_controls_create(struct usb_mixer_interface *mixer)
+{
+	char name[44];
+	int out, in_ch, unitid, err;
+	unsigned int cmask;
+	int val_type =  USB_MIXER_S16;
+	int channels = 1; /* mono channels */
+	
+	unitid = 5; // FTU's unit id
+	for (out = 0; out < 8; ++out) {
+		for (in_ch = 0; in_ch < 16; ++in_ch) {
+				cmask = (1 << in_ch);
+			if (in_ch < 8)
+				sprintf(name, "AIn%d - Out%d Capture Volume", in_ch + 1, out + 1);
+			else if (in_ch >= 8)
+				sprintf(name, "DIn%d - Out%d Playback Volume", in_ch - 7, out + 1);     
+			if ((err = build_named_mixer_unit_ctl(mixer, in_ch, out, unitid, 
+				val_type, cmask, name, channels))) {
+				return err;
+			}
+		}
+	}
+	
+	return 0;
+}
+
+
 int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
 {
 	int err = 0;
@@ -537,6 +567,10 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
 				snd_nativeinstruments_ta10_mixers,
 				ARRAY_SIZE(snd_nativeinstruments_ta10_mixers));
 		break;
+	case USB_ID(0x0763, 0x2080):/* M-Audio Fast Track Ultra */
+	case USB_ID(0x0763, 0x2081): /* M-Audio Fast Track Ultra 8R */
+		err = snd_ftu_controls_create(mixer);
+		break;
 	}
 
 	return err;
-- 
1.7.4.1


[-- Attachment #5: 0004-Try-to-create-a-mixer-for-quirked-devices-too.patch --]
[-- Type: text/x-patch, Size: 802 bytes --]

>From 67da1908c4dd0e10a24f65d321875fae3dae7a42 Mon Sep 17 00:00:00 2001
From: Felix Homann <linuxaudio@showlabor.de>
Date: Wed, 18 May 2011 10:40:22 +0200
Subject: [PATCH - Basic mixer support for Fast Track Ultra 5/6]Try to create a mixer for quirked devices, too


Signed-off-by: Felix Homann <linuxaudio@showlabor.de>

diff --git a/sound/usb/card.c b/sound/usb/card.c
index 40722f8..52ad7b0 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -493,6 +493,11 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
 	 */
 	if (!chip->ctrl_intf)
 		chip->ctrl_intf = alts;
+	
+	/* try to create a mixer for quirked devices, too */
+	if (snd_usb_create_mixer(chip, ifnum, ignore_ctl_error) < 0) {
+		goto __error;
+	}
 
 	if (err > 0) {
 		/* create normal USB audio interfaces */
-- 
1.7.4.1


[-- Attachment #6: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-18 15:19 A plea for help on mixer support for Fast Track Ultra (8R) Felix Homann
@ 2011-05-18 15:29 ` Felix Homann
  2011-05-18 17:51 ` Daniel Mack
  1 sibling, 0 replies; 34+ messages in thread
From: Felix Homann @ 2011-05-18 15:29 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]

Sorry for the mail formated patches!

Here's a single combined patch.

Regards,

Felix

Am 18.05.2011 17:19, schrieb Felix Homann:
> Hi,
>
> I need some help again by someone who's more familiar with Alsa's 
> inner working than I am. This might be you, Daniel ;-)
>
> I've attached a patch series that would add support for the mixer in 
> M-Audio's Fast Track Ultra (8R) devices.
>
> BUT, it will break others!
>
> It will break others in that mixer controls will show up multiple 
> times. The reason for this seems to be my ambitiuos calling of 
> snd_usb_create_mixer() for quirked devices in card.c. To circumvent 
> the problem of a control showing up multiple times, I check for 
> duplicates in add_unique_control_to_empty_mixer() and skip controls 
> already present.
>
> This doesn't work for devices which are not using 
> add_unique_control_to_empty_mixer(), in other words *all* devices not 
> using my messy patch...
>
> So, probably the best thing would be to have some kind of entry in 
> quirks-table.h to tell which device would need to be "mixerquirked" to 
> prevent other devices to be disturbed. How can this be done?
>
> I would highly appreciate anybody coming up with a proper solution.
>
> Kind regards,
>
> Felix
>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[-- Attachment #2: ftu-basic-mixer.patch --]
[-- Type: text/x-patch, Size: 6014 bytes --]

diff --git a/sound/usb/card.c b/sound/usb/card.c
index 40722f8..52ad7b0 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -493,6 +493,11 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
 	 */
 	if (!chip->ctrl_intf)
 		chip->ctrl_intf = alts;
+	
+	/* try to create a mixer for quirked devices, too */
+	if (snd_usb_create_mixer(chip, ifnum, ignore_ctl_error) < 0) {
+		goto __error;
+	}
 
 	if (err > 0) {
 		/* create normal USB audio interfaces */
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 5e47757..1c37792 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -86,16 +86,6 @@ struct mixer_build {
 	const struct usbmix_selector_map *selector_map;
 };
 
-enum {
-	USB_MIXER_BOOLEAN,
-	USB_MIXER_INV_BOOLEAN,
-	USB_MIXER_S8,
-	USB_MIXER_U8,
-	USB_MIXER_S16,
-	USB_MIXER_U16,
-};
-
-
 /*E-mu 0202/0404/0204 eXtension Unit(XU) control*/
 enum {
 	USB_XU_CLOCK_RATE 		= 0xe301,
@@ -552,6 +542,31 @@ static int add_control_to_empty(struct mixer_build *state, struct snd_kcontrol *
 	return 0;
 }
 
+/* 
+ * This is almost the same as 'add_control_to_empty' but using a mixer instead of a mixer_build
+ * it simplifies building a mixer for devices without proper descriptors,
+ * e.g. the Fast Track Ultra devices
+ */ 
+int add_unique_control_to_empty_mixer(struct usb_mixer_interface *mixer, struct snd_kcontrol *kctl)
+{
+	struct usb_mixer_elem_info *cval = kctl->private_data;
+	int err;
+	
+	/* No duplicates! */
+	if (snd_ctl_find_id(mixer->chip->card, &kctl->id))
+		return 0;
+
+	if ((err = snd_ctl_add(mixer->chip->card, kctl)) < 0) {
+		snd_printd(KERN_ERR "cannot add control (err = %d)\n", err);
+		return err;
+	}
+	
+	cval->elem_id = &kctl->id;
+	cval->next_id_elem = mixer->id_elems[cval->id];
+	mixer->id_elems[cval->id] = cval;
+	
+	return 0;
+}
 
 /*
  * get a terminal name string
@@ -1341,6 +1356,57 @@ static void build_mixer_unit_ctl(struct mixer_build *state,
 	add_control_to_empty(state, kctl);
 }
 
+/*
+ * build a mixer unit control and give it a name
+ *
+ * this is essentially identical to build_mixer_unit_ctl but doesn't
+ * rely on proper descriptors to get a name for a control.
+ * At least, useful for Fast Track Ultra devices.
+ */
+
+int build_named_mixer_unit_ctl(struct usb_mixer_interface *mixer,
+	int in_pin, int in_ch, int unitid, int val_type, unsigned int cmask, char* ctrl_name, int channels)
+{
+	struct usb_mixer_elem_info *cval;
+	struct snd_kcontrol *kctl;
+	int err;
+	
+	cval = kzalloc(sizeof(*cval), GFP_KERNEL);
+	if (! cval)
+		return -1;
+	
+	cval->mixer = mixer;
+	cval->id = unitid;
+	cval->control = in_ch + 1; /* based on 1 */
+	cval->val_type = val_type; /* like USB_MIXER_S16 etc. */
+	if (!((0 < channels) && (channels <= MAX_CHANNELS)))
+		return -1;
+	cval->channels = 1;
+	cval->cmask = cmask;
+	/* get min/max values */
+	get_min_max(cval, 0);
+	
+	kctl = snd_ctl_new1(&usb_feature_unit_ctl, cval);
+	if (! kctl) {
+		snd_printk(KERN_ERR "cannot malloc kcontrol\n");
+		kfree(cval);
+		return -1;
+	}
+	
+	kctl->tlv.c = mixer_vol_tlv;
+	kctl->vd[0].access |= 
+		SNDRV_CTL_ELEM_ACCESS_TLV_READ |
+		SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK;
+	kctl->private_free = usb_mixer_elem_free;
+	
+	sprintf(kctl->id.name, ctrl_name);
+	
+	if (err = add_unique_control_to_empty_mixer(mixer, kctl))
+		return err;
+	
+	return 0;
+}
+
 
 /*
  * parse a mixer unit
diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h
index b4a2c81..6fe7bea 100644
--- a/sound/usb/mixer.h
+++ b/sound/usb/mixer.h
@@ -1,6 +1,15 @@
 #ifndef __USBMIXER_H
 #define __USBMIXER_H
 
+enum {
+	USB_MIXER_BOOLEAN,
+	USB_MIXER_INV_BOOLEAN,
+	USB_MIXER_S8,
+	USB_MIXER_U8,
+	USB_MIXER_S16,
+	USB_MIXER_U16,
+};
+
 struct usb_mixer_interface {
 	struct snd_usb_audio *chip;
 	struct list_head list;
@@ -24,7 +33,7 @@ struct usb_mixer_interface {
 	u8 xonar_u1_status;
 };
 
-#define MAX_CHANNELS	10	/* max logical channels */
+#define MAX_CHANNELS	16	/* max logical channels */
 
 struct usb_mixer_elem_info {
 	struct usb_mixer_interface *mixer;
@@ -52,6 +61,9 @@ void snd_usb_mixer_notify_id(struct usb_mixer_interface *mixer, int unitid);
 
 int snd_usb_mixer_set_ctl_value(struct usb_mixer_elem_info *cval,
 				int request, int validx, int value_set);
+int build_named_mixer_unit_ctl(struct usb_mixer_interface *mixer,
+		int in_pin, int in_ch, int unitid, int val_type, 
+		unsigned int cmask, char* ctrl_name, int channels);
 void snd_usb_mixer_inactivate(struct usb_mixer_interface *mixer);
 int snd_usb_mixer_activate(struct usb_mixer_interface *mixer);
 
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 73dcc82..e87f359 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -500,6 +500,36 @@ void snd_emuusb_set_samplerate(struct snd_usb_audio *chip,
 	}
 }
 
+/*
+ * Create mixer controls for Fast Track Ultra (8R)
+ */
+int snd_ftu_controls_create(struct usb_mixer_interface *mixer)
+{
+	char name[44];
+	int out, in_ch, unitid, err;
+	unsigned int cmask;
+	int val_type =  USB_MIXER_S16;
+	int channels = 1; /* mono channels */
+	
+	unitid = 5; // FTU's unit id
+	for (out = 0; out < 8; ++out) {
+		for (in_ch = 0; in_ch < 16; ++in_ch) {
+				cmask = (1 << in_ch);
+			if (in_ch < 8)
+				sprintf(name, "AIn%d - Out%d Capture Volume", in_ch + 1, out + 1);
+			else if (in_ch >= 8)
+				sprintf(name, "DIn%d - Out%d Playback Volume", in_ch - 7, out + 1);     
+			if ((err = build_named_mixer_unit_ctl(mixer, in_ch, out, unitid, 
+				val_type, cmask, name, channels))) {
+				return err;
+			}
+		}
+	}
+	
+	return 0;
+}
+
+
 int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
 {
 	int err = 0;
@@ -537,6 +567,10 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
 				snd_nativeinstruments_ta10_mixers,
 				ARRAY_SIZE(snd_nativeinstruments_ta10_mixers));
 		break;
+	case USB_ID(0x0763, 0x2080):/* M-Audio Fast Track Ultra */
+	case USB_ID(0x0763, 0x2081): /* M-Audio Fast Track Ultra 8R */
+		err = snd_ftu_controls_create(mixer);
+		break;
 	}
 
 	return err;


[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-18 15:19 A plea for help on mixer support for Fast Track Ultra (8R) Felix Homann
  2011-05-18 15:29 ` Felix Homann
@ 2011-05-18 17:51 ` Daniel Mack
  2011-05-18 18:46   ` Felix Homann
  1 sibling, 1 reply; 34+ messages in thread
From: Daniel Mack @ 2011-05-18 17:51 UTC (permalink / raw)
  To: Felix Homann; +Cc: alsa-devel, Grant Diffey

HI Felix,

On Wed, May 18, 2011 at 5:19 PM, Felix Homann <linuxaudio@showlabor.de> wrote:
> I need some help again by someone who's more familiar with Alsa's inner
> working than I am. This might be you, Daniel ;-)
>
> I've attached a patch series that would add support for the mixer in
> M-Audio's Fast Track Ultra (8R) devices.
>
> BUT, it will break others!
>
> It will break others in that mixer controls will show up multiple times. The
> reason for this seems to be my ambitiuos calling of snd_usb_create_mixer()
> for quirked devices in card.c. To circumvent the problem of a control
> showing up multiple times, I check for duplicates in
> add_unique_control_to_empty_mixer() and skip controls already present.

Hmm, I'm not sure whether I understand what you're trying to do. You
want to add mixers that are not added by the generic driver? Then just
have a look how this is done for other devices, like for example for
the "Traktor Audio 10". Or do I miss your point?


As a general rule, let the check-patch.pl script that ships with the
kernel have a look at your patches, it will point out obvious coding
style issues and the like :)


Daniel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-18 17:51 ` Daniel Mack
@ 2011-05-18 18:46   ` Felix Homann
  2011-05-18 21:30     ` Daniel Mack
  0 siblings, 1 reply; 34+ messages in thread
From: Felix Homann @ 2011-05-18 18:46 UTC (permalink / raw)
  To: Daniel Mack; +Cc: alsa-devel, Grant Diffey

Hi Daniel,

Am 18.05.2011 19:51, schrieb Daniel Mack:
>
> Hmm, I'm not sure whether I understand what you're trying to do. You
> want to add mixers that are not added by the generic driver?

I'm adding a mixer to a device that doesn't even tell the driver that a 
mixer is present. There's no descriptor for it whatsoever. Nevertheless, 
you can control the mixer just like a standard usb audio mixer. 
Therefore I wanted to reuse as much of already present code as possible. 
Most of all I didn't want to construct any URBs or write new control_get 
or _put functions.

The problem is not how to get the mixer for the Fast Track Ultra (FTU) 
working. The problem is how to do it without breaking other mixers ;-)

The main problem at the moment is that snd_usb_create_mixer() will not 
be called on quirked devices! Take a look at card.c: 
snd_usb_create_mixer() will only be called if snd_usb_create_quirk() 
returns > 0. But why should we assume that quirked devices don't have 
any mixers?

I have forced calling snd_usb_create_mixer() for every device in my 
patch set. But this way controls from other devices will show up 
multiple times. We definetely don't want that.

If snd_usb_create_mixer() will be called for the FTU then the rest of my 
patch set works just fine. So how can I tell card.c to call it? I think 
a generic solution would be best, like some entry in quirks-table.h.

> As a general rule, let the check-patch.pl script that ships with the
> kernel have a look at your patches, it will point out obvious coding
> style issues and the like :)

I knew it wasn't ready for submission. After generating the patch I send 
I had already corrected the whitespaces and those lines with over 80 
characters that weren't just copies from other locations. The remaining 
issues like "! cval" and "ERROR: do not use assignment in if condition" 
were all taken literally from other locations inside the respective 
files. So, besides one C99 comment it's very much in style with the 
files I've been working on ;-)

Regards,

Felix

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-18 18:46   ` Felix Homann
@ 2011-05-18 21:30     ` Daniel Mack
  2011-05-19  0:51       ` Grant Diffey
  2011-05-19  5:42       ` Takashi Iwai
  0 siblings, 2 replies; 34+ messages in thread
From: Daniel Mack @ 2011-05-18 21:30 UTC (permalink / raw)
  To: Felix Homann; +Cc: alsa-devel, Grant Diffey

On Wed, May 18, 2011 at 8:46 PM, Felix Homann <linuxaudio@showlabor.de> wrote:
> Am 18.05.2011 19:51, schrieb Daniel Mack:
>>
>> Hmm, I'm not sure whether I understand what you're trying to do. You
>> want to add mixers that are not added by the generic driver?
>
> I'm adding a mixer to a device that doesn't even tell the driver that a
> mixer is present. There's no descriptor for it whatsoever. Nevertheless, you
> can control the mixer just like a standard usb audio mixer. Therefore I
> wanted to reuse as much of already present code as possible. Most of all I
> didn't want to construct any URBs or write new control_get or _put
> functions.

Ok, I see your point. Well in that case, I would add the mixers in
mixer_quirks.c just like you did in your patch, but I would basically
copy some code from build_feature_ctl() and allocate and fill a
special cval from within your quirk function. I would suggest making
usb_feature_unit_ctl (the struct) public (remove the static, prefix
the name with snd_usb_ and add the prototype to the header), so you
can reference it from mixer_quirks.c. That way, you would keep all the
_info, _get and _put functions privately to mixer.c, but still have
the ability to reuse most of the code. You just need to fill your cval
with data the generic functions can cope with. Does that make sense?

> The problem is not how to get the mixer for the Fast Track Ultra (FTU)
> working. The problem is how to do it without breaking other mixers ;-)

You wouldn't alter any existing code that way, and just add special
stuff for this device.

> The main problem at the moment is that snd_usb_create_mixer() will not be
> called on quirked devices! Take a look at card.c: snd_usb_create_mixer()
> will only be called if snd_usb_create_quirk() returns > 0. But why should we
> assume that quirked devices don't have any mixers?

That is indeed strange, yes. I can't explain that. Not to break
existing devices, I would suggest adding a bit-wise "flags" field to
snd_usb_audio_quirk and still create the mixers if a certain flag
(something like "QUIRK_FLAG_CREATE_STANDARD_MIXERS") is set. Clemens,
Takashi, would that be ok?

In general, note that as long as functions are static, the can and
should have short names. But once they're not, you're in the global
kernel namespace, and all symbols must be well prefixed (with
"snd_usb_" in that case) in order to avoid name collisions.


Daniel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-18 21:30     ` Daniel Mack
@ 2011-05-19  0:51       ` Grant Diffey
  2011-05-19  5:42       ` Takashi Iwai
  1 sibling, 0 replies; 34+ messages in thread
From: Grant Diffey @ 2011-05-19  0:51 UTC (permalink / raw)
  To: Daniel Mack; +Cc: alsa-devel, Felix Homann

Daniel,

> The main problem at the moment is that snd_usb_create_mixer() will not be
> > called on quirked devices! Take a look at card.c: snd_usb_create_mixer()
> > will only be called if snd_usb_create_quirk() returns > 0. But why should
> we
> > assume that quirked devices don't have any mixers?
>
> That is indeed strange, yes. I can't explain that. Not to break
> existing devices, I would suggest adding a bit-wise "flags" field to
> snd_usb_audio_quirk and still create the mixers if a certain flag
> (something like "QUIRK_FLAG_CREATE_STANDARD_MIXERS") is set. Clemens,
> Takashi, would that be ok?
>
> In general, note that as long as functions are static, the can and
> should have short names. But once they're not, you're in the global
> kernel namespace, and all symbols must be well prefixed (with
> "snd_usb_" in that case) in order to avoid name collisions.
>
>
So this is probably a terrible idea but what about creating a new quirk

QUIRK_MIXER_STANDARD_INTERFACE and just having that eventually call
snd_usb_create_mixer()

because conceptually I could see this as two problems with two solutions.
one is that the interface type/blah is the mixer is a lie (vendor_specific
instead of UAC2 MIXER . (should be solved via a "quirk" in quirk-table.h)
and

The other is that the endpoint descriptors within that are wrong (solved in
mixer_quirks)

or am I thinking about this wrong?

Grant.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-18 21:30     ` Daniel Mack
  2011-05-19  0:51       ` Grant Diffey
@ 2011-05-19  5:42       ` Takashi Iwai
  2011-05-19  6:45         ` Felix Homann
  1 sibling, 1 reply; 34+ messages in thread
From: Takashi Iwai @ 2011-05-19  5:42 UTC (permalink / raw)
  To: Daniel Mack; +Cc: alsa-devel, Grant Diffey, Felix Homann

At Wed, 18 May 2011 23:30:46 +0200,
Daniel Mack wrote:
> 
> > The main problem at the moment is that snd_usb_create_mixer() will not be
> > called on quirked devices! Take a look at card.c: snd_usb_create_mixer()
> > will only be called if snd_usb_create_quirk() returns > 0. But why should we
> > assume that quirked devices don't have any mixers?
> 
> That is indeed strange, yes. I can't explain that. Not to break
> existing devices, I would suggest adding a bit-wise "flags" field to
> snd_usb_audio_quirk and still create the mixers if a certain flag
> (something like "QUIRK_FLAG_CREATE_STANDARD_MIXERS") is set. Clemens,
> Takashi, would that be ok?

Returning zero means that you don't follow any standard.  
In the comment of snd_usb_create_quirk:
/*
 * audio-interface quirks
 *
 * returns zero if no standard audio/MIDI parsing is needed.
 * returns a positive value if standard audio/midi interfaces are parsed
 * after this.
 * returns a negative value at error.
 */

I see no big reason to make things more complex.  If you want to avoid
the standard audio parsing after quirk but only parse mixer, just call 
snd_usb_create_mixer() in your quirk function.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-19  5:42       ` Takashi Iwai
@ 2011-05-19  6:45         ` Felix Homann
  2011-05-19  7:15           ` Clemens Ladisch
  2011-05-19  7:24           ` Takashi Iwai
  0 siblings, 2 replies; 34+ messages in thread
From: Felix Homann @ 2011-05-19  6:45 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Grant Diffey, Daniel Mack

Am 19.05.2011 07:42, schrieb Takashi Iwai:
> I see no big reason to make things more complex.  If you want to avoid
> the standard audio parsing after quirk but only parse mixer, just call
> snd_usb_create_mixer() in your quirk function.
>

Maybe I'm misunderstanding your point. But I think your suggestion is 
making things more complex.

I don't want to avoid the standard audio parsing. I want to use standard 
quirks if possible and still would like a means to call 
snd_usb_create_mixer(). That's all.

The device in question can be handled by a standard quirks 
(QUIRK_ANY_INTERFACE, QUIRK_COMPOSITE, QUIRK_AUDIO_FIXED_ENDPOINT). 
There's no hook for calling snd_usb_create_mixer() by the respective 
quirk functions, is there? Should I really need not to use those 
standard quirks just to call snd_usb_create_mixer()?

Moreover, I can't believe that the Fast Track Ultra devices are the only 
ones in the world which have a standard USB mixer without exposing it 
through the descriptors. (I've often read something like "but the mixer 
won't work") A simple generic standard way to handle those devices would 
be nice to have.

Take a look at it from my perspective: I'm just a layman on all of this. 
I full heartedly confess, that I don't actually understand all those 
functions involved in making a mixer work. I don't understand usb 
control messages an so on.
For example, take a look at the snd_nativeinstruments_control_put() 
function as Daniel suggested. There's a line

     usb_control_msg(dev, usb_sndctrlpipe(dev, 0), bRequest,
                   USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
                   cpu_to_le16(wValue), cpu_to_le16(wIndex),
                   NULL, 0, 1000);

What is it? How is anyone not deeply involved with USB programming 
and/or audio device programming supposed to understand it? How is 
anybody supposed to help Alsa development to get his device working 
without deeply diving into all this stuff *which should not be needed*?

But being a layman I could still understand that the mixer unit in my 
device is there and that it is controlled by standard usb commands 
(control messages?). So what to do next?

For the capture, playback and MIDI side it's already simple: If you have 
a device that you suspect to be more or less standard compliant but just 
doesn't tell the world about it he can just try some combinations of  
QUIRK_AUDIO_FIXED_ENDPOINT, QUIRK_AUDIO_STANDARD_INTERFACE, 
QUIRK_MIDI_FIXED_ENDPOINT etc. (which by the way are still not easy to 
understand due to lack of documentation!).

For mixers, there isn't such a standard way. That's what I would like to 
have! And that's what I have at least sketched with my patch. (While the 
standard way to tell the driver to call snd_usb_create_mixer() is still 
missing.)

Take a look at my (maybe naive?) snd_ftu_controls_create() function. 
It's easy to understand, it's simple:
I essentially just pass channel numbers, and names to 
build_named_mixer_unit_ctl() which is a slightly modified version of 
build_mixer_unit_ctl() and voila: I get a volume control for the 
respective mixer channel, just as if the control had been known from a 
descriptor. That's a lot easier to understand than fiddling around with 
usb_control_msg(), isn't it?

So, at the end as stated above, I would like to see a simple, easy to 
understand standard way to handle a mixer that essentially *is* a 
standard USB audio mixer but doesn't tell the world about it...And of 
course, it should work with my device ;-)

Kind regards,

Felix

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-19  6:45         ` Felix Homann
@ 2011-05-19  7:15           ` Clemens Ladisch
  2011-05-19  7:24           ` Takashi Iwai
  1 sibling, 0 replies; 34+ messages in thread
From: Clemens Ladisch @ 2011-05-19  7:15 UTC (permalink / raw)
  To: Felix Homann; +Cc: Takashi Iwai, alsa-devel, Grant Diffey, Daniel Mack

Felix Homann wrote:
> Am 19.05.2011 07:42, schrieb Takashi Iwai:
> > I see no big reason to make things more complex.  If you want to avoid
> > the standard audio parsing after quirk but only parse mixer, just call
> > snd_usb_create_mixer() in your quirk function.
> 
> Maybe I'm misunderstanding your point. But I think your suggestion is 
> making things more complex.
> 
> I don't want to avoid the standard audio parsing. I want to use standard
> quirks if possible and still would like a means to call
> snd_usb_create_mixer(). That's all.

The quirks-table.h framework handles only quirks that attach to a USB
interface.  So create a FTU mixer quirk for intf 0 (or a generic quirk
with a separate table of mixer controls).

> Moreover, I can't believe that the Fast Track Ultra devices are the only
> ones in the world which have a standard USB mixer without exposing it
> through the descriptors.

So far, they are the only ones where somebody bothered to find out what
the controls are.

(Many vendor-specific controls don't implement the complex class-
compliant mixer protocol.)

> I knew it wasn't ready for submission. After generating the patch I send 
> I had already corrected the whitespaces and those lines with over 80 
> characters that weren't just copies from other locations. The remaining 
> issues like "! cval" and "ERROR: do not use assignment in if condition" 
> were all taken literally from other locations inside the respective 
> files.

"Do as I say, not as I do."  ;-)


Regards,
Clemens

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-19  6:45         ` Felix Homann
  2011-05-19  7:15           ` Clemens Ladisch
@ 2011-05-19  7:24           ` Takashi Iwai
  2011-05-19  8:14             ` Felix Homann
  1 sibling, 1 reply; 34+ messages in thread
From: Takashi Iwai @ 2011-05-19  7:24 UTC (permalink / raw)
  To: Felix Homann; +Cc: alsa-devel, Grant Diffey, Daniel Mack

At Thu, 19 May 2011 08:45:43 +0200,
Felix Homann wrote:
> 
> Am 19.05.2011 07:42, schrieb Takashi Iwai:
> > I see no big reason to make things more complex.  If you want to avoid
> > the standard audio parsing after quirk but only parse mixer, just call
> > snd_usb_create_mixer() in your quirk function.
> >
> 
> Maybe I'm misunderstanding your point. But I think your suggestion is 
> making things more complex.
> 
> I don't want to avoid the standard audio parsing. I want to use standard 
> quirks if possible and still would like a means to call 
> snd_usb_create_mixer(). That's all.

First off, there is no "standard" quirk per definition :)
There can be common quirks used by multiple devices, but this doesn't 
justify the fact that it's no standard USB-audio.

In principle, quirks are provided to be self-contained.  If it's not
compliant to standard usb-audio, handle everything there -- that's the
whole policy.  If we add yet another condition here and there in the
main path for specific devices, it'll make readability worse.

(Or, think like OO implementation: if you want to implement a variant,
 you wouldn't put new conditional branch, but usually override the
 necessary parts.)

In this particular case, you can call snd_usb_create_mixer() then
create your mixer elements in addition in your quirk function.  This
is more straightforward than adding branches in multiple points.

Of course, there can be some room for refactoring to share codes
between different quirks.  But it's a thing to be done in quirk
codes.


> The device in question can be handled by a standard quirks 
> (QUIRK_ANY_INTERFACE, QUIRK_COMPOSITE, QUIRK_AUDIO_FIXED_ENDPOINT). 
> There's no hook for calling snd_usb_create_mixer() by the respective 
> quirk functions, is there? Should I really need not to use those 
> standard quirks just to call snd_usb_create_mixer()?
>
> Moreover, I can't believe that the Fast Track Ultra devices are the only 
> ones in the world which have a standard USB mixer without exposing it 
> through the descriptors. (I've often read something like "but the mixer 
> won't work") A simple generic standard way to handle those devices would 
> be nice to have.
> 
> Take a look at it from my perspective: I'm just a layman on all of this. 
> I full heartedly confess, that I don't actually understand all those 
> functions involved in making a mixer work. I don't understand usb 
> control messages an so on.
> For example, take a look at the snd_nativeinstruments_control_put() 
> function as Daniel suggested. There's a line
> 
>      usb_control_msg(dev, usb_sndctrlpipe(dev, 0), bRequest,
>                    USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
>                    cpu_to_le16(wValue), cpu_to_le16(wIndex),
>                    NULL, 0, 1000);
> 
> What is it? How is anyone not deeply involved with USB programming 
> and/or audio device programming supposed to understand it? How is 
> anybody supposed to help Alsa development to get his device working 
> without deeply diving into all this stuff *which should not be needed*?
> 
> But being a layman I could still understand that the mixer unit in my 
> device is there and that it is controlled by standard usb commands 
> (control messages?). So what to do next?
> 
> For the capture, playback and MIDI side it's already simple: If you have 
> a device that you suspect to be more or less standard compliant but just 
> doesn't tell the world about it he can just try some combinations of  
> QUIRK_AUDIO_FIXED_ENDPOINT, QUIRK_AUDIO_STANDARD_INTERFACE, 
> QUIRK_MIDI_FIXED_ENDPOINT etc. (which by the way are still not easy to 
> understand due to lack of documentation!).
> 
> For mixers, there isn't such a standard way. That's what I would like to 
> have! And that's what I have at least sketched with my patch. (While the 
> standard way to tell the driver to call snd_usb_create_mixer() is still 
> missing.)
> 
> Take a look at my (maybe naive?) snd_ftu_controls_create() function. 
> It's easy to understand, it's simple:
> I essentially just pass channel numbers, and names to 
> build_named_mixer_unit_ctl() which is a slightly modified version of 
> build_mixer_unit_ctl() and voila: I get a volume control for the 
> respective mixer channel, just as if the control had been known from a 
> descriptor. That's a lot easier to understand than fiddling around with 
> usb_control_msg(), isn't it?
> 
> So, at the end as stated above, I would like to see a simple, easy to 
> understand standard way to handle a mixer that essentially *is* a 
> standard USB audio mixer but doesn't tell the world about it...And of 
> course, it should work with my device ;-)

What I'm thinking is also to keep the thing simple.
My points are:
 - Try to avoid conditional branches, don't touch the main path as
   much as possible
 - You can call the standard parsers in the quirk itself
 - You can create additional mixer contents in the quirk as well
   (so just use your simplified snd_ftu_controls_create()).


thanks,

Takashi

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-19  7:24           ` Takashi Iwai
@ 2011-05-19  8:14             ` Felix Homann
  2011-05-19  8:52               ` Daniel Mack
  0 siblings, 1 reply; 34+ messages in thread
From: Felix Homann @ 2011-05-19  8:14 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Grant Diffey, Daniel Mack

Please, Clemens, Daniel and Takashi.

Every single one of you knows at least one way of doing it correctly. I 
don't.

I don't understand most of your suggestions, I don't understand the 
whole quirk framework. I'm just a layman who knows one way of making the 
FTU mixer work which would break others (just by calling 
snd_usb_create_mixer() too many times).

The "blueprint patch" I've send is very small. It's just three 
functions, one of them is very simple the others are almost identical to 
already present functions.

So please, couldn't someone fill the gap between what I have found and a 
proper implementation? As I see it, you might easily spend the same 
amount of time explaining to me how it should be done or why my next 
proposed patch (which would probably take at least a couple of weeks) is 
not acceptable and so on. But this would probably run for weeks or even 
months.

Please, help.

Thanks,

Felix

Am 19.05.2011 09:24, schrieb Takashi Iwai:
>
> In this particular case, you can call snd_usb_create_mixer() then
> create your mixer elements in addition in your quirk function.  This
> is more straightforward than adding branches in multiple points.
>
> Of course, there can be some room for refactoring to share codes
> between different quirks.  But it's a thing to be done in quirk
> codes.
> What I'm thinking is also to keep the thing simple.
> My points are:
>   - Try to avoid conditional branches, don't touch the main path as
>     much as possible
>   - You can call the standard parsers in the quirk itself
>   - You can create additional mixer contents in the quirk as well
>     (so just use your simplified snd_ftu_controls_create()).


Am 19.05.2011 09:15, schrieb Clemens Ladisch:
>
> So create a FTU mixer quirk for intf 0 (or a generic quirk
> with a separate table of mixer controls).
>

Am 18.05.2011 23:30, schrieb Daniel Mack:
> Well in that case, I would add the mixers in
> mixer_quirks.c just like you did in your patch, but I would basically
> copy some code from build_feature_ctl() and allocate and fill a
> special cval from within your quirk function. I would suggest making
> usb_feature_unit_ctl (the struct) public (remove the static, prefix
> the name with snd_usb_ and add the prototype to the header), so you
> can reference it from mixer_quirks.c. That way, you would keep all the
> _info, _get and _put functions privately to mixer.c, but still have
> the ability to reuse most of the code. You just need to fill your cval
> with data the generic functions can cope with. Does that make sense?
>

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-19  8:14             ` Felix Homann
@ 2011-05-19  8:52               ` Daniel Mack
  2011-05-19 10:56                 ` Felix Homann
  2011-05-19 11:05                 ` Daniel Mack
  0 siblings, 2 replies; 34+ messages in thread
From: Daniel Mack @ 2011-05-19  8:52 UTC (permalink / raw)
  To: Felix Homann; +Cc: Takashi Iwai, alsa-devel, Grant Diffey

On Thu, May 19, 2011 at 10:14 AM, Felix Homann <linuxaudio@showlabor.de> wrote:
> Please, Clemens, Daniel and Takashi.
>
> Every single one of you knows at least one way of doing it correctly. I
> don't.
>
> I don't understand most of your suggestions, I don't understand the whole
> quirk framework. I'm just a layman who knows one way of making the FTU mixer
> work which would break others (just by calling snd_usb_create_mixer() too
> many times).
>
> The "blueprint patch" I've send is very small. It's just three functions,
> one of them is very simple the others are almost identical to already
> present functions.
>
> So please, couldn't someone fill the gap between what I have found and a
> proper implementation? As I see it, you might easily spend the same amount
> of time explaining to me how it should be done or why my next proposed patch
> (which would probably take at least a couple of weeks) is not acceptable and
> so on. But this would probably run for weeks or even months.

I'll have a look later. I was just under the impression you wanted to
try yourself :)

Daniel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-19  8:52               ` Daniel Mack
@ 2011-05-19 10:56                 ` Felix Homann
  2011-05-19 11:05                 ` Daniel Mack
  1 sibling, 0 replies; 34+ messages in thread
From: Felix Homann @ 2011-05-19 10:56 UTC (permalink / raw)
  To: Daniel Mack; +Cc: alsa-devel, Grant Diffey

Great Daniel, thank you in advance!

I would really like to do it myself. It's just not a good time for me 
too dive further into the Alsa working. I wouldn't have brought the 
mixer thing up this time without being pushed again by Grant and some 
others. So I guess it's better for everybody to have the basic mixer 
controls in Alsa as soon as possible than to wait until I get it right 
;-)  Especially those with a FTU will appreciate that.

I'll probably have a bit more time from mid June to end of July, so 
maybe we can take a new look at the clicks then, if you still like to.

Thanks,

Felix

Am 19.05.2011 10:52, schrieb Daniel Mack:
>
> I'll have a look later. I was just under the impression you wanted to
> try yourself :)
>
> Daniel
>

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-19  8:52               ` Daniel Mack
  2011-05-19 10:56                 ` Felix Homann
@ 2011-05-19 11:05                 ` Daniel Mack
  2011-05-19 12:23                   ` Felix Homann
                                     ` (2 more replies)
  1 sibling, 3 replies; 34+ messages in thread
From: Daniel Mack @ 2011-05-19 11:05 UTC (permalink / raw)
  To: Felix Homann; +Cc: Takashi Iwai, alsa-devel, Grant Diffey

[-- Attachment #1: Type: text/plain, Size: 650 bytes --]

On Thu, May 19, 2011 at 10:52 AM, Daniel Mack <zonque@gmail.com> wrote:
> I'll have a look later. I was just under the impression you wanted to
> try yourself :)

Attached is a patch which should show how this could work. It won't be
fully functional though, as there seems to be some sort of confusion
in your patch. You're calling build_named_mixer_unit_ctl() with your
loop variable "in_ch", but you ignore that value in the called
function. That can't be intentional, can it?

Anyway, very little tweaking should be needed now to make this work,
and if you send me back the modified patch, I'll split the work and
post a patch set here.


Daniel

[-- Attachment #2: ftu-mixer.diff --]
[-- Type: application/octet-stream, Size: 7719 bytes --]

diff --git a/sound/usb/card.c b/sound/usb/card.c
index a90662a..e7d1e0d 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -48,6 +48,7 @@
 #include <linux/usb/audio.h>
 #include <linux/usb/audio-v2.h>
 
+#include <sound/control.h>
 #include <sound/core.h>
 #include <sound/info.h>
 #include <sound/pcm.h>
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index eab06ed..3184d77 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -86,16 +86,6 @@ struct mixer_build {
 	const struct usbmix_selector_map *selector_map;
 };
 
-enum {
-	USB_MIXER_BOOLEAN,
-	USB_MIXER_INV_BOOLEAN,
-	USB_MIXER_S8,
-	USB_MIXER_U8,
-	USB_MIXER_S16,
-	USB_MIXER_U16,
-};
-
-
 /*E-mu 0202/0404/0204 eXtension Unit(XU) control*/
 enum {
 	USB_XU_CLOCK_RATE 		= 0xe301,
@@ -535,20 +525,21 @@ static int check_matrix_bitmap(unsigned char *bmap, int ich, int och, int num_ou
  * if failed, give up and free the control instance.
  */
 
-static int add_control_to_empty(struct mixer_build *state, struct snd_kcontrol *kctl)
+int snd_usb_mixer_add_control(struct usb_mixer_interface *mixer,
+			      struct snd_kcontrol *kctl)
 {
 	struct usb_mixer_elem_info *cval = kctl->private_data;
 	int err;
 
-	while (snd_ctl_find_id(state->chip->card, &kctl->id))
+	while (snd_ctl_find_id(mixer->chip->card, &kctl->id))
 		kctl->id.index++;
-	if ((err = snd_ctl_add(state->chip->card, kctl)) < 0) {
+	if ((err = snd_ctl_add(mixer->chip->card, kctl)) < 0) {
 		snd_printd(KERN_ERR "cannot add control (err = %d)\n", err);
 		return err;
 	}
 	cval->elem_id = &kctl->id;
-	cval->next_id_elem = state->mixer->id_elems[cval->id];
-	state->mixer->id_elems[cval->id] = cval;
+	cval->next_id_elem = mixer->id_elems[cval->id];
+	mixer->id_elems[cval->id] = cval;
 	return 0;
 }
 
@@ -967,7 +958,7 @@ static int mixer_ctl_feature_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
 	return changed;
 }
 
-static struct snd_kcontrol_new usb_feature_unit_ctl = {
+struct snd_kcontrol_new usb_feature_unit_ctl = {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "", /* will be filled later manually */
 	.info = mixer_ctl_feature_info,
@@ -984,6 +975,9 @@ static struct snd_kcontrol_new usb_feature_unit_ctl_ro = {
 	.put = NULL,
 };
 
+/* This symbol is exported in order to allow the mixer quirks to
+ * hook up to the standard feature unit control mechanism */
+struct snd_kcontrol_new *snd_usb_feature_unit_ctl = &usb_feature_unit_ctl;
 
 /*
  * build a feature control
@@ -1176,7 +1170,7 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
 
 	snd_printdd(KERN_INFO "[%d] FU [%s] ch = %d, val = %d/%d/%d\n",
 		    cval->id, kctl->id.name, cval->channels, cval->min, cval->max, cval->res);
-	add_control_to_empty(state, kctl);
+	snd_usb_mixer_add_control(state->mixer, kctl);
 }
 
 
@@ -1340,7 +1334,7 @@ static void build_mixer_unit_ctl(struct mixer_build *state,
 
 	snd_printdd(KERN_INFO "[%d] MU [%s] ch = %d, val = %d/%d\n",
 		    cval->id, kctl->id.name, cval->channels, cval->min, cval->max);
-	add_control_to_empty(state, kctl);
+	snd_usb_mixer_add_control(state->mixer, kctl);
 }
 
 
@@ -1641,7 +1635,7 @@ static int build_audio_procunit(struct mixer_build *state, int unitid, void *raw
 
 		snd_printdd(KERN_INFO "[%d] PU [%s] ch = %d, val = %d/%d\n",
 			    cval->id, kctl->id.name, cval->channels, cval->min, cval->max);
-		if ((err = add_control_to_empty(state, kctl)) < 0)
+		if ((err = snd_usb_mixer_add_control(state->mixer, kctl)) < 0)
 			return err;
 	}
 	return 0;
@@ -1858,7 +1852,7 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, void
 
 	snd_printdd(KERN_INFO "[%d] SU [%s] items = %d\n",
 		    cval->id, kctl->id.name, desc->bNrInPins);
-	if ((err = add_control_to_empty(state, kctl)) < 0)
+	if ((err = snd_usb_mixer_add_control(state->mixer, kctl)) < 0)
 		return err;
 
 	return 0;
diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h
index b4a2c81..ae1a14d 100644
--- a/sound/usb/mixer.h
+++ b/sound/usb/mixer.h
@@ -24,7 +24,16 @@ struct usb_mixer_interface {
 	u8 xonar_u1_status;
 };
 
-#define MAX_CHANNELS	10	/* max logical channels */
+#define MAX_CHANNELS	16	/* max logical channels */
+
+enum {
+	USB_MIXER_BOOLEAN,
+	USB_MIXER_INV_BOOLEAN,
+	USB_MIXER_S8,
+	USB_MIXER_U8,
+	USB_MIXER_S16,
+	USB_MIXER_U16,
+};
 
 struct usb_mixer_elem_info {
 	struct usb_mixer_interface *mixer;
@@ -55,4 +64,7 @@ int snd_usb_mixer_set_ctl_value(struct usb_mixer_elem_info *cval,
 void snd_usb_mixer_inactivate(struct usb_mixer_interface *mixer);
 int snd_usb_mixer_activate(struct usb_mixer_interface *mixer);
 
+int snd_usb_mixer_add_control(struct usb_mixer_interface *mixer,
+			      struct snd_kcontrol *kctl);
+
 #endif /* __USBMIXER_H */
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 73dcc82..f057752 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -40,6 +40,8 @@
 #include "mixer_quirks.h"
 #include "helper.h"
 
+extern struct snd_kcontrol_new *snd_usb_feature_unit_ctl;
+
 /*
  * Sound Blaster remote control configuration
  *
@@ -481,6 +483,77 @@ static int snd_nativeinstruments_create_mixer(struct usb_mixer_interface *mixer,
 	return err;
 }
 
+/* M-Audio FastTrack Ultra quirks */
+
+/* private_free callback */
+static void usb_mixer_elem_free(struct snd_kcontrol *kctl)
+{
+	kfree(kctl->private_data);
+	kctl->private_data = NULL;
+}
+
+static int snd_maudio_ftu_create_ctl(struct usb_mixer_interface *mixer,
+				     int chn, int out, const char *name)
+{
+	struct usb_mixer_elem_info *cval;
+	struct snd_kcontrol *kctl;
+
+	cval = kzalloc(sizeof(*cval), GFP_KERNEL);
+	if (!cval)
+		return -ENOMEM;
+
+	cval->id = 5;
+	cval->mixer = mixer;
+	cval->val_type = USB_MIXER_S16;
+	cval->channels = 1;
+	cval->control = chn + 1;
+	cval->cmask = 1 << chn;
+
+	kctl = snd_ctl_new1(snd_usb_feature_unit_ctl, cval);
+	if (!kctl) {
+		kfree(cval);
+		return -ENOMEM;
+	}
+
+	snprintf(kctl->id.name, sizeof(kctl->id.name), name);
+	kctl->private_free = usb_mixer_elem_free;
+	return snd_usb_mixer_add_control(mixer, kctl);
+}
+
+static int snd_maudio_ftu_create_mixer(struct usb_mixer_interface *mixer)
+{
+	char name[64];
+	int n, chn, err;
+
+	/* create standard mixers first */
+	err = snd_usb_create_mixer(mixer->chip, 0, 0);
+	if (err < 0) {
+		snd_printk(KERN_ERR "%s(): Unable to create standard mixer elements (err = %d)",
+			   __func__, err);
+		return err;
+	}
+
+	for (n = 0; n < 8; n++) {
+		for (chn = 0; chn < 8; chn++) {
+			snprintf(name, sizeof(name),
+				 "AIn%d - Out%d Capture Volume", chn  + 1, n + 1);
+			err = snd_maudio_ftu_create_ctl(mixer, n, chn, name);
+			if (err < 0)
+				return err;
+		}
+
+		for (chn = 0; chn < 8; chn++) {
+			snprintf(name, sizeof(name),
+				 "DIn%d - Out%d Playback Volume", chn  + 1, n + 1);
+			err = snd_maudio_ftu_create_ctl(mixer, n, chn, name);
+			if (err < 0)
+				return err;
+		}
+	}
+
+	return 0;
+}
+
 void snd_emuusb_set_samplerate(struct snd_usb_audio *chip,
 			       unsigned char samplerate_id)
 {
@@ -521,6 +594,11 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
 					      snd_audigy2nx_proc_read);
 		break;
 
+	case USB_ID(0x0763, 0x2080): /* M-Audio Fast Track Ultra */
+	case USB_ID(0x0763, 0x2081): /* M-Audio Fast Track Ultra 8R */
+		err = snd_maudio_ftu_create_mixer(mixer);
+		break;
+
 	case USB_ID(0x0b05, 0x1739):
 	case USB_ID(0x0b05, 0x1743):
 		err = snd_xonar_u1_controls_create(mixer);
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index bd13d72..2546dc8 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -19,6 +19,7 @@
 #include <linux/usb.h>
 #include <linux/usb/audio.h>
 
+#include <sound/control.h>
 #include <sound/core.h>
 #include <sound/info.h>
 #include <sound/pcm.h>

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-19 11:05                 ` Daniel Mack
@ 2011-05-19 12:23                   ` Felix Homann
  2011-05-19 13:36                   ` Felix Homann
  2011-05-19 13:42                   ` Felix Homann
  2 siblings, 0 replies; 34+ messages in thread
From: Felix Homann @ 2011-05-19 12:23 UTC (permalink / raw)
  To: Daniel Mack; +Cc: Takashi Iwai, alsa-devel, Grant Diffey

Hi Daniel,


Am 19.05.2011 13:05, schrieb Daniel Mack:
> On Thu, May 19, 2011 at 10:52 AM, Daniel Mack<zonque@gmail.com>  wrote:
>> I'll have a look later. I was just under the impression you wanted to
>> try yourself :)
> Attached is a patch which should show how this could work. It won't be
> fully functional though, as there seems to be some sort of confusion
> in your patch.

Thanks! I don't have the device here with me right now. I can try the 
patch in an hour or two !


> You're calling build_named_mixer_unit_ctl() with your
> loop variable "in_ch", but you ignore that value in the called
> function. That can't be intentional, can it?

No, this isn't intentional. I wrote this in September, so I don't 
remember completely. But a glimpse at the code reveals that this is 
inherited from build_mixer_unit_ctl() which doesn't use the in_pin 
parameter either.

Back then I wanted both functions to be as closely related as possible, 
with the perspective to put them on a common base or let 
build_mixer_unit_ctl() actually call build_named_mixer_unit_ctl(). Most 
probably I later confused the in_pin parameter's (non-)meaning.

> Anyway, very little tweaking should be needed now to make this work,
> and if you send me back the modified patch, I'll split the work and
> post a patch set here.

I'll send all the needed corrections.

Regards,

Felix

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-19 11:05                 ` Daniel Mack
  2011-05-19 12:23                   ` Felix Homann
@ 2011-05-19 13:36                   ` Felix Homann
  2011-05-19 13:42                   ` Felix Homann
  2 siblings, 0 replies; 34+ messages in thread
From: Felix Homann @ 2011-05-19 13:36 UTC (permalink / raw)
  To: Daniel Mack; +Cc: Takashi Iwai, alsa-devel, Grant Diffey

Hi Daniel,

if I haven't missed anything, snd_maudio_ftu_create_ctl() will not be 
called since snd_usb_create_mixer() will not be called on this device.

Regards,

Felix

Am 19.05.2011 13:05, schrieb Daniel Mack:
> Attached is a patch which should show how this could work.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-19 11:05                 ` Daniel Mack
  2011-05-19 12:23                   ` Felix Homann
  2011-05-19 13:36                   ` Felix Homann
@ 2011-05-19 13:42                   ` Felix Homann
  2011-05-19 14:12                     ` Daniel Mack
  2 siblings, 1 reply; 34+ messages in thread
From: Felix Homann @ 2011-05-19 13:42 UTC (permalink / raw)
  To: Daniel Mack; +Cc: Takashi Iwai, alsa-devel, Grant Diffey

One more note:

You call snd_usb_create_mixer(mixer->chip, 0, 0) from 
snd_maudio_ftu_create_mixer() to create standard mixers first. There are 
no standard mixers on this device.

Regards,

Felix

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-19 13:42                   ` Felix Homann
@ 2011-05-19 14:12                     ` Daniel Mack
  2011-05-20 10:12                       ` Felix Homann
  0 siblings, 1 reply; 34+ messages in thread
From: Daniel Mack @ 2011-05-19 14:12 UTC (permalink / raw)
  To: Felix Homann; +Cc: Takashi Iwai, alsa-devel, Grant Diffey

[-- Attachment #1: Type: text/plain, Size: 303 bytes --]

On Thu, May 19, 2011 at 3:42 PM, Felix Homann <linuxaudio@showlabor.de> wrote:
> One more note:
>
> You call snd_usb_create_mixer(mixer->chip, 0, 0) from
> snd_maudio_ftu_create_mixer() to create standard mixers first. There are no
> standard mixers on this device.

Ah, fail. Ok, try this one.

Daniel

[-- Attachment #2: ftu-mixer.diff --]
[-- Type: application/octet-stream, Size: 9668 bytes --]

diff --git a/sound/usb/card.c b/sound/usb/card.c
index a90662a..e7d1e0d 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -48,6 +48,7 @@
 #include <linux/usb/audio.h>
 #include <linux/usb/audio-v2.h>
 
+#include <sound/control.h>
 #include <sound/core.h>
 #include <sound/info.h>
 #include <sound/pcm.h>
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index eab06ed..3184d77 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -86,16 +86,6 @@ struct mixer_build {
 	const struct usbmix_selector_map *selector_map;
 };
 
-enum {
-	USB_MIXER_BOOLEAN,
-	USB_MIXER_INV_BOOLEAN,
-	USB_MIXER_S8,
-	USB_MIXER_U8,
-	USB_MIXER_S16,
-	USB_MIXER_U16,
-};
-
-
 /*E-mu 0202/0404/0204 eXtension Unit(XU) control*/
 enum {
 	USB_XU_CLOCK_RATE 		= 0xe301,
@@ -535,20 +525,21 @@ static int check_matrix_bitmap(unsigned char *bmap, int ich, int och, int num_ou
  * if failed, give up and free the control instance.
  */
 
-static int add_control_to_empty(struct mixer_build *state, struct snd_kcontrol *kctl)
+int snd_usb_mixer_add_control(struct usb_mixer_interface *mixer,
+			      struct snd_kcontrol *kctl)
 {
 	struct usb_mixer_elem_info *cval = kctl->private_data;
 	int err;
 
-	while (snd_ctl_find_id(state->chip->card, &kctl->id))
+	while (snd_ctl_find_id(mixer->chip->card, &kctl->id))
 		kctl->id.index++;
-	if ((err = snd_ctl_add(state->chip->card, kctl)) < 0) {
+	if ((err = snd_ctl_add(mixer->chip->card, kctl)) < 0) {
 		snd_printd(KERN_ERR "cannot add control (err = %d)\n", err);
 		return err;
 	}
 	cval->elem_id = &kctl->id;
-	cval->next_id_elem = state->mixer->id_elems[cval->id];
-	state->mixer->id_elems[cval->id] = cval;
+	cval->next_id_elem = mixer->id_elems[cval->id];
+	mixer->id_elems[cval->id] = cval;
 	return 0;
 }
 
@@ -967,7 +958,7 @@ static int mixer_ctl_feature_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
 	return changed;
 }
 
-static struct snd_kcontrol_new usb_feature_unit_ctl = {
+struct snd_kcontrol_new usb_feature_unit_ctl = {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "", /* will be filled later manually */
 	.info = mixer_ctl_feature_info,
@@ -984,6 +975,9 @@ static struct snd_kcontrol_new usb_feature_unit_ctl_ro = {
 	.put = NULL,
 };
 
+/* This symbol is exported in order to allow the mixer quirks to
+ * hook up to the standard feature unit control mechanism */
+struct snd_kcontrol_new *snd_usb_feature_unit_ctl = &usb_feature_unit_ctl;
 
 /*
  * build a feature control
@@ -1176,7 +1170,7 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
 
 	snd_printdd(KERN_INFO "[%d] FU [%s] ch = %d, val = %d/%d/%d\n",
 		    cval->id, kctl->id.name, cval->channels, cval->min, cval->max, cval->res);
-	add_control_to_empty(state, kctl);
+	snd_usb_mixer_add_control(state->mixer, kctl);
 }
 
 
@@ -1340,7 +1334,7 @@ static void build_mixer_unit_ctl(struct mixer_build *state,
 
 	snd_printdd(KERN_INFO "[%d] MU [%s] ch = %d, val = %d/%d\n",
 		    cval->id, kctl->id.name, cval->channels, cval->min, cval->max);
-	add_control_to_empty(state, kctl);
+	snd_usb_mixer_add_control(state->mixer, kctl);
 }
 
 
@@ -1641,7 +1635,7 @@ static int build_audio_procunit(struct mixer_build *state, int unitid, void *raw
 
 		snd_printdd(KERN_INFO "[%d] PU [%s] ch = %d, val = %d/%d\n",
 			    cval->id, kctl->id.name, cval->channels, cval->min, cval->max);
-		if ((err = add_control_to_empty(state, kctl)) < 0)
+		if ((err = snd_usb_mixer_add_control(state->mixer, kctl)) < 0)
 			return err;
 	}
 	return 0;
@@ -1858,7 +1852,7 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, void
 
 	snd_printdd(KERN_INFO "[%d] SU [%s] items = %d\n",
 		    cval->id, kctl->id.name, desc->bNrInPins);
-	if ((err = add_control_to_empty(state, kctl)) < 0)
+	if ((err = snd_usb_mixer_add_control(state->mixer, kctl)) < 0)
 		return err;
 
 	return 0;
diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h
index b4a2c81..ae1a14d 100644
--- a/sound/usb/mixer.h
+++ b/sound/usb/mixer.h
@@ -24,7 +24,16 @@ struct usb_mixer_interface {
 	u8 xonar_u1_status;
 };
 
-#define MAX_CHANNELS	10	/* max logical channels */
+#define MAX_CHANNELS	16	/* max logical channels */
+
+enum {
+	USB_MIXER_BOOLEAN,
+	USB_MIXER_INV_BOOLEAN,
+	USB_MIXER_S8,
+	USB_MIXER_U8,
+	USB_MIXER_S16,
+	USB_MIXER_U16,
+};
 
 struct usb_mixer_elem_info {
 	struct usb_mixer_interface *mixer;
@@ -55,4 +64,7 @@ int snd_usb_mixer_set_ctl_value(struct usb_mixer_elem_info *cval,
 void snd_usb_mixer_inactivate(struct usb_mixer_interface *mixer);
 int snd_usb_mixer_activate(struct usb_mixer_interface *mixer);
 
+int snd_usb_mixer_add_control(struct usb_mixer_interface *mixer,
+			      struct snd_kcontrol *kctl);
+
 #endif /* __USBMIXER_H */
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 9146cff..24141af 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -40,6 +40,8 @@
 #include "mixer_quirks.h"
 #include "helper.h"
 
+extern struct snd_kcontrol_new *snd_usb_feature_unit_ctl;
+
 /*
  * Sound Blaster remote control configuration
  *
@@ -492,6 +494,69 @@ static int snd_nativeinstruments_create_mixer(struct usb_mixer_interface *mixer,
 	return err;
 }
 
+/* M-Audio FastTrack Ultra quirks */
+
+/* private_free callback */
+static void usb_mixer_elem_free(struct snd_kcontrol *kctl)
+{
+	kfree(kctl->private_data);
+	kctl->private_data = NULL;
+}
+
+static int snd_maudio_ftu_create_ctl(struct usb_mixer_interface *mixer,
+				     int chn, int out, const char *name)
+{
+	struct usb_mixer_elem_info *cval;
+	struct snd_kcontrol *kctl;
+
+	cval = kzalloc(sizeof(*cval), GFP_KERNEL);
+	if (!cval)
+		return -ENOMEM;
+
+	cval->id = 5;
+	cval->mixer = mixer;
+	cval->val_type = USB_MIXER_S16;
+	cval->channels = 1;
+	cval->control = chn + 1;
+	cval->cmask = 1 << chn;
+
+	kctl = snd_ctl_new1(snd_usb_feature_unit_ctl, cval);
+	if (!kctl) {
+		kfree(cval);
+		return -ENOMEM;
+	}
+
+	snprintf(kctl->id.name, sizeof(kctl->id.name), name);
+	kctl->private_free = usb_mixer_elem_free;
+	return snd_usb_mixer_add_control(mixer, kctl);
+}
+
+static int snd_maudio_ftu_create_mixer(struct usb_mixer_interface *mixer)
+{
+	char name[64];
+	int n, chn, err;
+
+	for (n = 0; n < 8; n++) {
+		for (chn = 0; chn < 8; chn++) {
+			snprintf(name, sizeof(name),
+				 "AIn%d - Out%d Capture Volume", chn  + 1, n + 1);
+			err = snd_maudio_ftu_create_ctl(mixer, n, chn, name);
+			if (err < 0)
+				return err;
+		}
+
+		for (chn = 0; chn < 8; chn++) {
+			snprintf(name, sizeof(name),
+				 "DIn%d - Out%d Playback Volume", chn  + 1, n + 1);
+			err = snd_maudio_ftu_create_ctl(mixer, n, chn, name);
+			if (err < 0)
+				return err;
+		}
+	}
+
+	return 0;
+}
+
 void snd_emuusb_set_samplerate(struct snd_usb_audio *chip,
 			       unsigned char samplerate_id)
 {
@@ -533,6 +598,11 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
 					      snd_audigy2nx_proc_read);
 		break;
 
+	case USB_ID(0x0763, 0x2080): /* M-Audio Fast Track Ultra */
+	case USB_ID(0x0763, 0x2081): /* M-Audio Fast Track Ultra 8R */
+		err = snd_maudio_ftu_create_mixer(mixer);
+		break;
+
 	case USB_ID(0x0b05, 0x1739):
 	case USB_ID(0x0b05, 0x1743):
 		err = snd_xonar_u1_controls_create(mixer);
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 78792a8..0b2ae8e 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -1988,7 +1988,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
 		.data = & (const struct snd_usb_audio_quirk[]) {
 			{
 				.ifnum = 0,
-				.type = QUIRK_IGNORE_INTERFACE
+				.type = QUIRK_AUDIO_STANDARD_MIXER,
 			},
 			{
 				.ifnum = 1,
@@ -2055,7 +2055,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
 		.data = & (const struct snd_usb_audio_quirk[]) {
 			{
 				.ifnum = 0,
-				.type = QUIRK_IGNORE_INTERFACE
+				.type = QUIRK_AUDIO_STANDARD_MIXER,
 			},
 			{
 				.ifnum = 1,
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index bd13d72..a31a5c4 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -19,6 +19,7 @@
 #include <linux/usb.h>
 #include <linux/usb/audio.h>
 
+#include <sound/control.h>
 #include <sound/core.h>
 #include <sound/info.h>
 #include <sound/pcm.h>
@@ -58,6 +59,7 @@ static int create_composite_quirk(struct snd_usb_audio *chip,
 		if (quirk->ifnum != probed_ifnum)
 			usb_driver_claim_interface(driver, iface, (void *)-1L);
 	}
+
 	return 0;
 }
 
@@ -263,6 +265,20 @@ static int create_uaxx_quirk(struct snd_usb_audio *chip,
 }
 
 /*
+ * Create a standard mixer for the specified interface.
+ */
+static int create_standard_mixer_quirk(struct snd_usb_audio *chip,
+				       struct usb_interface *iface,
+				       struct usb_driver *driver,
+				       const struct snd_usb_audio_quirk *quirk)
+{
+	if (quirk->ifnum < 0)
+		return 0;
+
+	return snd_usb_create_mixer(chip, quirk->ifnum, 0);
+}
+
+/*
  * audio-interface quirks
  *
  * returns zero if no standard audio/MIDI parsing is needed.
@@ -294,7 +310,8 @@ 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_UAXX] = create_uaxx_quirk,
-		[QUIRK_AUDIO_ALIGN_TRANSFER] = create_align_transfer_quirk
+		[QUIRK_AUDIO_ALIGN_TRANSFER] = create_align_transfer_quirk,
+		[QUIRK_AUDIO_STANDARD_MIXER] = create_standard_mixer_quirk,
 	};
 
 	if (quirk->type < QUIRK_TYPE_COUNT) {
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index 32f2a97..1e79986 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -84,6 +84,7 @@ enum quirk_type {
 	QUIRK_AUDIO_FIXED_ENDPOINT,
 	QUIRK_AUDIO_EDIROL_UAXX,
 	QUIRK_AUDIO_ALIGN_TRANSFER,
+	QUIRK_AUDIO_STANDARD_MIXER,
 
 	QUIRK_TYPE_COUNT
 };

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-19 14:12                     ` Daniel Mack
@ 2011-05-20 10:12                       ` Felix Homann
  2011-05-20 11:12                         ` Daniel Mack
  2011-05-20 11:14                         ` Felix Homann
  0 siblings, 2 replies; 34+ messages in thread
From: Felix Homann @ 2011-05-20 10:12 UTC (permalink / raw)
  To: Daniel Mack; +Cc: Takashi Iwai, alsa-devel, Grant Diffey


Am 19.05.2011 16:12, schrieb Daniel Mack:
>
> Ah, fail. Ok, try this one.
>
> Daniel
>


Hmm, this one crashes:

  4104.824184] Modules linked in: snd_usb_audio(+) snd_usbmidi_lib 
snd_hrtimer binfmt_misc parport_pc ppdev dm_crypt vesafb 
snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_intel snd_hda_codec 
snd_seq_midi snd_hwdep snd_rawmidi snd_pcm snd_seq_midi_event snd_seq 
snd_timer snd_seq_device fglrx(P) dcdbas snd psmouse soundcore serio_raw 
snd_page_alloc lp parport usbhid hid usb_storage firewire_ohci uas 
firewire_core crc_itu_t e1000e
[ 4104.824220]
[ 4104.824223] Pid: 3406, comm: modprobe Tainted: P            
2.6.38-8-generic #42-Ubuntu Dell Inc.                 Dell 
DM061                   /0WG864
[ 4104.824231] RIP: 0010:[<ffffffffa04b0119>]  [<ffffffffa04b0119>] 
snd_usb_mixer_controls+0x49/0x1a0 [snd_usb_audio]
[ 4104.824241] RSP: 0018:ffff88005eb3fb38  EFLAGS: 00010246
[ 4104.824243] RAX: 00000000041e3000 RBX: 0000000000000000 RCX: 
0000000000000000
[ 4104.824246] RDX: ffff88008fcdbc28 RSI: 0000000000000000 RDI: 
ffff88005eb3fba0
[ 4104.824249] RBP: ffff88005eb3fbc8 R08: 0000000000000005 R09: 
ffff88008315b028
[ 4104.824251] R10: ffff88009b39acc8 R11: 0000000000016e50 R12: 
ffff88005eb3fb38
[ 4104.824254] R13: ffff8800922449e8 R14: 0000000000000000 R15: 
0000000000000000
[ 4104.824258] FS:  00007f5c64217720(0000) GS:ffff8800bfc00000(0000) 
knlGS:0000000000000000
[ 4104.824261] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 4104.824263] CR2: 0000000000000020 CR3: 00000000652b5000 CR4: 
00000000000006f0
[ 4104.824266] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 
0000000000000000
[ 4104.824269] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 
0000000000000400
[ 4104.824272] Process modprobe (pid: 3406, threadinfo ffff88005eb3e000, 
task ffff88005d1116e0)
[ 4104.824274] Stack:
[ 4104.824276]  ffff88008fcdbc28 ffff8800922449e8 0000000000000000 
0000000000000000
[ 4104.824281]  0000000000000000 0000000000000000 0000000000000000 
0000000000000000
[ 4104.824286]  0000000000000000 0000000000000000 0000000000000000 
0000000000000000
[ 4104.824291] Call Trace:
[ 4104.824303]  [<ffffffffa03dd1b7>] ? snd_hidden_kzalloc+0x37/0x50 [snd]
[ 4104.824312]  [<ffffffffa04b065a>] snd_usb_create_mixer+0xba/0x2a0 
[snd_usb_audio]
[ 4104.824318]  [<ffffffffa03dd1b7>] ? snd_hidden_kzalloc+0x37/0x50 [snd]
[ 4104.824327]  [<ffffffffa04b1dce>] 
create_standard_mixer_quirk+0x1e/0x20 [snd_usb_audio]
[ 4104.824335]  [<ffffffffa04b228d>] snd_usb_create_quirk+0x1d/0x50 
[snd_usb_audio]
[ 4104.824344]  [<ffffffffa04b233e>] create_composite_quirk+0x7e/0xd0 
[snd_usb_audio]
[ 4104.824353]  [<ffffffffa04b228d>] snd_usb_create_quirk+0x1d/0x50 
[snd_usb_audio]
[ 4104.824360]  [<ffffffffa04ac686>] usb_audio_probe+0x146/0x8d0 
[snd_usb_audio]
[ 4104.824368]  [<ffffffff8143e439>] usb_probe_interface+0x109/0x200
[ 4104.824373]  [<ffffffff813ba858>] really_probe+0x68/0x190
[ 4104.824377]  [<ffffffff813bab65>] driver_probe_device+0x45/0x70
[ 4104.824381]  [<ffffffff813bac3b>] __driver_attach+0xab/0xb0
[ 4104.824385]  [<ffffffff813bab90>] ? __driver_attach+0x0/0xb0
[ 4104.824389]  [<ffffffff813b99de>] bus_for_each_dev+0x5e/0x90
[ 4104.824393]  [<ffffffff813ba6ae>] driver_attach+0x1e/0x20
[ 4104.824396]  [<ffffffff813ba215>] bus_add_driver+0xc5/0x280
[ 4104.824400]  [<ffffffff813baed6>] driver_register+0x76/0x140
[ 4104.824405]  [<ffffffff815c6e2d>] ? notifier_call_chain+0x4d/0x70
[ 4104.824409]  [<ffffffff8143d008>] usb_register_driver+0xb8/0x170
[ 4104.824417]  [<ffffffffa04cc000>] ? snd_usb_audio_init+0x0/0x1000 
[snd_usb_audio]
[ 4104.824424]  [<ffffffffa04cc040>] snd_usb_audio_init+0x40/0x1000 
[snd_usb_audio]
[ 4104.824429]  [<ffffffff81002175>] do_one_initcall+0x45/0x190
[ 4104.824435]  [<ffffffff810a4feb>] sys_init_module+0xfb/0x250
[ 4104.824439]  [<ffffffff8100c002>] system_call_fastpath+0x16/0x1b
[ 4104.824442] Code: 4c 8d a5 70 ff ff ff 49 89 fd 4c 89 e7 48 8b 9a a0 
00 00 00 f3 48 ab 48 89 95 70 ff ff ff 4c 89 ad 78 ff ff ff 8b 05 07 0c 
01 00 <48> 8b 7b 20 8b 73 28 85 c0 48 89 7d 80 89 75 88 74 27 8b 4a 20
[ 4104.824482] RIP  [<ffffffffa04b0119>] 
snd_usb_mixer_controls+0x49/0x1a0 [snd_usb_audio]
[ 4104.824491]  RSP <ffff88005eb3fb38>
[ 4104.824493] CR2: 0000000000000020
[ 4104.824497] ---[ end trace b721d79c7e9b68a1 ]---

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-20 10:12                       ` Felix Homann
@ 2011-05-20 11:12                         ` Daniel Mack
  2011-05-20 11:14                         ` Felix Homann
  1 sibling, 0 replies; 34+ messages in thread
From: Daniel Mack @ 2011-05-20 11:12 UTC (permalink / raw)
  To: Felix Homann; +Cc: Takashi Iwai, alsa-devel, Grant Diffey

On Fri, May 20, 2011 at 12:12 PM, Felix Homann <linuxaudio@showlabor.de> wrote:
> Hmm, this one crashes:
>
>  4104.824184] Modules linked in: snd_usb_audio(+) snd_usbmidi_lib

Could you send the first lines of the crash log, too?

Daniel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-20 10:12                       ` Felix Homann
  2011-05-20 11:12                         ` Daniel Mack
@ 2011-05-20 11:14                         ` Felix Homann
  2011-05-20 11:37                           ` Daniel Mack
  1 sibling, 1 reply; 34+ messages in thread
From: Felix Homann @ 2011-05-20 11:14 UTC (permalink / raw)
  To: Daniel Mack; +Cc: Takashi Iwai, alsa-devel, Grant Diffey

Sorry, here are the first lines:

[ 4104.510080] usb 1-3: new high speed USB device using ehci_hcd and 
address 2
[ 4104.661745] usb 1-3: config 1 interface 3 altsetting 0 bulk endpoint 
0x7 has invalid maxpacket 8
[ 4104.661750] usb 1-3: config 1 interface 3 altsetting 0 bulk endpoint 
0x87 has invalid maxpacket 8
[ 4104.824137] BUG: unable to handle kernel NULL pointer dereference at 
0000000000000020
[ 4104.824147] IP: [<ffffffffa04b0119>] 
snd_usb_mixer_controls+0x49/0x1a0 [snd_usb_audio]
[ 4104.824170] PGD 652ba067 PUD 652d7067 PMD 0
[ 4104.824176] Oops: 0000 [#1] SMP
[ 4104.824179] last sysfs file: /sys/module/snd_pcm/initstate
[ 4104.824183] CPU 0


Am 20.05.2011 12:12, schrieb Felix Homann:
> Am 19.05.2011 16:12, schrieb Daniel Mack:
>> Ah, fail. Ok, try this one.
>>
>> Daniel
>>
>
> Hmm, this one crashes:
>
>    4104.824184] Modules linked in: snd_usb_audio(+) snd_usbmidi_lib
> snd_hrtimer binfmt_misc parport_pc ppdev dm_crypt vesafb
> snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_intel snd_hda_codec
> snd_seq_midi snd_hwdep snd_rawmidi snd_pcm snd_seq_midi_event snd_seq
> snd_timer snd_seq_device fglrx(P) dcdbas snd psmouse soundcore serio_raw
> snd_page_alloc lp parport usbhid hid usb_storage firewire_ohci uas
> firewire_core crc_itu_t e1000e
> [ 4104.824220]
> [ 4104.824223] Pid: 3406, comm: modprobe Tainted: P
> 2.6.38-8-generic #42-Ubuntu Dell Inc.                 Dell
> DM061                   /0WG864
> [ 4104.824231] RIP: 0010:[<ffffffffa04b0119>]  [<ffffffffa04b0119>]
> snd_usb_mixer_controls+0x49/0x1a0 [snd_usb_audio]
> [ 4104.824241] RSP: 0018:ffff88005eb3fb38  EFLAGS: 00010246
> [ 4104.824243] RAX: 00000000041e3000 RBX: 0000000000000000 RCX:
> 0000000000000000
> [ 4104.824246] RDX: ffff88008fcdbc28 RSI: 0000000000000000 RDI:
> ffff88005eb3fba0
> [ 4104.824249] RBP: ffff88005eb3fbc8 R08: 0000000000000005 R09:
> ffff88008315b028
> [ 4104.824251] R10: ffff88009b39acc8 R11: 0000000000016e50 R12:
> ffff88005eb3fb38
> [ 4104.824254] R13: ffff8800922449e8 R14: 0000000000000000 R15:
> 0000000000000000
> [ 4104.824258] FS:  00007f5c64217720(0000) GS:ffff8800bfc00000(0000)
> knlGS:0000000000000000
> [ 4104.824261] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> [ 4104.824263] CR2: 0000000000000020 CR3: 00000000652b5000 CR4:
> 00000000000006f0
> [ 4104.824266] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
> 0000000000000000
> [ 4104.824269] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
> 0000000000000400
> [ 4104.824272] Process modprobe (pid: 3406, threadinfo ffff88005eb3e000,
> task ffff88005d1116e0)
> [ 4104.824274] Stack:
> [ 4104.824276]  ffff88008fcdbc28 ffff8800922449e8 0000000000000000
> 0000000000000000
> [ 4104.824281]  0000000000000000 0000000000000000 0000000000000000
> 0000000000000000
> [ 4104.824286]  0000000000000000 0000000000000000 0000000000000000
> 0000000000000000
> [ 4104.824291] Call Trace:
> [ 4104.824303]  [<ffffffffa03dd1b7>] ? snd_hidden_kzalloc+0x37/0x50 [snd]
> [ 4104.824312]  [<ffffffffa04b065a>] snd_usb_create_mixer+0xba/0x2a0
> [snd_usb_audio]
> [ 4104.824318]  [<ffffffffa03dd1b7>] ? snd_hidden_kzalloc+0x37/0x50 [snd]
> [ 4104.824327]  [<ffffffffa04b1dce>]
> create_standard_mixer_quirk+0x1e/0x20 [snd_usb_audio]
> [ 4104.824335]  [<ffffffffa04b228d>] snd_usb_create_quirk+0x1d/0x50
> [snd_usb_audio]
> [ 4104.824344]  [<ffffffffa04b233e>] create_composite_quirk+0x7e/0xd0
> [snd_usb_audio]
> [ 4104.824353]  [<ffffffffa04b228d>] snd_usb_create_quirk+0x1d/0x50
> [snd_usb_audio]
> [ 4104.824360]  [<ffffffffa04ac686>] usb_audio_probe+0x146/0x8d0
> [snd_usb_audio]
> [ 4104.824368]  [<ffffffff8143e439>] usb_probe_interface+0x109/0x200
> [ 4104.824373]  [<ffffffff813ba858>] really_probe+0x68/0x190
> [ 4104.824377]  [<ffffffff813bab65>] driver_probe_device+0x45/0x70
> [ 4104.824381]  [<ffffffff813bac3b>] __driver_attach+0xab/0xb0
> [ 4104.824385]  [<ffffffff813bab90>] ? __driver_attach+0x0/0xb0
> [ 4104.824389]  [<ffffffff813b99de>] bus_for_each_dev+0x5e/0x90
> [ 4104.824393]  [<ffffffff813ba6ae>] driver_attach+0x1e/0x20
> [ 4104.824396]  [<ffffffff813ba215>] bus_add_driver+0xc5/0x280
> [ 4104.824400]  [<ffffffff813baed6>] driver_register+0x76/0x140
> [ 4104.824405]  [<ffffffff815c6e2d>] ? notifier_call_chain+0x4d/0x70
> [ 4104.824409]  [<ffffffff8143d008>] usb_register_driver+0xb8/0x170
> [ 4104.824417]  [<ffffffffa04cc000>] ? snd_usb_audio_init+0x0/0x1000
> [snd_usb_audio]
> [ 4104.824424]  [<ffffffffa04cc040>] snd_usb_audio_init+0x40/0x1000
> [snd_usb_audio]
> [ 4104.824429]  [<ffffffff81002175>] do_one_initcall+0x45/0x190
> [ 4104.824435]  [<ffffffff810a4feb>] sys_init_module+0xfb/0x250
> [ 4104.824439]  [<ffffffff8100c002>] system_call_fastpath+0x16/0x1b
> [ 4104.824442] Code: 4c 8d a5 70 ff ff ff 49 89 fd 4c 89 e7 48 8b 9a a0
> 00 00 00 f3 48 ab 48 89 95 70 ff ff ff 4c 89 ad 78 ff ff ff 8b 05 07 0c
> 01 00<48>  8b 7b 20 8b 73 28 85 c0 48 89 7d 80 89 75 88 74 27 8b 4a 20
> [ 4104.824482] RIP  [<ffffffffa04b0119>]
> snd_usb_mixer_controls+0x49/0x1a0 [snd_usb_audio]
> [ 4104.824491]  RSP<ffff88005eb3fb38>
> [ 4104.824493] CR2: 0000000000000020
> [ 4104.824497] ---[ end trace b721d79c7e9b68a1 ]---
>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-20 11:14                         ` Felix Homann
@ 2011-05-20 11:37                           ` Daniel Mack
  2011-05-20 15:08                             ` Grant Diffey
  0 siblings, 1 reply; 34+ messages in thread
From: Daniel Mack @ 2011-05-20 11:37 UTC (permalink / raw)
  To: Felix Homann; +Cc: Takashi Iwai, alsa-devel, Grant Diffey

[-- Attachment #1: Type: text/plain, Size: 663 bytes --]

On Fri, May 20, 2011 at 1:14 PM, Felix Homann <linuxaudio@showlabor.de> wrote:
> Sorry, here are the first lines:
>
> [ 4104.510080] usb 1-3: new high speed USB device using ehci_hcd and address
> 2
> [ 4104.661745] usb 1-3: config 1 interface 3 altsetting 0 bulk endpoint 0x7
> has invalid maxpacket 8
> [ 4104.661750] usb 1-3: config 1 interface 3 altsetting 0 bulk endpoint 0x87
> has invalid maxpacket 8
> [ 4104.824137] BUG: unable to handle kernel NULL pointer dereference at
> 0000000000000020
> [ 4104.824147] IP: [<ffffffffa04b0119>] snd_usb_mixer_controls+0x49/0x1a0
> [snd_usb_audio]

Ok, chip->ctrl_intf needs to be initialized. Next try ...


Daniel

[-- Attachment #2: ftu-mixer.diff --]
[-- Type: application/octet-stream, Size: 10970 bytes --]

diff --git a/sound/usb/card.c b/sound/usb/card.c
index a90662a..220c616 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -48,6 +48,7 @@
 #include <linux/usb/audio.h>
 #include <linux/usb/audio-v2.h>
 
+#include <sound/control.h>
 #include <sound/core.h>
 #include <sound/info.h>
 #include <sound/pcm.h>
@@ -492,14 +493,6 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
 		}
 	}
 
-	chip->txfr_quirk = 0;
-	err = 1; /* continue */
-	if (quirk && quirk->ifnum != QUIRK_NO_INTERFACE) {
-		/* need some special handlings */
-		if ((err = snd_usb_create_quirk(chip, intf, &usb_audio_driver, quirk)) < 0)
-			goto __error;
-	}
-
 	/*
 	 * For devices with more than one control interface, we assume the
 	 * first contains the audio controls. We might need a more specific
@@ -508,6 +501,14 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
 	if (!chip->ctrl_intf)
 		chip->ctrl_intf = alts;
 
+	chip->txfr_quirk = 0;
+	err = 1; /* continue */
+	if (quirk && quirk->ifnum != QUIRK_NO_INTERFACE) {
+		/* need some special handlings */
+		if ((err = snd_usb_create_quirk(chip, intf, &usb_audio_driver, quirk)) < 0)
+			goto __error;
+	}
+
 	if (err > 0) {
 		/* create normal USB audio interfaces */
 		if (snd_usb_create_streams(chip, ifnum) < 0 ||
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index eab06ed..7c07bc2 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -86,16 +86,6 @@ struct mixer_build {
 	const struct usbmix_selector_map *selector_map;
 };
 
-enum {
-	USB_MIXER_BOOLEAN,
-	USB_MIXER_INV_BOOLEAN,
-	USB_MIXER_S8,
-	USB_MIXER_U8,
-	USB_MIXER_S16,
-	USB_MIXER_U16,
-};
-
-
 /*E-mu 0202/0404/0204 eXtension Unit(XU) control*/
 enum {
 	USB_XU_CLOCK_RATE 		= 0xe301,
@@ -535,20 +525,21 @@ static int check_matrix_bitmap(unsigned char *bmap, int ich, int och, int num_ou
  * if failed, give up and free the control instance.
  */
 
-static int add_control_to_empty(struct mixer_build *state, struct snd_kcontrol *kctl)
+int snd_usb_mixer_add_control(struct usb_mixer_interface *mixer,
+			      struct snd_kcontrol *kctl)
 {
 	struct usb_mixer_elem_info *cval = kctl->private_data;
 	int err;
 
-	while (snd_ctl_find_id(state->chip->card, &kctl->id))
+	while (snd_ctl_find_id(mixer->chip->card, &kctl->id))
 		kctl->id.index++;
-	if ((err = snd_ctl_add(state->chip->card, kctl)) < 0) {
+	if ((err = snd_ctl_add(mixer->chip->card, kctl)) < 0) {
 		snd_printd(KERN_ERR "cannot add control (err = %d)\n", err);
 		return err;
 	}
 	cval->elem_id = &kctl->id;
-	cval->next_id_elem = state->mixer->id_elems[cval->id];
-	state->mixer->id_elems[cval->id] = cval;
+	cval->next_id_elem = mixer->id_elems[cval->id];
+	mixer->id_elems[cval->id] = cval;
 	return 0;
 }
 
@@ -967,7 +958,7 @@ static int mixer_ctl_feature_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
 	return changed;
 }
 
-static struct snd_kcontrol_new usb_feature_unit_ctl = {
+struct snd_kcontrol_new usb_feature_unit_ctl = {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "", /* will be filled later manually */
 	.info = mixer_ctl_feature_info,
@@ -984,6 +975,9 @@ static struct snd_kcontrol_new usb_feature_unit_ctl_ro = {
 	.put = NULL,
 };
 
+/* This symbol is exported in order to allow the mixer quirks to
+ * hook up to the standard feature unit control mechanism */
+struct snd_kcontrol_new *snd_usb_feature_unit_ctl = &usb_feature_unit_ctl;
 
 /*
  * build a feature control
@@ -1176,7 +1170,7 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
 
 	snd_printdd(KERN_INFO "[%d] FU [%s] ch = %d, val = %d/%d/%d\n",
 		    cval->id, kctl->id.name, cval->channels, cval->min, cval->max, cval->res);
-	add_control_to_empty(state, kctl);
+	snd_usb_mixer_add_control(state->mixer, kctl);
 }
 
 
@@ -1340,7 +1334,7 @@ static void build_mixer_unit_ctl(struct mixer_build *state,
 
 	snd_printdd(KERN_INFO "[%d] MU [%s] ch = %d, val = %d/%d\n",
 		    cval->id, kctl->id.name, cval->channels, cval->min, cval->max);
-	add_control_to_empty(state, kctl);
+	snd_usb_mixer_add_control(state->mixer, kctl);
 }
 
 
@@ -1641,7 +1635,7 @@ static int build_audio_procunit(struct mixer_build *state, int unitid, void *raw
 
 		snd_printdd(KERN_INFO "[%d] PU [%s] ch = %d, val = %d/%d\n",
 			    cval->id, kctl->id.name, cval->channels, cval->min, cval->max);
-		if ((err = add_control_to_empty(state, kctl)) < 0)
+		if ((err = snd_usb_mixer_add_control(state->mixer, kctl)) < 0)
 			return err;
 	}
 	return 0;
@@ -1858,7 +1852,7 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, void
 
 	snd_printdd(KERN_INFO "[%d] SU [%s] items = %d\n",
 		    cval->id, kctl->id.name, desc->bNrInPins);
-	if ((err = add_control_to_empty(state, kctl)) < 0)
+	if ((err = snd_usb_mixer_add_control(state->mixer, kctl)) < 0)
 		return err;
 
 	return 0;
@@ -1935,7 +1929,7 @@ static int snd_usb_mixer_dev_free(struct snd_device *device)
  *
  * walk through all UAC_OUTPUT_TERMINAL descriptors to search for mixers
  */
-static int snd_usb_mixer_controls(struct usb_mixer_interface *mixer)
+int snd_usb_mixer_controls(struct usb_mixer_interface *mixer)
 {
 	struct mixer_build state;
 	int err;
diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h
index b4a2c81..ae1a14d 100644
--- a/sound/usb/mixer.h
+++ b/sound/usb/mixer.h
@@ -24,7 +24,16 @@ struct usb_mixer_interface {
 	u8 xonar_u1_status;
 };
 
-#define MAX_CHANNELS	10	/* max logical channels */
+#define MAX_CHANNELS	16	/* max logical channels */
+
+enum {
+	USB_MIXER_BOOLEAN,
+	USB_MIXER_INV_BOOLEAN,
+	USB_MIXER_S8,
+	USB_MIXER_U8,
+	USB_MIXER_S16,
+	USB_MIXER_U16,
+};
 
 struct usb_mixer_elem_info {
 	struct usb_mixer_interface *mixer;
@@ -55,4 +64,7 @@ int snd_usb_mixer_set_ctl_value(struct usb_mixer_elem_info *cval,
 void snd_usb_mixer_inactivate(struct usb_mixer_interface *mixer);
 int snd_usb_mixer_activate(struct usb_mixer_interface *mixer);
 
+int snd_usb_mixer_add_control(struct usb_mixer_interface *mixer,
+			      struct snd_kcontrol *kctl);
+
 #endif /* __USBMIXER_H */
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 9146cff..24141af 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -40,6 +40,8 @@
 #include "mixer_quirks.h"
 #include "helper.h"
 
+extern struct snd_kcontrol_new *snd_usb_feature_unit_ctl;
+
 /*
  * Sound Blaster remote control configuration
  *
@@ -492,6 +494,69 @@ static int snd_nativeinstruments_create_mixer(struct usb_mixer_interface *mixer,
 	return err;
 }
 
+/* M-Audio FastTrack Ultra quirks */
+
+/* private_free callback */
+static void usb_mixer_elem_free(struct snd_kcontrol *kctl)
+{
+	kfree(kctl->private_data);
+	kctl->private_data = NULL;
+}
+
+static int snd_maudio_ftu_create_ctl(struct usb_mixer_interface *mixer,
+				     int chn, int out, const char *name)
+{
+	struct usb_mixer_elem_info *cval;
+	struct snd_kcontrol *kctl;
+
+	cval = kzalloc(sizeof(*cval), GFP_KERNEL);
+	if (!cval)
+		return -ENOMEM;
+
+	cval->id = 5;
+	cval->mixer = mixer;
+	cval->val_type = USB_MIXER_S16;
+	cval->channels = 1;
+	cval->control = chn + 1;
+	cval->cmask = 1 << chn;
+
+	kctl = snd_ctl_new1(snd_usb_feature_unit_ctl, cval);
+	if (!kctl) {
+		kfree(cval);
+		return -ENOMEM;
+	}
+
+	snprintf(kctl->id.name, sizeof(kctl->id.name), name);
+	kctl->private_free = usb_mixer_elem_free;
+	return snd_usb_mixer_add_control(mixer, kctl);
+}
+
+static int snd_maudio_ftu_create_mixer(struct usb_mixer_interface *mixer)
+{
+	char name[64];
+	int n, chn, err;
+
+	for (n = 0; n < 8; n++) {
+		for (chn = 0; chn < 8; chn++) {
+			snprintf(name, sizeof(name),
+				 "AIn%d - Out%d Capture Volume", chn  + 1, n + 1);
+			err = snd_maudio_ftu_create_ctl(mixer, n, chn, name);
+			if (err < 0)
+				return err;
+		}
+
+		for (chn = 0; chn < 8; chn++) {
+			snprintf(name, sizeof(name),
+				 "DIn%d - Out%d Playback Volume", chn  + 1, n + 1);
+			err = snd_maudio_ftu_create_ctl(mixer, n, chn, name);
+			if (err < 0)
+				return err;
+		}
+	}
+
+	return 0;
+}
+
 void snd_emuusb_set_samplerate(struct snd_usb_audio *chip,
 			       unsigned char samplerate_id)
 {
@@ -533,6 +598,11 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
 					      snd_audigy2nx_proc_read);
 		break;
 
+	case USB_ID(0x0763, 0x2080): /* M-Audio Fast Track Ultra */
+	case USB_ID(0x0763, 0x2081): /* M-Audio Fast Track Ultra 8R */
+		err = snd_maudio_ftu_create_mixer(mixer);
+		break;
+
 	case USB_ID(0x0b05, 0x1739):
 	case USB_ID(0x0b05, 0x1743):
 		err = snd_xonar_u1_controls_create(mixer);
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 78792a8..0b2ae8e 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -1988,7 +1988,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
 		.data = & (const struct snd_usb_audio_quirk[]) {
 			{
 				.ifnum = 0,
-				.type = QUIRK_IGNORE_INTERFACE
+				.type = QUIRK_AUDIO_STANDARD_MIXER,
 			},
 			{
 				.ifnum = 1,
@@ -2055,7 +2055,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
 		.data = & (const struct snd_usb_audio_quirk[]) {
 			{
 				.ifnum = 0,
-				.type = QUIRK_IGNORE_INTERFACE
+				.type = QUIRK_AUDIO_STANDARD_MIXER,
 			},
 			{
 				.ifnum = 1,
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index bd13d72..a31a5c4 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -19,6 +19,7 @@
 #include <linux/usb.h>
 #include <linux/usb/audio.h>
 
+#include <sound/control.h>
 #include <sound/core.h>
 #include <sound/info.h>
 #include <sound/pcm.h>
@@ -58,6 +59,7 @@ static int create_composite_quirk(struct snd_usb_audio *chip,
 		if (quirk->ifnum != probed_ifnum)
 			usb_driver_claim_interface(driver, iface, (void *)-1L);
 	}
+
 	return 0;
 }
 
@@ -263,6 +265,20 @@ static int create_uaxx_quirk(struct snd_usb_audio *chip,
 }
 
 /*
+ * Create a standard mixer for the specified interface.
+ */
+static int create_standard_mixer_quirk(struct snd_usb_audio *chip,
+				       struct usb_interface *iface,
+				       struct usb_driver *driver,
+				       const struct snd_usb_audio_quirk *quirk)
+{
+	if (quirk->ifnum < 0)
+		return 0;
+
+	return snd_usb_create_mixer(chip, quirk->ifnum, 0);
+}
+
+/*
  * audio-interface quirks
  *
  * returns zero if no standard audio/MIDI parsing is needed.
@@ -294,7 +310,8 @@ 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_UAXX] = create_uaxx_quirk,
-		[QUIRK_AUDIO_ALIGN_TRANSFER] = create_align_transfer_quirk
+		[QUIRK_AUDIO_ALIGN_TRANSFER] = create_align_transfer_quirk,
+		[QUIRK_AUDIO_STANDARD_MIXER] = create_standard_mixer_quirk,
 	};
 
 	if (quirk->type < QUIRK_TYPE_COUNT) {
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index 32f2a97..1e79986 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -84,6 +84,7 @@ enum quirk_type {
 	QUIRK_AUDIO_FIXED_ENDPOINT,
 	QUIRK_AUDIO_EDIROL_UAXX,
 	QUIRK_AUDIO_ALIGN_TRANSFER,
+	QUIRK_AUDIO_STANDARD_MIXER,
 
 	QUIRK_TYPE_COUNT
 };

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-20 11:37                           ` Daniel Mack
@ 2011-05-20 15:08                             ` Grant Diffey
  2011-05-20 15:43                               ` Grant Diffey
  2011-05-24 10:11                               ` Felix Homann
  0 siblings, 2 replies; 34+ messages in thread
From: Grant Diffey @ 2011-05-20 15:08 UTC (permalink / raw)
  To: Daniel Mack; +Cc: Takashi Iwai, alsa-devel, Felix Homann

so this works.. (ie compiles and I get controls that do change volumes of
things )

I think there's something whacky with the control map. (I can't seem to send
Ain5 to out 1 and 2 successfully. but I'll test this with felix's original
code.

The Ain's are not capture volumes for this device.

There's 8 "analog ins" and 8 "software returns" (pcm channels) that are
mixed to 8 outputs. all the input gain controls are physical or line +4db
level balanced

Grant.


On Fri, May 20, 2011 at 9:37 PM, Daniel Mack <zonque@gmail.com> wrote:

> On Fri, May 20, 2011 at 1:14 PM, Felix Homann <linuxaudio@showlabor.de>
> wrote:
> > Sorry, here are the first lines:
> >
> > [ 4104.510080] usb 1-3: new high speed USB device using ehci_hcd and
> address
> > 2
> > [ 4104.661745] usb 1-3: config 1 interface 3 altsetting 0 bulk endpoint
> 0x7
> > has invalid maxpacket 8
> > [ 4104.661750] usb 1-3: config 1 interface 3 altsetting 0 bulk endpoint
> 0x87
> > has invalid maxpacket 8
> > [ 4104.824137] BUG: unable to handle kernel NULL pointer dereference at
> > 0000000000000020
> > [ 4104.824147] IP: [<ffffffffa04b0119>]
> snd_usb_mixer_controls+0x49/0x1a0
> > [snd_usb_audio]
>
> Ok, chip->ctrl_intf needs to be initialized. Next try ...
>
>
> Daniel
>

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-20 15:08                             ` Grant Diffey
@ 2011-05-20 15:43                               ` Grant Diffey
  2011-05-20 15:52                                 ` Felix Homann
  2011-05-20 15:54                                 ` Daniel Mack
  2011-05-24 10:11                               ` Felix Homann
  1 sibling, 2 replies; 34+ messages in thread
From: Grant Diffey @ 2011-05-20 15:43 UTC (permalink / raw)
  To: Daniel Mack; +Cc: Takashi Iwai, alsa-devel, Felix Homann

So something is very whacky with the control map. not sure how to debug
this.

The original patch felix posted works as I expect this one doesn't where
should I start debugging this?

Grant.


On Sat, May 21, 2011 at 1:08 AM, Grant Diffey <gdiffey@gmail.com> wrote:

> so this works.. (ie compiles and I get controls that do change volumes of
> things )
>
> I think there's something whacky with the control map. (I can't seem to
> send Ain5 to out 1 and 2 successfully. but I'll test this with felix's
> original code.
>
> The Ain's are not capture volumes for this device.
>
> There's 8 "analog ins" and 8 "software returns" (pcm channels) that are
> mixed to 8 outputs. all the input gain controls are physical or line +4db
> level balanced
>
> Grant.
>
>
>
> On Fri, May 20, 2011 at 9:37 PM, Daniel Mack <zonque@gmail.com> wrote:
>
>> On Fri, May 20, 2011 at 1:14 PM, Felix Homann <linuxaudio@showlabor.de>
>> wrote:
>> > Sorry, here are the first lines:
>> >
>> > [ 4104.510080] usb 1-3: new high speed USB device using ehci_hcd and
>> address
>> > 2
>> > [ 4104.661745] usb 1-3: config 1 interface 3 altsetting 0 bulk endpoint
>> 0x7
>> > has invalid maxpacket 8
>> > [ 4104.661750] usb 1-3: config 1 interface 3 altsetting 0 bulk endpoint
>> 0x87
>> > has invalid maxpacket 8
>> > [ 4104.824137] BUG: unable to handle kernel NULL pointer dereference at
>> > 0000000000000020
>> > [ 4104.824147] IP: [<ffffffffa04b0119>]
>> snd_usb_mixer_controls+0x49/0x1a0
>> > [snd_usb_audio]
>>
>> Ok, chip->ctrl_intf needs to be initialized. Next try ...
>>
>>
>> Daniel
>>
>
>

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-20 15:43                               ` Grant Diffey
@ 2011-05-20 15:52                                 ` Felix Homann
  2011-05-20 15:54                                 ` Daniel Mack
  1 sibling, 0 replies; 34+ messages in thread
From: Felix Homann @ 2011-05-20 15:52 UTC (permalink / raw)
  To: Grant Diffey; +Cc: Takashi Iwai, alsa-devel, Daniel Mack

I'm not close to my FTU at the moment. So I can't test it myself. Could 
you try interchanging  chn and n in the calls of  
snd_maudio_ftu_create_ctl(mixer, n, chn, name) in 
snd_maudio_ftu_create_mixer().

--Felix

Am 20.05.2011 17:43, schrieb Grant Diffey:
> So something is very whacky with the control map. not sure how to debug
> this.
>
> The original patch felix posted works as I expect this one doesn't where
> should I start debugging this?
>
> Grant.
>
>
> On Sat, May 21, 2011 at 1:08 AM, Grant Diffey<gdiffey@gmail.com>  wrote:
>
>> so this works.. (ie compiles and I get controls that do change volumes of
>> things )
>>
>> I think there's something whacky with the control map. (I can't seem to
>> send Ain5 to out 1 and 2 successfully. but I'll test this with felix's
>> original code.
>>
>> The Ain's are not capture volumes for this device.
>>
>> There's 8 "analog ins" and 8 "software returns" (pcm channels) that are
>> mixed to 8 outputs. all the input gain controls are physical or line +4db
>> level balanced
>>
>> Grant.
>>
>>
>>
>> On Fri, May 20, 2011 at 9:37 PM, Daniel Mack<zonque@gmail.com>  wrote:
>>
>>> On Fri, May 20, 2011 at 1:14 PM, Felix Homann<linuxaudio@showlabor.de>
>>> wrote:
>>>> Sorry, here are the first lines:
>>>>
>>>> [ 4104.510080] usb 1-3: new high speed USB device using ehci_hcd and
>>> address
>>>> 2
>>>> [ 4104.661745] usb 1-3: config 1 interface 3 altsetting 0 bulk endpoint
>>> 0x7
>>>> has invalid maxpacket 8
>>>> [ 4104.661750] usb 1-3: config 1 interface 3 altsetting 0 bulk endpoint
>>> 0x87
>>>> has invalid maxpacket 8
>>>> [ 4104.824137] BUG: unable to handle kernel NULL pointer dereference at
>>>> 0000000000000020
>>>> [ 4104.824147] IP: [<ffffffffa04b0119>]
>>> snd_usb_mixer_controls+0x49/0x1a0
>>>> [snd_usb_audio]
>>> Ok, chip->ctrl_intf needs to be initialized. Next try ...
>>>
>>>
>>> Daniel
>>>
>>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-20 15:43                               ` Grant Diffey
  2011-05-20 15:52                                 ` Felix Homann
@ 2011-05-20 15:54                                 ` Daniel Mack
  2011-05-20 16:25                                   ` Grant Diffey
  1 sibling, 1 reply; 34+ messages in thread
From: Daniel Mack @ 2011-05-20 15:54 UTC (permalink / raw)
  To: Grant Diffey; +Cc: Takashi Iwai, alsa-devel, Felix Homann

On Fri, May 20, 2011 at 5:43 PM, Grant Diffey <gdiffey@gmail.com> wrote:
> So something is very whacky with the control map. not sure how to debug
> this.
>
> The original patch felix posted works as I expect this one doesn't where
> should I start debugging this?

The first thing would be to define what you refer to with the term "wacky" :)

Does it fail creating the controls? Don't the control do what they're
supposed to? Is the behaviour deterministic?

An easy way to track things in the driver is to add
printk(KERN_WARNING ...); lines in the driver, then compile, unloaded
and load the module again. Then find these lines in your syslog.

Daniel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-20 15:54                                 ` Daniel Mack
@ 2011-05-20 16:25                                   ` Grant Diffey
  2011-05-20 16:38                                     ` Daniel Mack
  0 siblings, 1 reply; 34+ messages in thread
From: Grant Diffey @ 2011-05-20 16:25 UTC (permalink / raw)
  To: Daniel Mack; +Cc: Takashi Iwai, alsa-devel, Felix Homann

So the controls are created as expected and do something but not everything
I expect.

So my test setup here.
is inputs on analog 1, 2 and 5  if I mute all the controls. that works.

but in no setting of the controls can I get channel 5 to output to 1 and 2.
setting Ain5 -Out1 and Ain5-out2 does this on the earlier patch.

so even with all the controls at 100% (this should pass every input to every
output simultaneously I can't hear the input on ch5 on the headphones.

I'm going to have to look at this tomorrow it's 2:30am here. night guys

Grant

On Sat, May 21, 2011 at 1:54 AM, Daniel Mack <zonque@gmail.com> wrote:

> On Fri, May 20, 2011 at 5:43 PM, Grant Diffey <gdiffey@gmail.com> wrote:
> > So something is very whacky with the control map. not sure how to debug
> > this.
> >
> > The original patch felix posted works as I expect this one doesn't where
> > should I start debugging this?
>
> The first thing would be to define what you refer to with the term "wacky"
> :)
>
> Does it fail creating the controls? Don't the control do what they're
> supposed to? Is the behaviour deterministic?
>
> An easy way to track things in the driver is to add
> printk(KERN_WARNING ...); lines in the driver, then compile, unloaded
> and load the module again. Then find these lines in your syslog.
>
> Daniel
>

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-20 16:25                                   ` Grant Diffey
@ 2011-05-20 16:38                                     ` Daniel Mack
  2011-05-20 16:44                                       ` Felix Homann
  0 siblings, 1 reply; 34+ messages in thread
From: Daniel Mack @ 2011-05-20 16:38 UTC (permalink / raw)
  To: Grant Diffey; +Cc: Takashi Iwai, alsa-devel, Felix Homann

On Fri, May 20, 2011 at 6:25 PM, Grant Diffey <gdiffey@gmail.com> wrote:
> So the controls are created as expected and do something but not everything
> I expect.
>
> So my test setup here.
> is inputs on analog 1, 2 and 5  if I mute all the controls. that works.
>
> but in no setting of the controls can I get channel 5 to output to 1 and 2.
> setting Ain5 -Out1 and Ain5-out2 does this on the earlier patch.
>
> so even with all the controls at 100% (this should pass every input to every
> output simultaneously I can't hear the input on ch5 on the headphones.

Ok, that sound like Felix can fix this as he wrote the original patch.
Maybe something in my transition went wrong, but it's just much easier
to figure out what's wrong with access to the hardware :)

Daniel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-20 16:38                                     ` Daniel Mack
@ 2011-05-20 16:44                                       ` Felix Homann
  2011-05-20 16:52                                         ` Felix Homann
  0 siblings, 1 reply; 34+ messages in thread
From: Felix Homann @ 2011-05-20 16:44 UTC (permalink / raw)
  To: Daniel Mack; +Cc: Takashi Iwai, Grant Diffey, alsa-devel

Hi all,

Am 20.05.2011 18:38, schrieb Daniel Mack:
>
> Ok, that sound like Felix can fix this as he wrote the original patch.
> Maybe something in my transition went wrong, but it's just much easier
> to figure out what's wrong with access to the hardware :)

Yes, I guess that will be relatively easy to find. But please, don't 
expect anything before Monday.

Happy weekend,

Felix

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-20 16:44                                       ` Felix Homann
@ 2011-05-20 16:52                                         ` Felix Homann
  0 siblings, 0 replies; 34+ messages in thread
From: Felix Homann @ 2011-05-20 16:52 UTC (permalink / raw)
  To: alsa-devel

I guess I found it, but can't verify at the moment:

chn should run from 1 to 16 in the for loop. If youo can't wait till 
Monday, please compare the for loop in Daniel's path with mine.

Again, have a nice weekend,

Felix

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-20 15:08                             ` Grant Diffey
  2011-05-20 15:43                               ` Grant Diffey
@ 2011-05-24 10:11                               ` Felix Homann
  2011-05-24 10:47                                 ` Daniel Mack
  2011-05-24 23:55                                 ` Grant Diffey
  1 sibling, 2 replies; 34+ messages in thread
From: Felix Homann @ 2011-05-24 10:11 UTC (permalink / raw)
  To: Grant Diffey; +Cc: Takashi Iwai, alsa-devel, Daniel Mack

[-- Attachment #1: Type: text/plain, Size: 985 bytes --]

Hi again,

Am 20.05.2011 17:08, schrieb Grant Diffey:
> I think there's something whacky with the control map. (I can't seem to send
> Ain5 to out 1 and 2 successfully. but I'll test this with felix's original
> code.

Grant, could you please try the attached patch. I haven't tested all 128 
controls but it seems to work fine here. And while you're at it, could 
you please try some other "outs" as well. My FTU is in a rack and I 
can't easily access out 5-8.


> The Ain's are not capture volumes for this device
> There's 8 "analog ins" and 8 "software returns" (pcm channels) that are
> mixed to 8 outputs. all the input gain controls are physical or line +4db
> level balanced

That's true. I abused the term "Capture Volume" for my purely personal 
interest, since it made navigating through the controls easier in 
alsamixer and alsamixer-qt4. So, Daniel and Takashi, please feel free to 
change the names  to whatever you think is more appropriate.

Kind regards,

Felix





[-- Attachment #2: ftu-mixer-v4.diff --]
[-- Type: text/x-patch, Size: 10973 bytes --]

diff --git a/sound/usb/card.c b/sound/usb/card.c
index 40722f8..4edf3bc 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -47,6 +47,7 @@
 #include <linux/usb/audio.h>
 #include <linux/usb/audio-v2.h>
 
+#include <sound/control.h>
 #include <sound/core.h>
 #include <sound/info.h>
 #include <sound/pcm.h>
@@ -478,14 +479,6 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
 		}
 	}
 
-	chip->txfr_quirk = 0;
-	err = 1; /* continue */
-	if (quirk && quirk->ifnum != QUIRK_NO_INTERFACE) {
-		/* need some special handlings */
-		if ((err = snd_usb_create_quirk(chip, intf, &usb_audio_driver, quirk)) < 0)
-			goto __error;
-	}
-
 	/*
 	 * For devices with more than one control interface, we assume the
 	 * first contains the audio controls. We might need a more specific
@@ -494,6 +487,14 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
 	if (!chip->ctrl_intf)
 		chip->ctrl_intf = alts;
 
+	chip->txfr_quirk = 0;
+	err = 1; /* continue */
+	if (quirk && quirk->ifnum != QUIRK_NO_INTERFACE) {
+		/* need some special handlings */
+		if ((err = snd_usb_create_quirk(chip, intf, &usb_audio_driver, quirk)) < 0)
+			goto __error;
+	}
+
 	if (err > 0) {
 		/* create normal USB audio interfaces */
 		if (snd_usb_create_streams(chip, ifnum) < 0 ||
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 5e47757..fbcf02f 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -86,16 +86,6 @@ struct mixer_build {
 	const struct usbmix_selector_map *selector_map;
 };
 
-enum {
-	USB_MIXER_BOOLEAN,
-	USB_MIXER_INV_BOOLEAN,
-	USB_MIXER_S8,
-	USB_MIXER_U8,
-	USB_MIXER_S16,
-	USB_MIXER_U16,
-};
-
-
 /*E-mu 0202/0404/0204 eXtension Unit(XU) control*/
 enum {
 	USB_XU_CLOCK_RATE 		= 0xe301,
@@ -535,20 +525,21 @@ static int check_matrix_bitmap(unsigned char *bmap, int ich, int och, int num_ou
  * if failed, give up and free the control instance.
  */
 
-static int add_control_to_empty(struct mixer_build *state, struct snd_kcontrol *kctl)
+int snd_usb_mixer_add_control(struct usb_mixer_interface *mixer,
+			      struct snd_kcontrol *kctl)
 {
 	struct usb_mixer_elem_info *cval = kctl->private_data;
 	int err;
 
-	while (snd_ctl_find_id(state->chip->card, &kctl->id))
+	while (snd_ctl_find_id(mixer->chip->card, &kctl->id))
 		kctl->id.index++;
-	if ((err = snd_ctl_add(state->chip->card, kctl)) < 0) {
+	if ((err = snd_ctl_add(mixer->chip->card, kctl)) < 0) {
 		snd_printd(KERN_ERR "cannot add control (err = %d)\n", err);
 		return err;
 	}
 	cval->elem_id = &kctl->id;
-	cval->next_id_elem = state->mixer->id_elems[cval->id];
-	state->mixer->id_elems[cval->id] = cval;
+	cval->next_id_elem = mixer->id_elems[cval->id];
+	mixer->id_elems[cval->id] = cval;
 	return 0;
 }
 
@@ -967,7 +958,7 @@ static int mixer_ctl_feature_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
 	return changed;
 }
 
-static struct snd_kcontrol_new usb_feature_unit_ctl = {
+struct snd_kcontrol_new usb_feature_unit_ctl = {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "", /* will be filled later manually */
 	.info = mixer_ctl_feature_info,
@@ -984,6 +975,9 @@ static struct snd_kcontrol_new usb_feature_unit_ctl_ro = {
 	.put = NULL,
 };
 
+/* This symbol is exported in order to allow the mixer quirks to
+ * hook up to the standard feature unit control mechanism */
+struct snd_kcontrol_new *snd_usb_feature_unit_ctl = &usb_feature_unit_ctl;
 
 /*
  * build a feature control
@@ -1174,7 +1168,7 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
 
 	snd_printdd(KERN_INFO "[%d] FU [%s] ch = %d, val = %d/%d/%d\n",
 		    cval->id, kctl->id.name, cval->channels, cval->min, cval->max, cval->res);
-	add_control_to_empty(state, kctl);
+	snd_usb_mixer_add_control(state->mixer, kctl);
 }
 
 
@@ -1338,7 +1332,7 @@ static void build_mixer_unit_ctl(struct mixer_build *state,
 
 	snd_printdd(KERN_INFO "[%d] MU [%s] ch = %d, val = %d/%d\n",
 		    cval->id, kctl->id.name, cval->channels, cval->min, cval->max);
-	add_control_to_empty(state, kctl);
+	snd_usb_mixer_add_control(state->mixer, kctl);
 }
 
 
@@ -1639,7 +1633,7 @@ static int build_audio_procunit(struct mixer_build *state, int unitid, void *raw
 
 		snd_printdd(KERN_INFO "[%d] PU [%s] ch = %d, val = %d/%d\n",
 			    cval->id, kctl->id.name, cval->channels, cval->min, cval->max);
-		if ((err = add_control_to_empty(state, kctl)) < 0)
+		if ((err = snd_usb_mixer_add_control(state->mixer, kctl)) < 0)
 			return err;
 	}
 	return 0;
@@ -1856,7 +1850,7 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, void
 
 	snd_printdd(KERN_INFO "[%d] SU [%s] items = %d\n",
 		    cval->id, kctl->id.name, desc->bNrInPins);
-	if ((err = add_control_to_empty(state, kctl)) < 0)
+	if ((err = snd_usb_mixer_add_control(state->mixer, kctl)) < 0)
 		return err;
 
 	return 0;
@@ -1933,7 +1927,7 @@ static int snd_usb_mixer_dev_free(struct snd_device *device)
  *
  * walk through all UAC_OUTPUT_TERMINAL descriptors to search for mixers
  */
-static int snd_usb_mixer_controls(struct usb_mixer_interface *mixer)
+int snd_usb_mixer_controls(struct usb_mixer_interface *mixer)
 {
 	struct mixer_build state;
 	int err;
diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h
index b4a2c81..ae1a14d 100644
--- a/sound/usb/mixer.h
+++ b/sound/usb/mixer.h
@@ -24,7 +24,16 @@ struct usb_mixer_interface {
 	u8 xonar_u1_status;
 };
 
-#define MAX_CHANNELS	10	/* max logical channels */
+#define MAX_CHANNELS	16	/* max logical channels */
+
+enum {
+	USB_MIXER_BOOLEAN,
+	USB_MIXER_INV_BOOLEAN,
+	USB_MIXER_S8,
+	USB_MIXER_U8,
+	USB_MIXER_S16,
+	USB_MIXER_U16,
+};
 
 struct usb_mixer_elem_info {
 	struct usb_mixer_interface *mixer;
@@ -55,4 +64,7 @@ int snd_usb_mixer_set_ctl_value(struct usb_mixer_elem_info *cval,
 void snd_usb_mixer_inactivate(struct usb_mixer_interface *mixer);
 int snd_usb_mixer_activate(struct usb_mixer_interface *mixer);
 
+int snd_usb_mixer_add_control(struct usb_mixer_interface *mixer,
+			      struct snd_kcontrol *kctl);
+
 #endif /* __USBMIXER_H */
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 73dcc82..30143e5 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -40,6 +40,8 @@
 #include "mixer_quirks.h"
 #include "helper.h"
 
+extern struct snd_kcontrol_new *snd_usb_feature_unit_ctl;
+
 /*
  * Sound Blaster remote control configuration
  *
@@ -481,6 +483,69 @@ static int snd_nativeinstruments_create_mixer(struct usb_mixer_interface *mixer,
 	return err;
 }
 
+/* M-Audio FastTrack Ultra quirks */
+
+/* private_free callback */
+static void usb_mixer_elem_free(struct snd_kcontrol *kctl)
+{
+	kfree(kctl->private_data);
+	kctl->private_data = NULL;
+}
+
+static int snd_maudio_ftu_create_ctl(struct usb_mixer_interface *mixer,
+				     int in, int out, const char *name)
+{
+	struct usb_mixer_elem_info *cval;
+	struct snd_kcontrol *kctl;
+
+	cval = kzalloc(sizeof(*cval), GFP_KERNEL);
+	if (!cval)
+		return -ENOMEM;
+
+	cval->id = 5;
+	cval->mixer = mixer;
+	cval->val_type = USB_MIXER_S16;
+	cval->channels = 1;
+	cval->control = out + 1;
+	cval->cmask = 1 << in;
+
+	kctl = snd_ctl_new1(snd_usb_feature_unit_ctl, cval);
+	if (!kctl) {
+		kfree(cval);
+		return -ENOMEM;
+	}
+
+	snprintf(kctl->id.name, sizeof(kctl->id.name), name);
+	kctl->private_free = usb_mixer_elem_free;
+	return snd_usb_mixer_add_control(mixer, kctl);
+}
+
+static int snd_maudio_ftu_create_mixer(struct usb_mixer_interface *mixer)
+{
+	char name[64];
+	int out, in, err;
+
+	for (out = 0; out < 8; out++) {
+		for (in = 0; in < 8; in++) {
+			snprintf(name, sizeof(name),
+				 "AIn%d - Out%d Capture Volume", in  + 1, out + 1);
+			err = snd_maudio_ftu_create_ctl(mixer, in, out, name);
+			if (err < 0)
+				return err;
+		}
+
+		for (in = 8; in < 16; in++) {
+			snprintf(name, sizeof(name),
+				 "DIn%d - Out%d Playback Volume", in - 7, out + 1);
+			err = snd_maudio_ftu_create_ctl(mixer, in, out, name);
+			if (err < 0)
+				return err;
+		}
+	}
+
+	return 0;
+}
+
 void snd_emuusb_set_samplerate(struct snd_usb_audio *chip,
 			       unsigned char samplerate_id)
 {
@@ -521,6 +586,11 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
 					      snd_audigy2nx_proc_read);
 		break;
 
+	case USB_ID(0x0763, 0x2080): /* M-Audio Fast Track Ultra */
+	case USB_ID(0x0763, 0x2081): /* M-Audio Fast Track Ultra 8R */
+		err = snd_maudio_ftu_create_mixer(mixer);
+		break;
+
 	case USB_ID(0x0b05, 0x1739):
 	case USB_ID(0x0b05, 0x1743):
 		err = snd_xonar_u1_controls_create(mixer);
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 196c753..f0ad7f1 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -1935,7 +1935,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
 		.data = & (const struct snd_usb_audio_quirk[]) {
 			{
 				.ifnum = 0,
-				.type = QUIRK_IGNORE_INTERFACE
+				.type = QUIRK_AUDIO_STANDARD_MIXER,
 			},
 			{
 				.ifnum = 1,
@@ -2002,7 +2002,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
 		.data = & (const struct snd_usb_audio_quirk[]) {
 			{
 				.ifnum = 0,
-				.type = QUIRK_IGNORE_INTERFACE
+				.type = QUIRK_AUDIO_STANDARD_MIXER,
 			},
 			{
 				.ifnum = 1,
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 355759b..193e499 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -19,6 +19,7 @@
 #include <linux/usb.h>
 #include <linux/usb/audio.h>
 
+#include <sound/control.h>
 #include <sound/core.h>
 #include <sound/info.h>
 #include <sound/pcm.h>
@@ -58,6 +59,7 @@ static int create_composite_quirk(struct snd_usb_audio *chip,
 		if (quirk->ifnum != probed_ifnum)
 			usb_driver_claim_interface(driver, iface, (void *)-1L);
 	}
+
 	return 0;
 }
 
@@ -263,6 +265,20 @@ static int create_uaxx_quirk(struct snd_usb_audio *chip,
 }
 
 /*
+ * Create a standard mixer for the specified interface.
+ */
+static int create_standard_mixer_quirk(struct snd_usb_audio *chip,
+				       struct usb_interface *iface,
+				       struct usb_driver *driver,
+				       const struct snd_usb_audio_quirk *quirk)
+{
+	if (quirk->ifnum < 0)
+		return 0;
+
+	return snd_usb_create_mixer(chip, quirk->ifnum, 0);
+}
+
+/*
  * audio-interface quirks
  *
  * returns zero if no standard audio/MIDI parsing is needed.
@@ -294,7 +310,8 @@ 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_UAXX] = create_uaxx_quirk,
-		[QUIRK_AUDIO_ALIGN_TRANSFER] = create_align_transfer_quirk
+		[QUIRK_AUDIO_ALIGN_TRANSFER] = create_align_transfer_quirk,
+		[QUIRK_AUDIO_STANDARD_MIXER] = create_standard_mixer_quirk,
 	};
 
 	if (quirk->type < QUIRK_TYPE_COUNT) {
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index 32f2a97..1e79986 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -84,6 +84,7 @@ enum quirk_type {
 	QUIRK_AUDIO_FIXED_ENDPOINT,
 	QUIRK_AUDIO_EDIROL_UAXX,
 	QUIRK_AUDIO_ALIGN_TRANSFER,
+	QUIRK_AUDIO_STANDARD_MIXER,
 
 	QUIRK_TYPE_COUNT
 };

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-24 10:11                               ` Felix Homann
@ 2011-05-24 10:47                                 ` Daniel Mack
  2011-05-24 11:54                                   ` Takashi Iwai
  2011-05-24 23:55                                 ` Grant Diffey
  1 sibling, 1 reply; 34+ messages in thread
From: Daniel Mack @ 2011-05-24 10:47 UTC (permalink / raw)
  To: Felix Homann; +Cc: Takashi Iwai, Grant Diffey, alsa-devel

On Tue, May 24, 2011 at 12:11 PM, Felix Homann <linuxaudio@showlabor.de> wrote:
> Hi again,
>
> Am 20.05.2011 17:08, schrieb Grant Diffey:
>>
>> I think there's something whacky with the control map. (I can't seem to
>> send
>> Ain5 to out 1 and 2 successfully. but I'll test this with felix's original
>> code.
>
> Grant, could you please try the attached patch. I haven't tested all 128
> controls but it seems to work fine here. And while you're at it, could you
> please try some other "outs" as well. My FTU is in a rack and I can't easily
> access out 5-8.

Good. I already amended and split the patch into pieces and can send
out the whole thing once you give me a go.

Daniel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-24 10:47                                 ` Daniel Mack
@ 2011-05-24 11:54                                   ` Takashi Iwai
  0 siblings, 0 replies; 34+ messages in thread
From: Takashi Iwai @ 2011-05-24 11:54 UTC (permalink / raw)
  To: Daniel Mack; +Cc: Grant Diffey, Felix Homann, alsa-devel

At Tue, 24 May 2011 12:47:31 +0200,
Daniel Mack wrote:
> 
> On Tue, May 24, 2011 at 12:11 PM, Felix Homann <linuxaudio@showlabor.de> wrote:
> > Hi again,
> >
> > Am 20.05.2011 17:08, schrieb Grant Diffey:
> >>
> >> I think there's something whacky with the control map. (I can't seem to
> >> send
> >> Ain5 to out 1 and 2 successfully. but I'll test this with felix's original
> >> code.
> >
> > Grant, could you please try the attached patch. I haven't tested all 128
> > controls but it seems to work fine here. And while you're at it, could you
> > please try some other "outs" as well. My FTU is in a rack and I can't easily
> > access out 5-8.
> 
> Good. I already amended and split the patch into pieces and can send
> out the whole thing once you give me a go.

For putting the stuff into 2.6.40, please submit it until tomorrow,
so that I can send a pull request in time.  Linus announced that
2.6.40 has a shorter merge window.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: A plea for help on mixer support for Fast Track Ultra (8R)
  2011-05-24 10:11                               ` Felix Homann
  2011-05-24 10:47                                 ` Daniel Mack
@ 2011-05-24 23:55                                 ` Grant Diffey
  1 sibling, 0 replies; 34+ messages in thread
From: Grant Diffey @ 2011-05-24 23:55 UTC (permalink / raw)
  To: Felix Homann; +Cc: Takashi Iwai, alsa-devel, Daniel Mack

Guys,

So I'm not going to get to this for ~10hrs which means missing the merge
window nost likely for 2.6.40/2.8.0/3.0/whateverlinusdecidestocallit I'm
comefortable with Felix having tested. I will get to it when I can but I'm
currently @work and will be for 8hrs or so.

Grant.



On Tue, May 24, 2011 at 8:11 PM, Felix Homann <linuxaudio@showlabor.de>wrote:

> Hi again,
>
> Am 20.05.2011 17:08, schrieb Grant Diffey:
>
>  I think there's something whacky with the control map. (I can't seem to
>> send
>> Ain5 to out 1 and 2 successfully. but I'll test this with felix's original
>> code.
>>
>
> Grant, could you please try the attached patch. I haven't tested all 128
> controls but it seems to work fine here. And while you're at it, could you
> please try some other "outs" as well. My FTU is in a rack and I can't easily
> access out 5-8.
>
>
>
>  The Ain's are not capture volumes for this device
>> There's 8 "analog ins" and 8 "software returns" (pcm channels) that are
>> mixed to 8 outputs. all the input gain controls are physical or line +4db
>> level balanced
>>
>
> That's true. I abused the term "Capture Volume" for my purely personal
> interest, since it made navigating through the controls easier in alsamixer
> and alsamixer-qt4. So, Daniel and Takashi, please feel free to change the
> names  to whatever you think is more appropriate.
>
> Kind regards,
>
> Felix
>
>
>
>
>

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2011-05-24 23:55 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-18 15:19 A plea for help on mixer support for Fast Track Ultra (8R) Felix Homann
2011-05-18 15:29 ` Felix Homann
2011-05-18 17:51 ` Daniel Mack
2011-05-18 18:46   ` Felix Homann
2011-05-18 21:30     ` Daniel Mack
2011-05-19  0:51       ` Grant Diffey
2011-05-19  5:42       ` Takashi Iwai
2011-05-19  6:45         ` Felix Homann
2011-05-19  7:15           ` Clemens Ladisch
2011-05-19  7:24           ` Takashi Iwai
2011-05-19  8:14             ` Felix Homann
2011-05-19  8:52               ` Daniel Mack
2011-05-19 10:56                 ` Felix Homann
2011-05-19 11:05                 ` Daniel Mack
2011-05-19 12:23                   ` Felix Homann
2011-05-19 13:36                   ` Felix Homann
2011-05-19 13:42                   ` Felix Homann
2011-05-19 14:12                     ` Daniel Mack
2011-05-20 10:12                       ` Felix Homann
2011-05-20 11:12                         ` Daniel Mack
2011-05-20 11:14                         ` Felix Homann
2011-05-20 11:37                           ` Daniel Mack
2011-05-20 15:08                             ` Grant Diffey
2011-05-20 15:43                               ` Grant Diffey
2011-05-20 15:52                                 ` Felix Homann
2011-05-20 15:54                                 ` Daniel Mack
2011-05-20 16:25                                   ` Grant Diffey
2011-05-20 16:38                                     ` Daniel Mack
2011-05-20 16:44                                       ` Felix Homann
2011-05-20 16:52                                         ` Felix Homann
2011-05-24 10:11                               ` Felix Homann
2011-05-24 10:47                                 ` Daniel Mack
2011-05-24 11:54                                   ` Takashi Iwai
2011-05-24 23:55                                 ` Grant Diffey

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.