[alsa-devel] [PATCH v3] ASoC: intel: Add Broadwell rt5650 machine driver

Takashi Iwai tiwai at suse.de
Fri Dec 6 16:45:32 CET 2019


On Fri, 06 Dec 2019 16:31:20 +0100,
Pierre-Louis Bossart wrote:
> 
> 
> 
> On 12/5/19 7:34 PM, Curtis Malainey wrote:
> > From: Ben Zhang <benzh at chromium.org>
> >
> > Add machine driver for Broadwell + rt5650.
> >
> > Signed-off-by: Bard Liao <bardliao at realtek.com>
> > Signed-off-by: Ben Zhang <benzh at chromium.org>
> > Signed-off-by: Mac Chiang <mac.chiang at intel.com>
> > Signed-off-by: Jon Flatley <jflat at chromium.org>
> > Signed-off-by: Curtis Malainey <cujomalainey at chromium.org>
> 
> sounds good, but it'd be nice to fix the Sparse warning below
> 
> bdw-rt5650.c:102:37: warning: incorrect type in argument 2 (different
> base types)
> bdw-rt5650.c:102:37:    expected unsigned int val
> bdw-rt5650.c:102:37:    got restricted snd_pcm_format_t [usertype]
> 
> We introduced a new function to deal with this, can't recall off the
> top of my head.

It's snd_mask_set_format().  The open code in this patch

	snd_mask_set(&params->masks[SNDRV_PCM_HW_PARAM_FORMAT -
				    SNDRV_PCM_HW_PARAM_FIRST_MASK],
				    SNDRV_PCM_FORMAT_S24_LE);

is replaced with

	snd_mask_set_format(hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT),
			    SNDRV_PCM_FORMAT_S24_LE);


Takashi


More information about the Alsa-devel mailing list