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

Commit aa4ef01d authored by Philipp Zabel's avatar Philipp Zabel Committed by Mark Brown
Browse files

ASoC: Use network mode with 2 slots for 16-bit stereo in pxa-ssp/Zylonite



For consistency with 24-bit and 32-bit modes, don't send 16-bit stereo
in one 32-bit transfer. Use 2 slots instead on Zylonite. It should result
in exactly the same behaviour.
Now it is possible to use 16-bit single slot transfers in pxa-ssp, which
are needed for Magician to get two frame clock pulses per sample
(one for each channel).

Signed-off-by: default avatarPhilipp Zabel <philipp.zabel@gmail.com>
Tested-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent ef9e5e5c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -644,8 +644,7 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream,
			sscr0 |= SSCR0_FPCKE;
#endif
		sscr0 |= SSCR0_DataSize(16);
		if (params_channels(params) > 1)
			sscr0 |= SSCR0_EDSS;
		/* use network mode (2 slots) for 16 bit stereo */
		break;
	case SNDRV_PCM_FORMAT_S24_LE:
		sscr0 |= (SSCR0_EDSS | SSCR0_DataSize(8));
+5 −2
Original line number Diff line number Diff line
@@ -127,7 +127,10 @@ static int zylonite_voice_hw_params(struct snd_pcm_substream *substream,
	if (ret < 0)
		return ret;

	/* We're not really in network mode but the emulation wants this. */
	/* Use network mode for stereo, one slot per channel. */
	if (params_channels(params) > 1)
		ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0x3, 2);
	else
		ret = snd_soc_dai_set_tdm_slot(cpu_dai, 1, 1);
	if (ret < 0)
		return ret;