From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Hoffmann Subject: Re: [PATCH 4/4 v4] ALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20 Date: Tue, 04 Nov 2014 14:29:02 +0100 Message-ID: <5458D49E.6060305@gmx.de> References: <1415055496-11151-1-git-send-email-chris.j.arges@canonical.com> <1415055496-11151-5-git-send-email-chris.j.arges@canonical.com> <5458D19D.7050206@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by alsa0.perex.cz (Postfix) with ESMTP id 59452260619 for ; Tue, 4 Nov 2014 14:29:22 +0100 (CET) In-Reply-To: <5458D19D.7050206@gmx.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Takashi Iwai Cc: alsa-devel@alsa-project.org, robin@gareus.org, clemens@ladisch.de, david.henningsson@canonical.com, Chris J Arges List-Id: alsa-devel@alsa-project.org 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