Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 934e4885 authored by Lori Hikichi's avatar Lori Hikichi Committed by Mark Brown
Browse files

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: default avatarLori Hikichi <lori.hikichi@broadcom.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent fcf30f3b
Loading
Loading
Loading
Loading
+4 −18
Original line number Diff line number Diff line
@@ -655,23 +655,10 @@ static int cygnus_ssp_hw_params(struct snd_pcm_substream *substream,
	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
		value = readl(aio->cygaud->audio + aio->regs.bf_sourcech_cfg);
		value &= ~BIT(BF_SRC_CFGX_BUFFER_PAIR_ENABLE);
		/* Configure channels as mono or stereo/TDM */
		if (params_channels(params) == 1)
			value |= BIT(BF_SRC_CFGX_SAMPLE_CH_MODE);
		else
		value &= ~BIT(BF_SRC_CFGX_SAMPLE_CH_MODE);
		writel(value, aio->cygaud->audio + aio->regs.bf_sourcech_cfg);

		switch (params_format(params)) {
		case SNDRV_PCM_FORMAT_S8:
			if (aio->port_type == PORT_SPDIF) {
				dev_err(aio->cygaud->dev,
				"SPDIF does not support 8bit format\n");
				return -EINVAL;
			}
			bitres = 8;
			break;

		case SNDRV_PCM_FORMAT_S16_LE:
			bitres = 16;
			break;
@@ -1148,11 +1135,10 @@ static const struct snd_soc_dai_ops cygnus_spdif_dai_ops = {
#define INIT_CPU_DAI(num) { \
	.name = "cygnus-ssp" #num, \
	.playback = { \
		.channels_min = 1, \
		.channels_min = 2, \
		.channels_max = 16, \
		.rates = SNDRV_PCM_RATE_KNOT, \
		.formats = SNDRV_PCM_FMTBIT_S8 | \
				SNDRV_PCM_FMTBIT_S16_LE | \
		.formats = SNDRV_PCM_FMTBIT_S16_LE | \
				SNDRV_PCM_FMTBIT_S32_LE, \
	}, \
	.capture = { \