ASoC: amd: dma driver changes for bt i2s instance
With in ACP, There are three I2S controllers can be configured/enabled ( I2S SP, I2S MICSP, I2S BT). Default enabled I2S controller instance is I2S SP. This patch provides required changes to support I2S BT controller Instance. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:

committed by
Mark Brown

orang tua
839a12c799
melakukan
ccfbb4f572
@@ -13,6 +13,8 @@
|
||||
/* Playback and Capture Offset for Stoney */
|
||||
#define ACP_ST_PLAYBACK_PTE_OFFSET 0x04
|
||||
#define ACP_ST_CAPTURE_PTE_OFFSET 0x00
|
||||
#define ACP_ST_BT_PLAYBACK_PTE_OFFSET 0x08
|
||||
#define ACP_ST_BT_CAPTURE_PTE_OFFSET 0x0c
|
||||
|
||||
#define ACP_GARLIC_CNTL_DEFAULT 0x00000FB4
|
||||
#define ACP_ONION_CNTL_DEFAULT 0x00000FB4
|
||||
@@ -46,8 +48,13 @@
|
||||
|
||||
#define TO_ACP_I2S_1 0x2
|
||||
#define TO_ACP_I2S_2 0x4
|
||||
#define TO_BLUETOOTH 0x3
|
||||
#define FROM_ACP_I2S_1 0xa
|
||||
#define FROM_ACP_I2S_2 0xb
|
||||
#define FROM_BLUETOOTH 0xb
|
||||
|
||||
#define I2S_SP_INSTANCE 0x01
|
||||
#define I2S_BT_INSTANCE 0x02
|
||||
|
||||
#define ACP_TILE_ON_MASK 0x03
|
||||
#define ACP_TILE_OFF_MASK 0x02
|
||||
@@ -68,6 +75,14 @@
|
||||
#define ACP_TO_SYSRAM_CH_NUM 14
|
||||
#define I2S_TO_ACP_DMA_CH_NUM 15
|
||||
|
||||
/* Playback DMA Channels for I2S BT instance */
|
||||
#define SYSRAM_TO_ACP_BT_INSTANCE_CH_NUM 8
|
||||
#define ACP_TO_I2S_DMA_BT_INSTANCE_CH_NUM 9
|
||||
|
||||
/* Capture DMA Channels for I2S BT Instance */
|
||||
#define ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM 10
|
||||
#define I2S_TO_ACP_DMA_BT_INSTANCE_CH_NUM 11
|
||||
|
||||
#define NUM_DSCRS_PER_CHANNEL 2
|
||||
|
||||
#define PLAYBACK_START_DMA_DESCR_CH12 0
|
||||
@@ -80,9 +95,23 @@
|
||||
#define CAPTURE_START_DMA_DESCR_CH15 6
|
||||
#define CAPTURE_END_DMA_DESCR_CH15 7
|
||||
|
||||
/* I2S BT Instance DMA Descriptors */
|
||||
#define PLAYBACK_START_DMA_DESCR_CH8 8
|
||||
#define PLAYBACK_END_DMA_DESCR_CH8 9
|
||||
#define PLAYBACK_START_DMA_DESCR_CH9 10
|
||||
#define PLAYBACK_END_DMA_DESCR_CH9 11
|
||||
|
||||
#define CAPTURE_START_DMA_DESCR_CH10 12
|
||||
#define CAPTURE_END_DMA_DESCR_CH10 13
|
||||
#define CAPTURE_START_DMA_DESCR_CH11 14
|
||||
#define CAPTURE_END_DMA_DESCR_CH11 15
|
||||
|
||||
#define mmACP_I2S_16BIT_RESOLUTION_EN 0x5209
|
||||
#define ACP_I2S_MIC_16BIT_RESOLUTION_EN 0x01
|
||||
#define ACP_I2S_SP_16BIT_RESOLUTION_EN 0x02
|
||||
#define ACP_I2S_BT_16BIT_RESOLUTION_EN 0x04
|
||||
#define ACP_BT_UART_PAD_SELECT_MASK 0x1
|
||||
|
||||
enum acp_dma_priority_level {
|
||||
/* 0x0 Specifies the DMA channel is given normal priority */
|
||||
ACP_DMA_PRIORITY_LEVEL_NORMAL = 0x0,
|
||||
@@ -95,6 +124,7 @@ struct audio_substream_data {
|
||||
struct page *pg;
|
||||
unsigned int order;
|
||||
u16 num_of_pages;
|
||||
u16 i2s_instance;
|
||||
u16 direction;
|
||||
u16 ch1;
|
||||
u16 ch2;
|
||||
@@ -113,10 +143,20 @@ struct audio_substream_data {
|
||||
struct audio_drv_data {
|
||||
struct snd_pcm_substream *play_i2ssp_stream;
|
||||
struct snd_pcm_substream *capture_i2ssp_stream;
|
||||
struct snd_pcm_substream *play_i2sbt_stream;
|
||||
struct snd_pcm_substream *capture_i2sbt_stream;
|
||||
void __iomem *acp_mmio;
|
||||
u32 asic_type;
|
||||
};
|
||||
|
||||
/*
|
||||
* this structure used for platform data transfer between machine driver
|
||||
* and dma driver
|
||||
*/
|
||||
struct acp_platform_info {
|
||||
u16 i2s_instance;
|
||||
};
|
||||
|
||||
union acp_dma_count {
|
||||
struct {
|
||||
u32 low;
|
||||
|
Reference in New Issue
Block a user