ASoC: Intel: kbl_da7219_max98357a: rename shadowed variable
Fix cppcheck warning: [sound/soc/intel/boards/kbl_da7219_max98357a.c:257] -> [sound/soc/intel/boards/kbl_da7219_max98357a.c:144]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/kbl_da7219_max98357a.c:257] -> [sound/soc/intel/boards/kbl_da7219_max98357a.c:308]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
988b414775
commit
2e539cf72a
|
@ -141,13 +141,13 @@ static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
|
|||
{
|
||||
struct snd_interval *rate = hw_param_interval(params,
|
||||
SNDRV_PCM_HW_PARAM_RATE);
|
||||
struct snd_interval *channels = hw_param_interval(params,
|
||||
struct snd_interval *chan = hw_param_interval(params,
|
||||
SNDRV_PCM_HW_PARAM_CHANNELS);
|
||||
struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
|
||||
|
||||
/* The ADSP will convert the FE rate to 48k, stereo */
|
||||
rate->min = rate->max = 48000;
|
||||
channels->min = channels->max = DUAL_CHANNEL;
|
||||
chan->min = chan->max = DUAL_CHANNEL;
|
||||
|
||||
/* set SSP to 24 bit */
|
||||
snd_mask_none(fmt);
|
||||
|
@ -305,7 +305,7 @@ static const struct snd_soc_ops kabylake_da7219_fe_ops = {
|
|||
static int kabylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
|
||||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
struct snd_interval *channels = hw_param_interval(params,
|
||||
struct snd_interval *chan = hw_param_interval(params,
|
||||
SNDRV_PCM_HW_PARAM_CHANNELS);
|
||||
|
||||
/*
|
||||
|
@ -313,9 +313,9 @@ static int kabylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
|
|||
*/
|
||||
|
||||
if (params_channels(params) == 2)
|
||||
channels->min = channels->max = 2;
|
||||
chan->min = chan->max = 2;
|
||||
else
|
||||
channels->min = channels->max = 4;
|
||||
chan->min = chan->max = 4;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue