Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/arch/xtensa/configs/rembrandt_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ CONFIG_FORMAT_CONVERT_HIFI3=n
CONFIG_LP_SRAM=n
Comment thread
maruthi-machani marked this conversation as resolved.
Resolved
CONFIG_HAVE_AGENT=n
CONFIG_COMP_VOLUME=n
CONFIG_COMP_BLOB=n
CONFIG_COMP_SRC=n
CONFIG_COMP_FIR=n
CONFIG_COMP_IIR=n
Expand All @@ -24,7 +23,6 @@ CONFIG_COMP_SWITCH=n
CONFIG_COMP_KPB=n
CONFIG_MAXIM_DSM=n
CONFIG_COMP_ASRC=n
CONFIG_COMP_MODULE_ADAPTER=n
CONFIG_COMP_IGO_NR=n
CONFIG_COMP_COPIER=n
CONFIG_COMP_RTNR=n
Expand Down
17 changes: 0 additions & 17 deletions src/drivers/amd/rembrandt/acp_hs_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,20 +200,3 @@ const struct dai_driver acp_hsdai_driver = {
.get_hw_params = hsdai_get_hw_params,
},
};

const struct dai_driver acp_hs_virtual_dai_driver = {
.type = SOF_DAI_AMD_HS_VIRTUAL,
.uid = SOF_UUID(hsdai_uuid),
.tctx = &hsdai_tr,
.dma_dev = DMA_DEV_HS_VIRTUAL,
.dma_caps = DMA_CAP_HS_VIRTUAL,
.ops = {
.trigger = hsdai_trigger,
.set_config = hsdai_set_config,
.probe = hsdai_probe,
.remove = hsdai_remove,
.get_fifo = hsdai_get_fifo,
.get_handshake = hsdai_get_handshake,
.get_hw_params = hsdai_get_hw_params,
},
};
16 changes: 0 additions & 16 deletions src/drivers/amd/rembrandt/acp_hs_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,19 +423,3 @@ const struct dma_ops acp_dai_hs_dma_ops = {
.get_attribute = acp_dai_hs_dma_get_attribute,
};

const struct dma_ops acp_dai_hs_virtual_dma_ops = {
.channel_get = acp_dai_hs_dma_channel_get,
.channel_put = acp_dai_hs_dma_channel_put,
.start = acp_dai_hs_dma_start,
.stop = acp_dai_hs_dma_stop,
.pause = acp_dai_hs_dma_pause,
.release = acp_dai_hs_dma_release,
.copy = acp_dai_hs_dma_copy,
.status = acp_dai_hs_dma_status,
.set_config = acp_dai_hs_dma_set_config,
.interrupt = acp_dai_hs_dma_interrupt,
.probe = acp_dai_hs_dma_probe,
.remove = acp_dai_hs_dma_remove,
.get_data_size = acp_dai_hs_dma_get_data_size,
.get_attribute = acp_dai_hs_dma_get_attribute,
};
16 changes: 0 additions & 16 deletions src/drivers/amd/renoir/acp_sp_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,20 +161,4 @@ const struct dai_driver acp_spdai_driver = {
},
};

const struct dai_driver acp_sp_virtual_dai_driver = {
.type = SOF_DAI_AMD_SP_VIRTUAL,
.uid = SOF_UUID(spdai_uuid),
.tctx = &spdai_tr,
.dma_dev = DMA_DEV_SP_VIRTUAL,
.dma_caps = DMA_CAP_SP_VIRTUAL,
.ops = {
.trigger = spdai_trigger,
.set_config = spdai_set_config,
.probe = spdai_probe,
.remove = spdai_remove,
.get_fifo = spdai_get_fifo,
.get_handshake = spdai_get_handshake,
.get_hw_params = spdai_get_hw_params,
},
};

16 changes: 0 additions & 16 deletions src/drivers/amd/renoir/acp_sp_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,19 +421,3 @@ const struct dma_ops acp_dai_sp_dma_ops = {
.get_attribute = acp_dai_sp_dma_get_attribute,
};

const struct dma_ops acp_dai_sp_virtual_dma_ops = {
.channel_get = acp_dai_sp_dma_channel_get,
.channel_put = acp_dai_sp_dma_channel_put,
.start = acp_dai_sp_dma_start,
.stop = acp_dai_sp_dma_stop,
.pause = acp_dai_sp_dma_pause,
.release = acp_dai_sp_dma_release,
.copy = acp_dai_sp_dma_copy,
.status = acp_dai_sp_dma_status,
.set_config = acp_dai_sp_dma_set_config,
.interrupt = acp_dai_sp_dma_interrupt,
.probe = acp_dai_sp_dma_probe,
.remove = acp_dai_sp_dma_remove,
.get_data_size = acp_dai_sp_dma_get_data_size,
.get_attribute = acp_dai_sp_dma_get_attribute,
};
6 changes: 3 additions & 3 deletions src/platform/amd/rembrandt/include/platform/lib/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
#define IRAM_SIZE 0x60000

#define DRAM0_BASE 0xE0000000
#define DRAM0_SIZE 0x7000
#define DRAM0_SIZE 0x10000
#define SRAM0_BASE 0x9FF00000

#define DRAM1_BASE 0xE0007000
#define DRAM1_SIZE 0x19000
#define DRAM1_BASE 0xE0010000
#define DRAM1_SIZE 0x10000
Comment thread
maruthi-machani marked this conversation as resolved.
Resolved
#define SRAM1_BASE 0x60006000
#define SRAM1_SIZE 0x13A000

Expand Down
12 changes: 1 addition & 11 deletions src/platform/amd/rembrandt/lib/dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ static struct dai hsdai[] = {
},
.drv = &acp_hsdai_driver,
},
};

static struct dai hs_virtual_dai[] = {
{
.index = 1,
.plat_data = {
Expand All @@ -71,7 +68,7 @@ static struct dai hs_virtual_dai[] = {
.handshake = 0,
},
},
.drv = &acp_hs_virtual_dai_driver,
.drv = &acp_hsdai_driver,
}
};

Expand Down Expand Up @@ -149,11 +146,6 @@ const struct dai_type_info dti[] = {
.dai_array = hsdai,
.num_dais = ARRAY_SIZE(hsdai)
},
{
.type = SOF_DAI_AMD_HS_VIRTUAL,
.dai_array = hs_virtual_dai,
.num_dais = ARRAY_SIZE(hs_virtual_dai)
},
#ifdef ACP_SP_ENABLE
{
.type = SOF_DAI_AMD_SP,
Expand Down Expand Up @@ -189,8 +181,6 @@ int dai_init(struct sof *sof)
k_spinlock_init(&acp_dmic_dai[i].lock);
for (i = 0; i < ARRAY_SIZE(hsdai); i++)
k_spinlock_init(&hsdai[i].lock);
for (i = 0; i < ARRAY_SIZE(hs_virtual_dai); i++)
k_spinlock_init(&hs_virtual_dai[i].lock);
#ifdef ACP_SP_ENABLE
for (i = 0; i < ARRAY_SIZE(spdai); i++)
k_spinlock_init(&spdai[i].lock);
Expand Down
16 changes: 0 additions & 16 deletions src/platform/amd/rembrandt/lib/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ extern struct dma_ops acp_dai_bt_dma_ops;
#endif
#ifdef ACP_SP_ENABLE
extern struct dma_ops acp_dai_sp_dma_ops;
extern struct dma_ops acp_dai_sp_virtual_dma_ops;
#endif
extern struct dma_ops acp_dai_hs_dma_ops;
extern struct dma_ops acp_dai_hs_virtual_dma_ops;

SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
{
Expand Down Expand Up @@ -65,20 +63,6 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
},
.ops = &acp_dai_hs_dma_ops,
},

{
.plat_data = {
.id = DMA_ID_DAI_HS_VIRTUAL,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_HS_VIRTUAL,
.caps = DMA_CAP_HS_VIRTUAL,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
.irq = IRQ_NUM_EXT_LEVEL5,
},
.ops = &acp_dai_hs_virtual_dma_ops,
},
#ifdef ACP_SP_ENABLE
{
.plat_data = {
Expand Down
41 changes: 15 additions & 26 deletions src/platform/amd/renoir/lib/dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,23 @@ static struct dai spdai[] = {
},
},
.drv = &acp_spdai_driver,
}
};

static struct dai sp_virtual_dai[] = {
},
{
.index = 1,
.plat_data = {
.base = DAI_BASE,
.fifo[SOF_IPC_STREAM_PLAYBACK] = {
.offset = DAI_BASE + BT_TX_FIFO_OFFST,
.depth = 8,
.handshake = 5,
},
.fifo[SOF_IPC_STREAM_CAPTURE] = {
.offset = DAI_BASE + BT_RX_FIFO_OFFST,
.depth = 8,
.handshake = 4,
},
.index = 1,
.plat_data = {
.base = DAI_BASE,
.fifo[SOF_IPC_STREAM_PLAYBACK] = {
.offset = DAI_BASE + BT_TX_FIFO_OFFST,
.depth = 8,
.handshake = 5,
},
.drv = &acp_sp_virtual_dai_driver,
.fifo[SOF_IPC_STREAM_CAPTURE] = {
.offset = DAI_BASE + BT_RX_FIFO_OFFST,
.depth = 8,
.handshake = 4,
},
},
.drv = &acp_spdai_driver,
}
};

Expand Down Expand Up @@ -108,11 +105,6 @@ const struct dai_type_info dti[] = {
.dai_array = spdai,
.num_dais = ARRAY_SIZE(spdai)
},
{
.type = SOF_DAI_AMD_SP_VIRTUAL,
.dai_array = sp_virtual_dai,
.num_dais = ARRAY_SIZE(sp_virtual_dai)
},
#ifdef ACP_BT_ENABLE
{
.type = SOF_DAI_AMD_BT,
Expand All @@ -136,9 +128,6 @@ int dai_init(struct sof *sof)
/* initialize spin locks early to enable ref counting */
for (i = 0; i < ARRAY_SIZE(spdai); i++)
k_spinlock_init(&spdai[i].lock);
/* initialize spin locks early to enable ref counting */
for (i = 0; i < ARRAY_SIZE(sp_virtual_dai); i++)
k_spinlock_init(&sp_virtual_dai[i].lock);
#ifdef ACP_BT_ENABLE
/* initialize spin locks early to enable ref counting */
for (i = 0; i < ARRAY_SIZE(btdai); i++)
Expand Down
1 change: 1 addition & 0 deletions src/platform/amd/renoir/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ int platform_init(struct sof *sof)
/* Init DMA platform domain */
sof->platform_dma_domain = dma_multi_chan_domain_init(&sof->dma_info->dma_array[0],
sizeof(sof->dma_info->dma_array), PLATFORM_DEFAULT_CLOCK, true);
sof->platform_dma_domain->full_sync = true;
scheduler_init_ll(sof->platform_dma_domain);
/* initialize the host IPC mechanisms */
ipc_init(sof);
Expand Down
8 changes: 4 additions & 4 deletions tools/topology/topology1/sof-acp-rmb-dmic4ch.m4
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4,
48000, 48000, 48000)

# playback DAI is ACPSP using 2 periods
DAI_ADD(sof/pipe-dai-playback.m4, 2, ACPHS_VIRTUAL, 1, acp-amp-codec,
DAI_ADD(sof/pipe-dai-playback.m4, 2, ACPHS, 1, acp-amp-codec,
PIPELINE_SOURCE_2, 2, s16le, 2000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA)

DAI_CONFIG(ACPHS_VIRTUAL, 1, 1, acp-amp-codec,
ACPHS_VIRTUAL_CONFIG(I2S, ACP_CLOCK(mclk, 49152000, codec_mclk_in),
DAI_CONFIG(ACPHS, 1, 1, acp-amp-codec,
ACPHS_CONFIG(I2S, ACP_CLOCK(mclk, 49152000, codec_mclk_in),
ACP_CLOCK(bclk, 3072000, codec_slave),
ACP_CLOCK(fsync, 48000, codec_slave),
ACP_TDM(2, 32, 3, 3),ACPHS_VIRTUAL_CONFIG_DATA(ACPHS_VIRTUAL, 1, 48000, 2, 0)))
ACP_TDM(2, 32, 3, 3),ACPHS_CONFIG_DATA(ACPHS, 1, 48000, 2, 0)))


# Capture pipeline 2 on PCM 0 using max 2 channels of s16le.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ define(PIPE_NAME, pipe-acp-mux)
VIRTUAL_WIDGET(ACPHS0 OUT, output, 0)
VIRTUAL_WIDGET(ACPHS0 IN, input, 1)
VIRTUAL_WIDGET(DMIC0 Capture, input, 2)
VIRTUAL_WIDGET(ACPHS_VIRTUAL1 OUT, output, 3)
VIRTUAL_WIDGET(ACPHS1 OUT, output, 3)
#
# Define the pipelines
#
Expand Down Expand Up @@ -84,16 +84,16 @@ PIPELINE_PCM_ADD(sof/pipe-host-playback.m4,
SCHEDULE_TIME_DOMAIN_DMA,
PIPELINE_PLAYBACK_SCHED_COMP_1)
#/**********************************************************************************/
DAI_ADD(sof/pipe-dai-playback.m4,
9, ACPHS_VIRTUAL, 1, acp-amp-codec,
DAI_ADD(sof/pipe-echo-ref-dai-playback.m4,
9, ACPHS, 1, acp-amp-codec,
PIPELINE_SOURCE_1, 2, s16le,
2000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA)

DAI_CONFIG(ACPHS_VIRTUAL, 1, 1, acp-amp-codec,
ACPHS_VIRTUAL_CONFIG(DSP_A, ACP_CLOCK(mclk, 49152000, codec_mclk_in),
DAI_CONFIG(ACPHS, 1, 1, acp-amp-codec,
ACPHS_CONFIG(DSP_A, ACP_CLOCK(mclk, 49152000, codec_mclk_in),
ACP_CLOCK(bclk, 3072000, codec_slave),
ACP_CLOCK(fsync, 48000, codec_slave),
ACP_TDM(8, 32, 3, 3),ACPHS_VIRTUAL_CONFIG_DATA(ACPHS_VIRTUAL, 1, 48000, 8, 1)))
ACP_TDM(8, 32, 3, 3),ACPHS_CONFIG_DATA(ACPHS, 1, 48000, 8, 1)))
#/**********************************************************************************/
# PCM Playback pipeline 4 on PCM 1 using max 2 channels of s16le.
# 10ms deadline with priority 0 on core 0
Expand Down
12 changes: 6 additions & 6 deletions tools/topology/topology1/sof-acp-rmb-tdm8ch-dmic4ch.m4
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ define(PIPE_NAME, pipe-acp-mux)
VIRTUAL_WIDGET(ACPHS0 OUT, output, 0)
VIRTUAL_WIDGET(ACPHS0 IN, input, 1)
VIRTUAL_WIDGET(DMIC0 Capture, input, 2)
VIRTUAL_WIDGET(ACPHS_VIRTUAL1 OUT, output, 3)
VIRTUAL_WIDGET(ACPHS1 OUT, output, 3)
#
# Define the pipelines
#
Expand Down Expand Up @@ -85,16 +85,16 @@ PIPELINE_PCM_ADD(sof/pipe-host-playback.m4,
SCHEDULE_TIME_DOMAIN_DMA,
PIPELINE_PLAYBACK_SCHED_COMP_1)
#/**********************************************************************************/
DAI_ADD(sof/pipe-dai-playback.m4,
9, ACPHS_VIRTUAL, 1, acp-amp-codec,
DAI_ADD(sof/pipe-echo-ref-dai-playback.m4,
9, ACPHS, 1, acp-amp-codec,
PIPELINE_SOURCE_1, 2, s16le,
2000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA)

DAI_CONFIG(ACPHS_VIRTUAL, 1, 1, acp-amp-codec,
ACPHS_VIRTUAL_CONFIG(DSP_A, ACP_CLOCK(mclk, 49152000, codec_mclk_in),
DAI_CONFIG(ACPHS, 1, 1, acp-amp-codec,
ACPHS_CONFIG(DSP_A, ACP_CLOCK(mclk, 49152000, codec_mclk_in),
ACP_CLOCK(bclk, 3072000, codec_slave),
ACP_CLOCK(fsync, 48000, codec_slave),
ACP_TDM(8, 32, 3, 3),ACPHS_VIRTUAL_CONFIG_DATA(ACPHS_VIRTUAL, 1, 48000, 8, 1)))
ACP_TDM(8, 32, 3, 3),ACPHS_CONFIG_DATA(ACPHS, 1, 48000, 8, 1)))
#/**********************************************************************************/


Expand Down
8 changes: 4 additions & 4 deletions tools/topology/topology1/sof-acp-rmb.m4
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4,
48000, 48000, 48000)

# playback DAI is ACPSP using 2 periods
DAI_ADD(sof/pipe-dai-playback.m4, 2, ACPHS_VIRTUAL, 1, acp-amp-codec,
DAI_ADD(sof/pipe-dai-playback.m4, 2, ACPHS, 1, acp-amp-codec,
PIPELINE_SOURCE_2, 2, s16le, 2000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA)

DAI_CONFIG(ACPHS_VIRTUAL, 1, 1, acp-amp-codec,
ACPHS_VIRTUAL_CONFIG(I2S, ACP_CLOCK(mclk, 49152000, codec_mclk_in),
DAI_CONFIG(ACPHS, 1, 1, acp-amp-codec,
ACPHS_CONFIG(I2S, ACP_CLOCK(mclk, 49152000, codec_mclk_in),
ACP_CLOCK(bclk, 3072000, codec_slave),
ACP_CLOCK(fsync, 48000, codec_slave),
ACP_TDM(2, 32, 3, 3),ACPHS_VIRTUAL_CONFIG_DATA(ACPHS_VIRTUAL, 1, 48000, 2, 0)))
ACP_TDM(2, 32, 3, 3),ACPHS_CONFIG_DATA(ACPHS, 1, 48000, 2, 0)))


# Capture pipeline 2 on PCM 0 using max 2 channels of s16le.
Expand Down
23 changes: 23 additions & 0 deletions tools/topology/topology1/sof/pipe-echo-ref-dai-playback.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# The pipeline for echo reference feature, it is used
# for the capture DAI to dock.
#
# No connections in this pipeline.
#

# Include topology builder
include(`utils.m4')
include(`dai.m4')
include(`pipeline.m4')

#
# DAI definitions
#
W_DAI_OUT(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 0, DAI_PERIODS, SCHEDULE_CORE)

#
# DAI pipeline - always use 0 for DAIs
#
W_PIPELINE(N_DAI_OUT, SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_dai_schedule_plat)

indir(`define', concat(`PIPELINE_PLAYBACK_SCHED_COMP_', PIPELINE_ID), N_DAI_OUT)