Repository navigation
Enabling SOF Support For AMD Rembrandt platform #5833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
634305b
rembrandt: Add support for AMD rembrandt platform
balakishorepati 129ab9c
scripts: add rembrandt support
balakishorepati b15d2a3
drivers: amd: rembrandt: Add drivers for amd/rembrandt
balakishorepati 1d58277
platform: Add support for amd rembrandt platform
balakishorepati 040bf24
dai: support for amd specific hs dai id
balakishorepati File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| CONFIG_REMBRANDT=y | ||
| CONFIG_RIMAGE_SIGNING_SCHEMA="rmb" | ||
| CONFIG_TRACE_CHANNEL=7 | ||
| CONFIG_WRAP_ACTUAL_POSITION=y | ||
| CONFIG_AMD_BT=n | ||
| CONFIG_AMD_SP=n | ||
| CONFIG_CORE_COUNT=1 | ||
| CONFIG_LP_MEMORY_BANKS=0 | ||
| CONFIG_HP_MEMORY_BANKS=10 | ||
| CONFIG_FORMAT_CONVERT_HIFI3=n | ||
| CONFIG_LP_SRAM=n | ||
| CONFIG_HAVE_AGENT=n | ||
| CONFIG_COMP_SRC=n | ||
| CONFIG_COMP_FIR=n | ||
| CONFIG_COMP_IIR=n | ||
| CONFIG_COMP_DCBLOCK=n | ||
| CONFIG_COMP_TDFB=n | ||
| CONFIG_COMP_TONE=n | ||
| CONFIG_COMP_MIXER=n | ||
| CONFIG_COMP_MUX=n | ||
| CONFIG_COMP_SWITCH=n | ||
| CONFIG_COMP_KPB=n | ||
| CONFIG_COMP_SEL=n | ||
| CONFIG_COMP_ASRC=n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,6 @@ | |
|
|
||
| if(CONFIG_RENOIR) | ||
| add_subdirectory(renoir) | ||
| elseif(CONFIG_REMBRANDT) | ||
| add_subdirectory(rembrandt) | ||
| endif() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| add_local_sources(sof | ||
| acp_dma.c | ||
| acp_bt_dai.c | ||
| acp_sp_dai.c | ||
| acp_dmic_dai.c | ||
| acp_hs_dai.c | ||
| interrupt.c | ||
| ipc.c | ||
| timer.c | ||
| acp_bt_dma.c | ||
| acp_sp_dma.c | ||
| acp_hs_dma.c | ||
| acp_dmic_dma.c | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| // SPDX-License-Identifier: BSD-3-Clause | ||
| // | ||
| //Copyright(c) 2022 AMD. All rights reserved. | ||
| // | ||
| //Author: Basavaraj Hiregoudar <basavaraj.hiregoudar@amd.com> | ||
| // Bala Kishore <balakishore.pati@amd.com> | ||
|
|
||
| #include <sof/audio/component.h> | ||
| #include <sof/drivers/acp_dai_dma.h> | ||
| #include <sof/drivers/interrupt.h> | ||
| #include <sof/lib/alloc.h> | ||
| #include <sof/lib/dai.h> | ||
| #include <sof/lib/dma.h> | ||
| #include <sof/lib/uuid.h> | ||
| #include <ipc/dai.h> | ||
| #include <ipc/topology.h> | ||
| #include <platform/fw_scratch_mem.h> | ||
| #include <sof/lib/io.h> | ||
| #include <platform/chip_offset_byte.h> | ||
|
|
||
| /* 4abd71ba-8619-458a-b33f-160fc0cf809b */ | ||
| DECLARE_SOF_UUID("btdai", btdai_uuid, 0x4abd71ba, 0x8619, 0x458a, | ||
| 0xb3, 0x3f, 0x16, 0x0f, 0xc0, 0xcf, 0x80, 0x9b); | ||
|
|
||
| DECLARE_TR_CTX(btdai_tr, SOF_UUID(btdai_uuid), LOG_LEVEL_INFO); | ||
|
|
||
| static inline int btdai_set_config(struct dai *dai, struct ipc_config_dai *common_config, | ||
| void *spec_config) | ||
| { | ||
| /* nothing to do on rembrandt */ | ||
| return 0; | ||
| } | ||
|
|
||
| static int btdai_trigger(struct dai *dai, int cmd, int direction) | ||
| { | ||
| /* nothing to do on rembrandt */ | ||
| return 0; | ||
| } | ||
|
|
||
| static int btdai_probe(struct dai *dai) | ||
| { | ||
| /* TODO */ | ||
| return 0; | ||
| } | ||
|
|
||
| static int btdai_remove(struct dai *dai) | ||
| { | ||
| /* TODO */ | ||
| return 0; | ||
| } | ||
|
|
||
| static int btdai_get_fifo(struct dai *dai, int direction, int stream_id) | ||
| { | ||
| switch (direction) { | ||
| case DAI_DIR_PLAYBACK: | ||
| case DAI_DIR_CAPTURE: | ||
| return dai_fifo(dai, direction); | ||
| default: | ||
| dai_err(dai, "Not a valid direction"); | ||
| return -EINVAL; | ||
| } | ||
| } | ||
|
|
||
| static int btdai_get_handshake(struct dai *dai, int direction, int stream_id) | ||
| { | ||
| return dai->plat_data.fifo[direction].handshake; | ||
| } | ||
|
|
||
| static int btdai_get_hw_params(struct dai *dai, | ||
| struct sof_ipc_stream_params *params, int dir) | ||
| { | ||
| /* supported parameters */ | ||
| params->rate = ACP_DEFAULT_SAMPLE_RATE; | ||
| params->channels = ACP_DEFAULT_NUM_CHANNELS; | ||
| params->buffer_fmt = SOF_IPC_BUFFER_INTERLEAVED; | ||
| params->frame_fmt = SOF_IPC_FRAME_S16_LE; | ||
| return 0; | ||
| } | ||
|
|
||
| const struct dai_driver acp_btdai_driver = { | ||
| .type = SOF_DAI_AMD_BT, | ||
| .uid = SOF_UUID(btdai_uuid), | ||
| .tctx = &btdai_tr, | ||
| .dma_dev = DMA_DEV_BT, | ||
| .dma_caps = DMA_CAP_BT, | ||
| .ops = { | ||
| .trigger = btdai_trigger, | ||
| .set_config = btdai_set_config, | ||
| .probe = btdai_probe, | ||
| .remove = btdai_remove, | ||
| .get_fifo = btdai_get_fifo, | ||
| .get_handshake = btdai_get_handshake, | ||
| .get_hw_params = btdai_get_hw_params, | ||
| }, | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a general question to this PR: how different are these drivers from renoir? Could any be reused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR uses different set of registers than Renoir. Currently we are not planning for restructure. We will plan for those activities once platforms are stabilized