summaryrefslogtreecommitdiff
path: root/sound/soc/ux500/ux500_msp_dai.h
diff options
context:
space:
mode:
authorMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>2010-10-19 20:27:15 +0200
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:04:42 +0200
commita2a3ec3bd918816e11a9631006cb60aae20596a6 (patch)
tree2e4cf1f8749c8464bf14c4b8f2ef4d5ded52a87c /sound/soc/ux500/ux500_msp_dai.h
parent533a9b55e5250c63fb6e1263b8c9f2f947e599e3 (diff)
sound: add asoc support for ux500 platform
This patch is based on the following work: cg29xx ASoc: The codec driver for cg29xx does now use the MFD driver for that chip. ST-Ericsson ID: 259 100 Author: Roger Nilsson <roger.xr.nilsson@stericsson.com> Ux500 ASoc: Added support for the DSP_A format. ST-Ericsson ID: 259 074 Author: Roger Nilsson <roger.xr.nilsson@stericsson.com> Ux500 ASoC: Added support for TDM. ST-Ericsson ID: 259 074 Author: Roger Nilsson <roger.xr.nilsson@stericsson.com> Ux500 ASoC: HDMI-driver in Ux500 ALSA SoC-driver. Author: Ola Lilja <ola.o.lilja@stericsson.com> Add a power management scheme for AB3550 and fix bugs that hinder simultaneous playback/capture. ST-Ericsson ID: WP 259100 Author: Xie Xiaolei <xie.xiaolei@stericsson.com> msp: add configuration param for MSP_IODLY ST-Ericsson ID: CR261462 Author: Rabin Vincent <rabin.vincent@stericsson.com> sound: asoc: Added codec and machine drivers for cg29xx. Author: Ola Lilja <ola.o.lilja@stericsson.com> Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Diffstat (limited to 'sound/soc/ux500/ux500_msp_dai.h')
-rw-r--r--sound/soc/ux500/ux500_msp_dai.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/sound/soc/ux500/ux500_msp_dai.h b/sound/soc/ux500/ux500_msp_dai.h
new file mode 100644
index 00000000000..0ad8b380318
--- /dev/null
+++ b/sound/soc/ux500/ux500_msp_dai.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) ST-Ericsson SA 2010
+ *
+ * Author: Ola Lilja ola.o.lilja@stericsson.com,
+ * Roger Nilsson roger.xr.nilsson@stericsson.com
+ * for ST-Ericsson.
+ *
+ * License terms:
+ *
+ * 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 UX500_msp_dai_H
+#define UX500_msp_dai_H
+
+#include <linux/types.h>
+#include <linux/spinlock.h>
+#include <linux/i2s/i2s.h>
+
+#define UX500_NBR_OF_DAI 3
+
+#define UX500_I2S_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | \
+ SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000)
+
+#define UX500_I2S_FORMATS (SNDRV_PCM_FMTBIT_S16_LE)
+
+#define FRAME_PER_SINGLE_SLOT_8_KHZ 31
+#define FRAME_PER_SINGLE_SLOT_16_KHZ 124
+#define FRAME_PER_SINGLE_SLOT_44_1_KHZ 63
+#define FRAME_PER_SINGLE_SLOT_48_KHZ 49
+#define FRAME_PER_2_SLOTS 31
+#define FRAME_PER_8_SLOTS 138
+#define FRAME_PER_16_SLOTS 277
+
+#define UX500_MSP_INTERNAL_CLOCK_FREQ 40000000;
+#define UX500_MSP_MIN_CHANNELS 1
+#define UX500_MSP_MAX_CHANNELS 8
+
+struct ux500_msp_dai_private {
+ spinlock_t lock;
+ struct i2s_device *i2s;
+ unsigned int fmt;
+ unsigned int tx_mask;
+ unsigned int rx_mask;
+ int slots;
+ int slot_width;
+};
+
+extern struct snd_soc_dai ux500_msp_dai[UX500_NBR_OF_DAI];
+
+int ux500_msp_dai_i2s_send_data(void *data, size_t bytes, int dai_idx);
+int ux500_msp_dai_i2s_receive_data(void *data, size_t bytes, int dai_idx);
+
+#endif