Re: [alsa-devel][PATCH v6] ASoC: TSCS42xx: Support Tempo Semiconductor's TSCS42xx audio CODECs

From: Charles Keepax
Date: Mon Dec 18 2017 - 04:51:23 EST


On Sat, Dec 16, 2017 at 09:54:50PM -0600, Steven Eckhoff wrote:
> Currently there is no support for TSCS42xx audio CODECs.
>
> Add support for TSCS42xx audio CODECs.
>
> Acked-by: Philippe Ombredanne <pombredanne@xxxxxxxx>
> Signed-off-by: Steven Eckhoff <steven.eckhoff.opensource@xxxxxxxxx>
> ---
> +/* D2S Input Select */
> +static char const * const d2s_input_select_text[] = {
> + "Line 1", "Line 2"
> +};
> +
> +static const struct soc_enum d2s_input_select_enum =
> +SOC_ENUM_SINGLE(R_INMODE, FB_INMODE_DS, ARRAY_SIZE(d2s_input_select_text),
> + d2s_input_select_text);
> +
> +static const struct snd_kcontrol_new d2s_input_mux =
> +SOC_DAPM_ENUM("D2S_IN_MUX", d2s_input_select_enum);
> +

Is this unused?

> +#define COEFF_RAM_CTL(xname, xcount, xhandler_get, xhandler_put, xaddr) \
> +{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
> + .info = bytes_info_ext, \
> + .get = xhandler_get, .put = xhandler_put, \

Given all users of this macro use coeff_ram_get and coeff_ram_put
might it just be worth sticking them in here?

> + .private_value = (unsigned long)&(struct coeff_ram_ctl) { \
> + .addr = xaddr, \
> + .bytes_ext = {.max = xcount, }, \
> + } \
> +}

Other than those two very minor comments, looks ok to me so I
think you can add:

Reviewed-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>

Thanks,
Charles