aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Zabel <philipp.zabel@gmail.com>2009-03-03 10:10:51 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-03-03 10:54:11 -0500
commitaa4ef01de5f2e7ed948b88f9f1cfc93c8e0c3f25 (patch)
treec884e8e6554d5cd9684b0a9c4852c853ade6f5ed
parentef9e5e5c31cb2c6254760611289ac13e4e41b964 (diff)
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: Philipp Zabel <philipp.zabel@gmail.com> Tested-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/pxa/pxa-ssp.c3
-rw-r--r--sound/soc/pxa/zylonite.c7
2 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index 4a973ab710be..c49bb12b0a65 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -644,8 +644,7 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream,
644 sscr0 |= SSCR0_FPCKE; 644 sscr0 |= SSCR0_FPCKE;
645#endif 645#endif
646 sscr0 |= SSCR0_DataSize(16); 646 sscr0 |= SSCR0_DataSize(16);
647 if (params_channels(params) > 1) 647 /* use network mode (2 slots) for 16 bit stereo */
648 sscr0 |= SSCR0_EDSS;
649 break; 648 break;
650 case SNDRV_PCM_FORMAT_S24_LE: 649 case SNDRV_PCM_FORMAT_S24_LE:
651 sscr0 |= (SSCR0_EDSS | SSCR0_DataSize(8)); 650 sscr0 |= (SSCR0_EDSS | SSCR0_DataSize(8));
diff --git a/sound/soc/pxa/zylonite.c b/sound/soc/pxa/zylonite.c
index 0140a250db24..9f6116edbb84 100644
--- a/sound/soc/pxa/zylonite.c
+++ b/sound/soc/pxa/zylonite.c
@@ -127,8 +127,11 @@ static int zylonite_voice_hw_params(struct snd_pcm_substream *substream,
127 if (ret < 0) 127 if (ret < 0)
128 return ret; 128 return ret;
129 129
130 /* We're not really in network mode but the emulation wants this. */ 130 /* Use network mode for stereo, one slot per channel. */
131 ret = snd_soc_dai_set_tdm_slot(cpu_dai, 1, 1); 131 if (params_channels(params) > 1)
132 ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0x3, 2);
133 else
134 ret = snd_soc_dai_set_tdm_slot(cpu_dai, 1, 1);
132 if (ret < 0) 135 if (ret < 0)
133 return ret; 136 return ret;
134 137