linux_dsm_epyc7002/sound/soc/davinci/davinci-mcasp.h
Michal Bachraty d486fea6ba ASoC: davinci-mcasp: Add Support BCLK-to-LRCLK ratio for TDM modes
For TDM mode, BCLK-to-LCLK ratio is computed as (tdm_slots) x (word_length).
I2S mode is only subset of TDM mode with specific tdm_slots = 2 channels.
Also bclk_lrclk_ratio can be greater than 255, therefore u16 need to be used.

Signed-off-by: Michal Bachraty <michal.bachraty@streamunlimited.com>
Acked-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-23 14:50:30 +01:00

49 lines
1.1 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 <linux/platform_data/davinci_asp.h>
#include "davinci-pcm.h"
#define DAVINCI_MCASP_RATES SNDRV_PCM_RATE_8000_192000
#define DAVINCI_MCASP_I2S_DAI 0
#define DAVINCI_MCASP_DIT_DAI 1
struct davinci_audio_dev {
struct davinci_pcm_dma_params dma_params[2];
void __iomem *base;
struct device *dev;
/* McASP specific data */
int tdm_slots;
u8 op_mode;
u8 num_serializer;
u8 *serial_dir;
u8 version;
u16 bclk_lrclk_ratio;
/* McASP FIFO related */
u8 txnumevt;
u8 rxnumevt;
};
#endif /* DAVINCI_MCASP_H */