From patchwork Wed Oct 29 20:56:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris J Arges X-Patchwork-Id: 5191621 X-Patchwork-Delegate: tiwai@suse.de Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 717A9C11AC for ; Wed, 29 Oct 2014 20:57:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AD0D620225 for ; Wed, 29 Oct 2014 20:57:27 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id B7F21201DD for ; Wed, 29 Oct 2014 20:57:26 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 891CC2651E6; Wed, 29 Oct 2014 21:57:25 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 0385C2605DB; Wed, 29 Oct 2014 21:56:24 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3C3C22605F4; Wed, 29 Oct 2014 21:56:19 +0100 (CET) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by alsa0.perex.cz (Postfix) with ESMTP id C9AD82605A5 for ; Wed, 29 Oct 2014 21:56:10 +0100 (CET) Received: from cpe-173-174-67-34.austin.res.rr.com ([173.174.67.34] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1XjaHq-0005Xb-A3; Wed, 29 Oct 2014 20:56:10 +0000 From: Chris J Arges To: alsa-devel@alsa-project.org Date: Wed, 29 Oct 2014 15:56:01 -0500 Message-Id: <1414616163-14146-3-git-send-email-chris.j.arges@canonical.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1414616163-14146-1-git-send-email-chris.j.arges@canonical.com> References: <1414616163-14146-1-git-send-email-chris.j.arges@canonical.com> Cc: tiwai@suse.de, th55@gmx.de, robin@gareus.org, clemens@ladisch.de, david.henningsson@canonical.com Subject: [alsa-devel] [PATCH v3 2/4] ALSA: usb-audio: Add usb_mixer_elem_enum_info X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Add structure to hold enumeration control information and in addition add it to the usb_mixer_elem_info structure. This allows this structure to be more easily reused. Signed-off-by: Chris J Arges --- sound/usb/mixer.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h index 73b1f64..cf3967a4 100644 --- a/sound/usb/mixer.h +++ b/sound/usb/mixer.h @@ -36,10 +36,17 @@ enum { USB_MIXER_U16, }; +struct usb_mixer_elem_enum_info { + int start; + int len; + const char * const *names; +}; + struct usb_mixer_elem_info { struct usb_mixer_interface *mixer; struct usb_mixer_elem_info *next_id_elem; /* list of controls with same id */ struct snd_ctl_elem_id *elem_id; + const struct usb_mixer_elem_enum_info *opt; /* enum control info */ unsigned int id; unsigned int control; /* CS or ICN (high byte) */ unsigned int cmask; /* channel mask bitmap: 0 = master */