From 2d1cb6dd18319e08a39a5a96a37f400660729a34 Mon Sep 17 00:00:00 2001 From: Mian Yousaf Kaukab Date: Tue, 19 Oct 2010 20:27:15 +0200 Subject: 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 Ux500 ASoc: Added support for the DSP_A format. ST-Ericsson ID: 259 074 Author: Roger Nilsson Ux500 ASoC: Added support for TDM. ST-Ericsson ID: 259 074 Author: Roger Nilsson Ux500 ASoC: HDMI-driver in Ux500 ALSA SoC-driver. Author: Ola Lilja Add a power management scheme for AB3550 and fix bugs that hinder simultaneous playback/capture. ST-Ericsson ID: WP 259100 Author: Xie Xiaolei msp: add configuration param for MSP_IODLY ST-Ericsson ID: CR261462 Author: Rabin Vincent sound: asoc: Added codec and machine drivers for cg29xx. Author: Ola Lilja Signed-off-by: Mian Yousaf Kaukab --- sound/soc/ux500/ux500_msp_dai.h | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 sound/soc/ux500/ux500_msp_dai.h (limited to 'sound/soc/ux500/ux500_msp_dai.h') 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 +#include +#include + +#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 -- cgit v1.2.3