[alsa-devel] [PATCH 1/7] ALSA: CA0132: Add new definitions ready for DSP routines

Takashi Iwai tiwai at suse.de
Mon Dec 10 10:18:03 CET 2012


At Fri, 7 Dec 2012 21:35:57 -0800,
Ian Minett wrote:
> 
> +struct ct_effect {
> +	char name[44];
> +	hda_nid_t nid;
> +	int mid; /*effect module ID*/
> +	int reqs[EFFECT_VALS_MAX_COUNT]; /*effect module request*/
> +	int direct; /* 0:output; 1:input*/
> +	int params; /* number of default non-on/off params */
> +	/*effect default values, 1st is on/off. */
> +	unsigned int def_vals[EFFECT_VALS_MAX_COUNT];
> +};
> +
> +static struct ct_effect ca0132_effects[EFFECTS_COUNT] = {
> +	{ "Surround",
> +		SURROUND,
> +		0x96,
> +		{0, 1},
> +		0,
> +		1,
> +		{0x3F800000, 0x3F2B851F}

Please use C99 style initialization.  It makes the code a bit longer
but it improves the readability very much.

Also, for the parameter direct, use a literal instead of 0/1.

Ditto for other structs likect_tuning_ctl, ca0132_voicefx, and
ct_voicefx_preset.


thanks,

Takashi




More information about the Alsa-devel mailing list