aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/boards/bxt_rt298.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/intel/boards/bxt_rt298.c')
-rw-r--r--sound/soc/intel/boards/bxt_rt298.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/sound/soc/intel/boards/bxt_rt298.c b/sound/soc/intel/boards/bxt_rt298.c
index 1a68d043c803..0c3a3cbcb884 100644
--- a/sound/soc/intel/boards/bxt_rt298.c
+++ b/sound/soc/intel/boards/bxt_rt298.c
@@ -207,11 +207,11 @@ static const struct snd_soc_ops broxton_rt298_ops = {
207 .hw_params = broxton_rt298_hw_params, 207 .hw_params = broxton_rt298_hw_params,
208}; 208};
209 209
210static unsigned int rates[] = { 210static const unsigned int rates[] = {
211 48000, 211 48000,
212}; 212};
213 213
214static struct snd_pcm_hw_constraint_list constraints_rates = { 214static const struct snd_pcm_hw_constraint_list constraints_rates = {
215 .count = ARRAY_SIZE(rates), 215 .count = ARRAY_SIZE(rates),
216 .list = rates, 216 .list = rates,
217 .mask = 0, 217 .mask = 0,
@@ -222,19 +222,16 @@ static int broxton_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
222{ 222{
223 struct snd_interval *channels = hw_param_interval(params, 223 struct snd_interval *channels = hw_param_interval(params,
224 SNDRV_PCM_HW_PARAM_CHANNELS); 224 SNDRV_PCM_HW_PARAM_CHANNELS);
225 if (params_channels(params) == 2) 225 channels->min = channels->max = 4;
226 channels->min = channels->max = 2;
227 else
228 channels->min = channels->max = 4;
229 226
230 return 0; 227 return 0;
231} 228}
232 229
233static unsigned int channels_dmic[] = { 230static const unsigned int channels_dmic[] = {
234 2, 4, 231 1, 2, 3, 4,
235}; 232};
236 233
237static struct snd_pcm_hw_constraint_list constraints_dmic_channels = { 234static const struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
238 .count = ARRAY_SIZE(channels_dmic), 235 .count = ARRAY_SIZE(channels_dmic),
239 .list = channels_dmic, 236 .list = channels_dmic,
240 .mask = 0, 237 .mask = 0,
@@ -256,11 +253,11 @@ static const struct snd_soc_ops broxton_dmic_ops = {
256 .startup = broxton_dmic_startup, 253 .startup = broxton_dmic_startup,
257}; 254};
258 255
259static unsigned int channels[] = { 256static const unsigned int channels[] = {
260 2, 257 2,
261}; 258};
262 259
263static struct snd_pcm_hw_constraint_list constraints_channels = { 260static const struct snd_pcm_hw_constraint_list constraints_channels = {
264 .count = ARRAY_SIZE(channels), 261 .count = ARRAY_SIZE(channels),
265 .list = channels, 262 .list = channels,
266 .mask = 0, 263 .mask = 0,