forked from luck/tmp_suning_uos_patched
b67f448729
Adds driver support for the two instances of McASP on TI's DM646x. The multichannel audio serial port (McASP) functions as a general-purpose audio serial port optimized for the needs of multichannel audio application. (http://www.ti.com/litv/pdf/spruer1b). There are two instances of McASP on DM646x. The McASP0 module includes up to 4 serializers that can be individually enabled to either transmit or receive in different modes. The McASP1 module is limited with only 1 pinned-out serializer that can be enabled to only transmit in DIT mode (neither receiving in any mode nor transmitting in either Burst or TDM mode is supported). McASP0 consists of transmit and receive sections that may operate synchronized, or completely independently with separate master clocks, bit clocks, and frame syncs, and using different transmit modes with different bit-stream formats. Signed-off-by: Steve Chen <schen@mvista.com> Signed-off-by: Pavel Kiryukhin <pkiryukhin@ru.mvista.com> Signed-off-by: Naresh Medisetty <naresh@ti.com> Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
56 lines
1.3 KiB
C
56 lines
1.3 KiB
C
/*
|
|
* ALSA SoC McASP Audio Layer for TI DAVINCI processor
|
|
*
|
|
* MCASP related definitions
|
|
*
|
|
* Author: Nirmal Pandey <n-pandey@ti.com>,
|
|
* Suresh Rajashekara <suresh.r@ti.com>
|
|
* Steve Chen <schen@.mvista.com>
|
|
*
|
|
* Copyright: (C) 2009 MontaVista Software, Inc., <source@mvista.com>
|
|
* Copyright: (C) 2009 Texas Instruments, India
|
|
*
|
|
* 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 DAVINCI_MCASP_H
|
|
#define DAVINCI_MCASP_H
|
|
|
|
#include <linux/io.h>
|
|
#include <mach/asp.h>
|
|
#include "davinci-pcm.h"
|
|
|
|
extern struct snd_soc_dai davinci_mcasp_dai[];
|
|
|
|
#define DAVINCI_MCASP_RATES SNDRV_PCM_RATE_8000_96000
|
|
#define DAVINCI_MCASP_I2S_DAI 0
|
|
#define DAVINCI_MCASP_DIT_DAI 1
|
|
|
|
enum {
|
|
DAVINCI_AUDIO_WORD_8 = 0,
|
|
DAVINCI_AUDIO_WORD_12,
|
|
DAVINCI_AUDIO_WORD_16,
|
|
DAVINCI_AUDIO_WORD_20,
|
|
DAVINCI_AUDIO_WORD_24,
|
|
DAVINCI_AUDIO_WORD_32,
|
|
DAVINCI_AUDIO_WORD_28, /* This is only valid for McASP */
|
|
};
|
|
|
|
struct davinci_audio_dev {
|
|
void __iomem *base;
|
|
int sample_rate;
|
|
struct clk *clk;
|
|
struct davinci_pcm_dma_params *dma_params[2];
|
|
unsigned int codec_fmt;
|
|
|
|
/* McASP specific data */
|
|
int tdm_slots;
|
|
u8 op_mode;
|
|
u8 num_serializer;
|
|
u8 *serial_dir;
|
|
};
|
|
|
|
#endif /* DAVINCI_MCASP_H */
|