Received: by 10.192.165.148 with SMTP id m20csp2611175imm; Sun, 6 May 2018 20:03:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZruedqmEhbcYfGFsYkoutDrWXT2VOoeVsYq2eeRxjN4BS1WW7mIbdflgn9qLOr3vQqI/+6z X-Received: by 2002:a17:902:1566:: with SMTP id b35-v6mr36780182plh.107.1525662193192; Sun, 06 May 2018 20:03:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525662193; cv=none; d=google.com; s=arc-20160816; b=NGETdXsTfly0cgIL9xRM8YNinXxf4BL1OgjC9CbCFOwM74jwKSVoMUDiyKxrDVsHPX p2E1RAtCxGXeS4PIgVAO0GnTmFg4/szDwLVhYzhcluOBth50Tdc0B82E4l+U4gXBf0d+ WQ3qZVf+Ggkf6oU9d2KL/wMHRkVdQOaKTWIo3HWczIS2PNbWyYmofjfrau/O3dAs5VTG GdJKldLP3P0EaKBpPKrgAsscW6LR/qPGFVe2fwtd/KesnHxXIdeML8/JOIu4mpIpMzbF EWjFdNaAB/LhO0y6PQb+U9e8PVldCUhM0E/ffWwMU6ut6wXku5DPmVJnARwT6JnCH5V7 1Qsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=KTRzHZJLP4ytR5Xd3QNimeOEbGoHCOo1uQYtDjLQ1sY=; b=t45k/+kZfz0deIp2fnoGsDiezJ6O37NvtSstGH1lKf2sAuEo3KkjmDXyA8MYo/Z2y7 nIx4+G2ce1x9kGi5jBWFhtWbxwcxnibfa0M0lD8Tjfm1IilBjzxsfnMI655jkWVkT9Kd +Y+PuBRHKMmpntQsDUFjREpr0R7qA0ybupTJTLTKY1PAu+Zv2l/R9dxe/rQ9HdkoqnnL gwq2zmIPWKCfzaGQgnmsAuM5bXmmyu0euqau2zTEgFSiEVPaguAb7PiZENA8zPBdhOm4 V6kEwWEeAZ52UNFG4vrQ/EbnXeIhXcnUkRyJLDDieFVo4Q9AZW1dvg+2xzsNBQPCnlu9 bDXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s189-v6si17560258pgc.571.2018.05.06.20.02.58; Sun, 06 May 2018 20:03:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751890AbeEGDBl (ORCPT + 99 others); Sun, 6 May 2018 23:01:41 -0400 Received: from smtp-proxy003.phy.lolipop.jp ([157.7.104.44]:46998 "EHLO smtp-proxy003.phy.lolipop.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751852AbeEGDBk (ORCPT ); Sun, 6 May 2018 23:01:40 -0400 Received: from smtp-proxy003.phy.lolipop.lan (HELO smtp-proxy003.phy.lolipop.jp) (172.19.44.44) (smtp-auth username m12129643-o-takashi , mechanism plain) by smtp-proxy003.phy.lolipop.jp (qpsmtpd/0.82) with ESMTPA; Mon, 07 May 2018 12:01:38 +0900 Received: from 127.0.0.1 (127.0.0.1) by smtp-proxy003.phy.lolipop.jp (LOLIPOP-Fsecure); Mon, 07 May 2018 12:01:38 +0900 (JST) X-Virus-Status: clean(LOLIPOP-Fsecure) Subject: Re: [PATCH v3 6/9] ALSA: hda/ca0132: add alt_select_in/out for R3Di + SBZ To: Connor McAdams Cc: Jaroslav Kysela , Takashi Iwai , =?UTF-8?Q?J=c3=a9r=c3=a9my_Lefaure?= , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org References: <1525547001-17588-1-git-send-email-conmanx360@gmail.com> <1525547001-17588-7-git-send-email-conmanx360@gmail.com> From: Takashi Sakamoto Message-ID: <7d0154fa-2a98-4e3e-12ae-ff0472c6eb91@sakamocchi.jp> Date: Mon, 7 May 2018 12:01:38 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1525547001-17588-7-git-send-email-conmanx360@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On May 6 2018 04:03, Connor McAdams wrote: > Add functions ca0132_alt_select_out and ca0132_alt_select_in for > switching outputs and inputs for r3di and sbz. Also, add enumerated > controls for selecting output and input source. > > Signed-off-by: Connor McAdams > --- > sound/pci/hda/patch_ca0132.c | 597 +++++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 572 insertions(+), 25 deletions(-) > > diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c > index bb0feaa..36cc2a1 100644 > --- a/sound/pci/hda/patch_ca0132.c > +++ b/sound/pci/hda/patch_ca0132.c > @@ -480,6 +494,49 @@ static struct ct_voicefx_preset ca0132_voicefx_presets[] = { > } > }; > > +/* DSP command sequences for ca0132_alt_select_out */ > +#define ALT_OUT_SET_MAX_COMMANDS 9 /* Max number of commands in sequence */ > +struct ca0132_alt_out_set { > + char *name; /*preset name*/ > + unsigned char commands; > + unsigned int mids[ALT_OUT_SET_MAX_COMMANDS]; > + unsigned int reqs[ALT_OUT_SET_MAX_COMMANDS]; > + unsigned int vals[ALT_OUT_SET_MAX_COMMANDS]; > +}; > + > +static struct ca0132_alt_out_set alt_out_presets[] = { > + { .name = "Line Out", > + .commands = 7, > + .mids = { 0x96, 0x96, 0x96, 0x8F, > + 0x96, 0x96, 0x96 }, > + .reqs = { 0x19, 0x17, 0x18, 0x01, > + 0x1F, 0x15, 0x3A }, > + .vals = { 0x3F000000, 0x42A00000, 0x00000000, > + 0x00000000, 0x00000000, 0x00000000, > + 0x00000000 } > + }, > + { .name = "Headphone", > + .commands = 7, > + .mids = { 0x96, 0x96, 0x96, 0x8F, > + 0x96, 0x96, 0x96 }, > + .reqs = { 0x19, 0x17, 0x18, 0x01, > + 0x1F, 0x15, 0x3A }, > + .vals = { 0x3F000000, 0x42A00000, 0x00000000, > + 0x00000000, 0x00000000, 0x00000000, > + 0x00000000 } > + }, > + { .name = "Surround", > + .commands = 8, > + .mids = { 0x96, 0x8F, 0x96, 0x96, > + 0x96, 0x96, 0x96, 0x96 }, > + .reqs = { 0x18, 0x01, 0x1F, 0x15, > + 0x3A, 0x1A, 0x1B, 0x1C }, > + .vals = { 0x00000000, 0x00000000, 0x00000000, > + 0x00000000, 0x00000000, 0x00000000, > + 0x00000000, 0x00000000 } > + } > +}; > + It's better to add 'const' qualifier. Regards Takashi Sakamoto