LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Connor McAdams <conmanx360@gmail.com>
Cc: "Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Jérémy Lefaure" <jeremy.lefaure@lse.epita.fr>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 6/9] ALSA: hda/ca0132: add alt_select_in/out for R3Di + SBZ
Date: Mon, 7 May 2018 12:01:38 +0900	[thread overview]
Message-ID: <7d0154fa-2a98-4e3e-12ae-ff0472c6eb91@sakamocchi.jp> (raw)
In-Reply-To: <1525547001-17588-7-git-send-email-conmanx360@gmail.com>

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 <conmanx360@gmail.com>
> ---
>   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

  reply	other threads:[~2018-05-07  3:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-05 19:03 [PATCH v3 0/9] ALSA: hda/ca0132: Patch Series for Recon3Di and Sound Blaster Z Support Connor McAdams
2018-05-05 19:03 ` [PATCH v3 1/9] ALSA: hda/ca0132: R3Di and SBZ quirk entires + alt firmware loading Connor McAdams
2018-05-05 19:03 ` [PATCH v3 2/9] ALSA: hda/ca0132: Add pincfg for SBZ + R3Di, add fp hp auto-detect Connor McAdams
2018-05-05 19:03 ` [PATCH v3 3/9] ALSA: hda/ca0132: Add PCI region2 iomap for SBZ Connor McAdams
2018-05-05 19:03 ` [PATCH v3 4/9] ALSA: hda/ca0132: Add extra exit functions for R3Di and SBZ Connor McAdams
2018-05-05 19:03 ` [PATCH v3 5/9] ALSA: hda/ca0132: add/change helper " Connor McAdams
2018-05-07  2:29   ` Takashi Sakamoto
2018-05-07 13:55     ` Connor McAdams
2018-05-05 19:03 ` [PATCH v3 6/9] ALSA: hda/ca0132: add alt_select_in/out for R3Di + SBZ Connor McAdams
2018-05-07  3:01   ` Takashi Sakamoto [this message]
2018-05-05 19:03 ` [PATCH v3 7/9] ALSA: hda/ca0132: Add DSP Volume set and New mixers for SBZ + R3Di Connor McAdams
2018-05-05 19:03 ` [PATCH v3 8/9] ALSA: hda/ca0132: add ca0132_alt_set_vipsource Connor McAdams
2018-05-05 19:03 ` [PATCH v3 9/9] ALSA: hda/ca0132: Add new control changes for SBZ + R3Di Connor McAdams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d0154fa-2a98-4e3e-12ae-ff0472c6eb91@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=conmanx360@gmail.com \
    --cc=jeremy.lefaure@lse.epita.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --subject='Re: [PATCH v3 6/9] ALSA: hda/ca0132: add alt_select_in/out for R3Di + SBZ' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).