[alsa-devel] [WIP PATCH] Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20.

Robin Gareus robin at gareus.org
Wed Oct 8 23:21:54 CEST 2014


Thanks David for picking this up.

On 10/08/2014 09:04 PM, Daniel Mack wrote:
>> +
>> +/* #define WITH_METER */
>> +/* #define WITH_LOGSCALEMETER */
> 
> These should either be converted to module parameters, or removed
> alltogether. Why are they configurable, anyway?

Mainly because I lost interest in Focusrite devices before finishing the
work. They were handy during initial development and the idea was to
just enable them by default at some point.

Last I checked they both worked fine for the 18i6, but it seems support
other Scarlett devices is missing and/or untested, so I guess they're
commented out for that reason.

> +#define CTL_SWITCH(cmd, off, no, count, name) \
> +	do { \
> +		err = add_new_ctl(mixer, &usb_scarlett_ctl_switch, cmd, off, no, 2,
count, name, NULL, &elem); \
> +		if (err < 0) \
> +			return err; \
> +	} while (0)

curious, why "do { } while (0)" and not just  "{ }" ?

> Hmm, I don't really like the style of magically returning from macros

Yes, same here. I'm initially responsible for one such macro and wanted
to get rid of it. I'm sorry if that lead Tobias to adding more in that
style.

Cheers!
robin


More information about the Alsa-devel mailing list