aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/s3c24xx/s3c-i2s-v2.c
diff options
context:
space:
mode:
authorJassi Brar <jassi.brar@samsung.com>2010-04-27 02:56:27 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-05-05 10:11:29 -0400
commitce76f9fd34d4d39fbda330f14b327273551e2f54 (patch)
tree659dcd028e1ee8cef947fcc2ad82dc8ff0e604bb /sound/soc/s3c24xx/s3c-i2s-v2.c
parentb720d56294187ea4167a20e59c4ea0bb4f064132 (diff)
ASoC: S3C2412: I2S: Debug IMS field
The IMS field of s3c2412/13 is essentially the same as that of s3c64xx. That is, the IISMOD[11] bit decides Master/Slave mode and IISMOD[10] bit selects source clock for signal generation. For that reason, remove improper defines for IISMOD[11:10] field mask and define two 1bit fields that can be set independent of each other. As a consequence, corresponding fields for PLAT_S3C64XX too get to use these new defines. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Acked-by: Ben Dooks <ben-linux@fluff.org> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/s3c24xx/s3c-i2s-v2.c')
-rw-r--r--sound/soc/s3c24xx/s3c-i2s-v2.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.c b/sound/soc/s3c24xx/s3c-i2s-v2.c
index cb3652ed057d..b8803a182cc1 100644
--- a/sound/soc/s3c24xx/s3c-i2s-v2.c
+++ b/sound/soc/s3c24xx/s3c-i2s-v2.c
@@ -265,35 +265,14 @@ static int s3c2412_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
265 iismod = readl(i2s->regs + S3C2412_IISMOD); 265 iismod = readl(i2s->regs + S3C2412_IISMOD);
266 pr_debug("hw_params r: IISMOD: %x \n", iismod); 266 pr_debug("hw_params r: IISMOD: %x \n", iismod);
267 267
268#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413)
269#define IISMOD_MASTER_MASK S3C2412_IISMOD_MASTER_MASK
270#define IISMOD_SLAVE S3C2412_IISMOD_SLAVE
271#define IISMOD_MASTER S3C2412_IISMOD_MASTER_INTERNAL
272#endif
273
274#if defined(CONFIG_PLAT_S3C64XX)
275/* From Rev1.1 datasheet, we have two master and two slave modes:
276 * IMS[11:10]:
277 * 00 = master mode, fed from PCLK
278 * 01 = master mode, fed from CLKAUDIO
279 * 10 = slave mode, using PCLK
280 * 11 = slave mode, using I2SCLK
281 */
282#define IISMOD_MASTER_MASK (1 << 11)
283#define IISMOD_SLAVE (1 << 11)
284#define IISMOD_MASTER (0 << 11)
285#endif
286
287 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { 268 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
288 case SND_SOC_DAIFMT_CBM_CFM: 269 case SND_SOC_DAIFMT_CBM_CFM:
289 i2s->master = 0; 270 i2s->master = 0;
290 iismod &= ~IISMOD_MASTER_MASK; 271 iismod |= S3C2412_IISMOD_SLAVE;
291 iismod |= IISMOD_SLAVE;
292 break; 272 break;
293 case SND_SOC_DAIFMT_CBS_CFS: 273 case SND_SOC_DAIFMT_CBS_CFS:
294 i2s->master = 1; 274 i2s->master = 1;
295 iismod &= ~IISMOD_MASTER_MASK; 275 iismod &= ~S3C2412_IISMOD_SLAVE;
296 iismod |= IISMOD_MASTER;
297 break; 276 break;
298 default: 277 default:
299 pr_err("unknwon master/slave format\n"); 278 pr_err("unknwon master/slave format\n");