diff options
author | Shengjiu Wang <shengjiu.wang@freescale.com> | 2017-06-19 18:36:50 +0800 |
---|---|---|
committer | Shengjiu Wang <shengjiu.wang@freescale.com> | 2017-06-19 18:49:05 +0800 |
commit | 037051e60f3b29fb09aae6f2c97a3532482dfc2a (patch) | |
tree | 938afa9fee6e71176e6e49864b3835dc48994ed2 /sound | |
parent | bc2b893a489f50378ae7bce846a2e7b0feb9d463 (diff) |
MLK-15104: ASoC: imx-sii902: add constraint for channels
The maximum channel supported by sii902 is 2, but machine
driver use dummy codec, and there is no constraint list
from codec, so add constraint directly in machine driver.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/fsl/imx-sii902x.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/fsl/imx-sii902x.c b/sound/soc/fsl/imx-sii902x.c index f66ecf59c016..b9059920415f 100644 --- a/sound/soc/fsl/imx-sii902x.c +++ b/sound/soc/fsl/imx-sii902x.c @@ -65,6 +65,11 @@ static int imx_sii902x_startup(struct snd_pcm_substream *substream) if (ret) return ret; + ret = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_CHANNELS, + 1, 2); + if (ret) + return ret; + return 0; } |