summaryrefslogtreecommitdiffstats
path: root/sound/soc/blackfin/bf5xx-i2s-pcm.h
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-05-28 19:22:14 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-05-30 12:33:40 +0100
commit8b5e2e396b589119bcc9c6a382a999e0202bae18 (patch)
treebc5057b3426563cace2ae075bfc2b5fa5ba37c11 /sound/soc/blackfin/bf5xx-i2s-pcm.h
parenta3935a29f68c261d31b41c896f95c9333b615abf (diff)
downloadblackbird-obmc-linux-8b5e2e396b589119bcc9c6a382a999e0202bae18.tar.gz
blackbird-obmc-linux-8b5e2e396b589119bcc9c6a382a999e0202bae18.zip
ASoC: blackfin: bf5xx-i2s: Add support for TDM mode
The bf5xx-i2s{,-pcm} and bf5xx-tdm{-pcm} drivers are nearly identical. Both are for the same hardware each supporting a slight different subset of the hardware. The bf5xx-i2s driver supports 2 channel I2S mode while the bf5xx-tdm driver supports TDM mode and channel remapping. This patch adds support for TDM mode and channel remapping to the bf5xx-i2s driver so that we'll eventually be able to retire the bf5xx-tdm driver. Unfortunately the hardware is fixed to using 8 channels in TDM mode. The bf5xx-tdm driver jumps through a few hoops to make it work well with other channel counts as well: * Don't support mmap * Translate between internal frame size (which is always 8 * sample_size) and ALSA frame size (which depends on the channel count) * Have special copy and silence callbacks which are aware of the mismatch between internal and ALSA frame size * Reduce the maximum buffer size to ensure that there is enough headroom for dummy data. The bf5xx-i2s driver is going to use the same mechanisms when being used int TDM mode. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/blackfin/bf5xx-i2s-pcm.h')
-rw-r--r--sound/soc/blackfin/bf5xx-i2s-pcm.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s-pcm.h b/sound/soc/blackfin/bf5xx-i2s-pcm.h
new file mode 100644
index 000000000000..1f0435249f88
--- /dev/null
+++ b/sound/soc/blackfin/bf5xx-i2s-pcm.h
@@ -0,0 +1,17 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef _BF5XX_TDM_PCM_H
+#define _BF5XX_TDM_PCM_H
+
+#define BFIN_TDM_DAI_MAX_SLOTS 8
+
+struct bf5xx_i2s_pcm_data {
+ unsigned int map[BFIN_TDM_DAI_MAX_SLOTS];
+ bool tdm_mode;
+};
+
+#endif
OpenPOWER on IntegriCloud