[alsa-devel] sound: usb-audio: full capture/playback/spdif support for Digidesign Mbox 2

Clemens Ladisch clemens at ladisch.de
Tue Nov 30 16:26:55 CET 2010


Damien Zammit wrote:
> Unfortunately I am sending this email from gmail, so I'm not sure
> about line formatting, yikes.

Long lines are wrapped.

> +		/*
> +		 * We have to make sure that the USB core looks
> +		 * again at interface 6 by calling usb_set_interface() on it.
> +		 */
> +		usb_set_interface(umidi->dev, 6, 0);

Why?  Is this another duplicate endpoint number?

> +		memcpy(&endpoints[0], quirk->data,
> +			sizeof(struct snd_usb_midi_endpoint_info));

I think you should be able to call snd_usbmidi_detect_per_port_endpoints
here.

> +/* DIGIDESIGN MBOX 2 */
> +{
> +       /* Damien Zammit <damien.zammit at gmail.com> */

This usually goes into the commit log.

> +       USB_DEVICE(0x0dba, 0x3000),

The entries are supposed to be ordered by their IDs.

> +                         * but now we will try sending
> capture/playback enable magic
> +                         *
> +                         * 80 bb 00 = 24bit mode - S24_3BE
> +                         * 44 ac 00 = 16bit mode?

Why the question mark?

> +                        //enablemagic[0]=0x44;
> +                        //enablemagic[1]=0xac;
> +                        //enablemagic[2]=0x00;

Why is this commented out?

> +#define MBOX2_SET_48K_SPDIF            0
> +#define MBOX2_SET_44K_SPDIF            1
> +#define MBOX2_SET_48K_ANALOG           2
> +#define MBOX2_SET_44K_ANALOG           3

In theory, this should be some control instead of a module parameter.

> +static int mbox2_skip_setting_quirk(struct snd_usb_audio *chip,
> +                                        int iface, int altno)

This function isn't consistently indented with tabs.


Regards,
Clemens


More information about the Alsa-devel mailing list