kirkwood-i2s.c (f01387d2693813eb5271a3448e6a082322c7d75d) kirkwood-i2s.c (52b896cfef00289b5966b9b0e22b865511238216)
1/*
2 * kirkwood-i2s.c
3 *
4 * (c) 2010 Arnaud Patard <apatard@mandriva.com>
5 * (c) 2010 Arnaud Patard <arnaud.patard@rtp-net.org>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 308 unchanged lines hidden (view full) ---

317 case SNDRV_PCM_TRIGGER_START:
318 /* configure */
319 ctl = priv->ctl_rec;
320 if (dai->id == 0)
321 ctl &= ~KIRKWOOD_RECCTL_SPDIF_EN; /* i2s */
322 else
323 ctl &= ~KIRKWOOD_RECCTL_I2S_EN; /* spdif */
324
1/*
2 * kirkwood-i2s.c
3 *
4 * (c) 2010 Arnaud Patard <apatard@mandriva.com>
5 * (c) 2010 Arnaud Patard <arnaud.patard@rtp-net.org>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 308 unchanged lines hidden (view full) ---

317 case SNDRV_PCM_TRIGGER_START:
318 /* configure */
319 ctl = priv->ctl_rec;
320 if (dai->id == 0)
321 ctl &= ~KIRKWOOD_RECCTL_SPDIF_EN; /* i2s */
322 else
323 ctl &= ~KIRKWOOD_RECCTL_I2S_EN; /* spdif */
324
325 value = ctl & ~(KIRKWOOD_RECCTL_I2S_EN |
326 KIRKWOOD_RECCTL_SPDIF_EN);
325 value = ctl & ~KIRKWOOD_RECCTL_ENABLE_MASK;
327 writel(value, priv->io + KIRKWOOD_RECCTL);
328
329 /* enable interrupts */
330 value = readl(priv->io + KIRKWOOD_INT_MASK);
331 value |= KIRKWOOD_INT_CAUSE_REC_BYTES;
332 writel(value, priv->io + KIRKWOOD_INT_MASK);
333
334 /* enable record */

--- 7 unchanged lines hidden (view full) ---

342 writel(value, priv->io + KIRKWOOD_RECCTL);
343
344 value = readl(priv->io + KIRKWOOD_INT_MASK);
345 value &= ~KIRKWOOD_INT_CAUSE_REC_BYTES;
346 writel(value, priv->io + KIRKWOOD_INT_MASK);
347
348 /* disable all records */
349 value = readl(priv->io + KIRKWOOD_RECCTL);
326 writel(value, priv->io + KIRKWOOD_RECCTL);
327
328 /* enable interrupts */
329 value = readl(priv->io + KIRKWOOD_INT_MASK);
330 value |= KIRKWOOD_INT_CAUSE_REC_BYTES;
331 writel(value, priv->io + KIRKWOOD_INT_MASK);
332
333 /* enable record */

--- 7 unchanged lines hidden (view full) ---

341 writel(value, priv->io + KIRKWOOD_RECCTL);
342
343 value = readl(priv->io + KIRKWOOD_INT_MASK);
344 value &= ~KIRKWOOD_INT_CAUSE_REC_BYTES;
345 writel(value, priv->io + KIRKWOOD_INT_MASK);
346
347 /* disable all records */
348 value = readl(priv->io + KIRKWOOD_RECCTL);
350 value &= ~(KIRKWOOD_RECCTL_I2S_EN | KIRKWOOD_RECCTL_SPDIF_EN);
349 value &= ~KIRKWOOD_RECCTL_ENABLE_MASK;
351 writel(value, priv->io + KIRKWOOD_RECCTL);
352 break;
353
354 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
355 case SNDRV_PCM_TRIGGER_SUSPEND:
356 value = readl(priv->io + KIRKWOOD_RECCTL);
357 value |= KIRKWOOD_RECCTL_PAUSE | KIRKWOOD_RECCTL_MUTE;
358 writel(value, priv->io + KIRKWOOD_RECCTL);

--- 47 unchanged lines hidden (view full) ---

406 writel(reg_data, priv->io + 0x1200);
407
408 /* disable playback/record */
409 value = readl(priv->io + KIRKWOOD_PLAYCTL);
410 value &= ~KIRKWOOD_PLAYCTL_ENABLE_MASK;
411 writel(value, priv->io + KIRKWOOD_PLAYCTL);
412
413 value = readl(priv->io + KIRKWOOD_RECCTL);
350 writel(value, priv->io + KIRKWOOD_RECCTL);
351 break;
352
353 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
354 case SNDRV_PCM_TRIGGER_SUSPEND:
355 value = readl(priv->io + KIRKWOOD_RECCTL);
356 value |= KIRKWOOD_RECCTL_PAUSE | KIRKWOOD_RECCTL_MUTE;
357 writel(value, priv->io + KIRKWOOD_RECCTL);

--- 47 unchanged lines hidden (view full) ---

405 writel(reg_data, priv->io + 0x1200);
406
407 /* disable playback/record */
408 value = readl(priv->io + KIRKWOOD_PLAYCTL);
409 value &= ~KIRKWOOD_PLAYCTL_ENABLE_MASK;
410 writel(value, priv->io + KIRKWOOD_PLAYCTL);
411
412 value = readl(priv->io + KIRKWOOD_RECCTL);
414 value &= ~(KIRKWOOD_RECCTL_I2S_EN | KIRKWOOD_RECCTL_SPDIF_EN);
413 value &= ~KIRKWOOD_RECCTL_ENABLE_MASK;
415 writel(value, priv->io + KIRKWOOD_RECCTL);
416
417 return 0;
418
419}
420
421static const struct snd_soc_dai_ops kirkwood_i2s_dai_ops = {
422 .startup = kirkwood_i2s_startup,

--- 236 unchanged lines hidden ---
414 writel(value, priv->io + KIRKWOOD_RECCTL);
415
416 return 0;
417
418}
419
420static const struct snd_soc_dai_ops kirkwood_i2s_dai_ops = {
421 .startup = kirkwood_i2s_startup,

--- 236 unchanged lines hidden ---