aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLori Hikichi <lori.hikichi@broadcom.com>2017-09-28 18:29:35 -0400
committerMark Brown <broonie@kernel.org>2017-10-04 06:59:37 -0400
commit934e4885cb958566a34124e5a1dad2f9212a8ec6 (patch)
treee9cecef8e3124e5408414d9ce35190880b0ebbd1
parentfcf30f3b4377d2475aa709ce28964461990c3caa (diff)
ASoC: cygnus: Remove support for 8 bit audio and for mono
These modes of operation were not working properly and it is unclear if the hardware could fully support these modes properly. There is little to be gained by enabling these modes, therefore, we will just remove support. Signed-off-by: Lori Hikichi <lori.hikichi@broadcom.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/bcm/cygnus-ssp.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/sound/soc/bcm/cygnus-ssp.c b/sound/soc/bcm/cygnus-ssp.c
index da14facb8a6f..cd8aef8ed8a5 100644
--- a/sound/soc/bcm/cygnus-ssp.c
+++ b/sound/soc/bcm/cygnus-ssp.c
@@ -655,23 +655,10 @@ static int cygnus_ssp_hw_params(struct snd_pcm_substream *substream,
655 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 655 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
656 value = readl(aio->cygaud->audio + aio->regs.bf_sourcech_cfg); 656 value = readl(aio->cygaud->audio + aio->regs.bf_sourcech_cfg);
657 value &= ~BIT(BF_SRC_CFGX_BUFFER_PAIR_ENABLE); 657 value &= ~BIT(BF_SRC_CFGX_BUFFER_PAIR_ENABLE);
658 /* Configure channels as mono or stereo/TDM */ 658 value &= ~BIT(BF_SRC_CFGX_SAMPLE_CH_MODE);
659 if (params_channels(params) == 1)
660 value |= BIT(BF_SRC_CFGX_SAMPLE_CH_MODE);
661 else
662 value &= ~BIT(BF_SRC_CFGX_SAMPLE_CH_MODE);
663 writel(value, aio->cygaud->audio + aio->regs.bf_sourcech_cfg); 659 writel(value, aio->cygaud->audio + aio->regs.bf_sourcech_cfg);
664 660
665 switch (params_format(params)) { 661 switch (params_format(params)) {
666 case SNDRV_PCM_FORMAT_S8:
667 if (aio->port_type == PORT_SPDIF) {
668 dev_err(aio->cygaud->dev,
669 "SPDIF does not support 8bit format\n");
670 return -EINVAL;
671 }
672 bitres = 8;
673 break;
674
675 case SNDRV_PCM_FORMAT_S16_LE: 662 case SNDRV_PCM_FORMAT_S16_LE:
676 bitres = 16; 663 bitres = 16;
677 break; 664 break;
@@ -1148,11 +1135,10 @@ static const struct snd_soc_dai_ops cygnus_spdif_dai_ops = {
1148#define INIT_CPU_DAI(num) { \ 1135#define INIT_CPU_DAI(num) { \
1149 .name = "cygnus-ssp" #num, \ 1136 .name = "cygnus-ssp" #num, \
1150 .playback = { \ 1137 .playback = { \
1151 .channels_min = 1, \ 1138 .channels_min = 2, \
1152 .channels_max = 16, \ 1139 .channels_max = 16, \
1153 .rates = SNDRV_PCM_RATE_KNOT, \ 1140 .rates = SNDRV_PCM_RATE_KNOT, \
1154 .formats = SNDRV_PCM_FMTBIT_S8 | \ 1141 .formats = SNDRV_PCM_FMTBIT_S16_LE | \
1155 SNDRV_PCM_FMTBIT_S16_LE | \
1156 SNDRV_PCM_FMTBIT_S32_LE, \ 1142 SNDRV_PCM_FMTBIT_S32_LE, \
1157 }, \ 1143 }, \
1158 .capture = { \ 1144 .capture = { \
@@ -1160,7 +1146,7 @@ static const struct snd_soc_dai_ops cygnus_spdif_dai_ops = {
1160 .channels_max = 16, \ 1146 .channels_max = 16, \
1161 .rates = SNDRV_PCM_RATE_KNOT, \ 1147 .rates = SNDRV_PCM_RATE_KNOT, \
1162 .formats = SNDRV_PCM_FMTBIT_S16_LE | \ 1148 .formats = SNDRV_PCM_FMTBIT_S16_LE | \
1163 SNDRV_PCM_FMTBIT_S32_LE, \ 1149 SNDRV_PCM_FMTBIT_S32_LE, \
1164 }, \ 1150 }, \
1165 .ops = &cygnus_ssp_dai_ops, \ 1151 .ops = &cygnus_ssp_dai_ops, \
1166 .suspend = cygnus_ssp_suspend, \ 1152 .suspend = cygnus_ssp_suspend, \