aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-25 23:17:19 +0200
committerMark Brown <broonie@kernel.org>2018-07-26 17:09:06 +0100
commitb5453e8ca311fdb6003c6583ad101d2b9131b994 (patch)
tree3a48b22ee89e5ee3bc7870ca4a89decd6e5d7ff6 /sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
parentASoC: doc: Replace open code with params_set_format() (diff)
downloadlinux-b5453e8ca311fdb6003c6583ad101d2b9131b994.tar.xz
linux-b5453e8ca311fdb6003c6583ad101d2b9131b994.zip
ASoC: intel: Fix snd_pcm_format_t handling
As sparse warns, the PCM format type can't be dealt as integer as found in Intel SST driver codes. Fix them in the following two ways: - The open code with snd_mask_set() and params->masks reference is replaced with params_set_format() - The rest codes with snd_mask_set(fmt, SNDRV_PCM_FORMAT_XXX) are replaced with the new helper, snd_mask_set_format(). Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c')
-rw-r--r--sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
index 92f5fb2ae0a3..a892b37eab7c 100644
--- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
@@ -307,7 +307,7 @@ static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
rate->min = rate->max = 48000;
channels->min = channels->max = 2;
snd_mask_none(fmt);
- snd_mask_set(fmt, SNDRV_PCM_FORMAT_S24_LE);
+ snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S24_LE);
} else if (!strcmp(fe_dai_link->name, "Kbl Audio DMIC cap")) {
if (params_channels(params) == 2 ||
DMIC_CH(dmic_constraints) == 2)
@@ -320,7 +320,7 @@ static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
* thus changing the mask here
*/
if (!strcmp(be_dai_link->name, "SSP0-Codec"))
- snd_mask_set(fmt, SNDRV_PCM_FORMAT_S16_LE);
+ snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
return 0;
}