[alsa-devel] [PATCH 4/4 v4] ALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20

Tobias Hoffmann th55 at gmx.de
Tue Nov 4 14:29:02 CET 2014


On 04/11/14 14:16, Tobias Hoffmann wrote:
> But maybe (as Clemens suggested) the strings *for .opt_master and 
> .opt_matrix* should just be created dynamically in 
> scarlett_ctl_enum_info, instead of using snd_ctl_enum_info.
> I want to point out that scarlett_device_info already contains the 
> necessary information to do this:
>
>     .matrix_out = 6,
> ...
>     .pcm_start = 0,  // pcm(1) .. pcm(analog_start-pcm_start)=pcm(12)
>     .analog_start = 12, // analog(1) .. analog(4)
>     .spdif_start = 16, // spdif(1) .. spdif(2)
>     .adat_start = 18,  // adat(1) .. adat(0)  [i.e. no adat]
>     .mix_start = 18, // mix('A') .. mix('F')=mix('A' + matrix_out)
>
>
>
> and Off(-1). Only elem->private_data has to be of type 
> scarlett_mixer_elem_enum_info for the usual enums (impedance, pad, 
> ...), but of type scarlett_device_info for the master and mixer enums...
>

Hmm, as the same options are required for a lot of master and mixer 
enums, the strings should probably be generated only once (and a dynamic 
scarlett_mixer_elem_enum_info would require no modifications of 
scarlett_ctl_enum_info).

   Tobias



More information about the Alsa-devel mailing list