-
Notifications
You must be signed in to change notification settings - Fork 355
acp: add native Zephyr drivers for AMD ACP 7.X #10777
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
base: main
Are you sure you want to change the base?
Changes from all commits
ed72820
d44d82d
b4740ff
74e5044
3abe29b
1b030ce
abf4dd3
1fad96e
a53fe4e
42a3bda
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| CONFIG_ACP_7_X=y | ||
| CONFIG_HAVE_AGENT=n | ||
| CONFIG_DCACHE_LINE_SIZE_DETECT=n | ||
| CONFIG_DCACHE_LINE_SIZE=128 | ||
| CONFIG_DYNAMIC_INTERRUPTS=y | ||
| CONFIG_SHARED_INTERRUPTS=n | ||
| CONFIG_ZEPHYR_LOG=y | ||
| CONFIG_LOG_MODE_DEFERRED=n | ||
| CONFIG_LOG_MODE_MINIMAL=y | ||
| CONFIG_DMA=y | ||
| CONFIG_DMA_DOMAIN=n | ||
| CONFIG_ZEPHYR_NATIVE_DRIVERS=y | ||
| CONFIG_INTC_AMD_ACP=y | ||
| CONFIG_DMA_AMD_ACP_HOST=y | ||
| CONFIG_DMA_AMD_ACP_SDW=y | ||
| CONFIG_DAI_AMD_SDW=y | ||
| CONFIG_AMS=n | ||
| CONFIG_WRAP_ACTUAL_POSITION=y | ||
| CONFIG_TRACE=n | ||
| CONFIG_COMP_VOLUME=y | ||
| CONFIG_COMP_SRC=n | ||
| CONFIG_COMP_FIR=n | ||
| CONFIG_COMP_IIR=n | ||
| CONFIG_COMP_DCBLOCK=n | ||
| CONFIG_COMP_CROSSOVER=n | ||
| CONFIG_COMP_DRC=n | ||
| CONFIG_COMP_MULTIBAND_DRC=n | ||
| CONFIG_COMP_TONE=n | ||
| CONFIG_COMP_KPB=n | ||
| CONFIG_MAXIM_DSM=n | ||
| CONFIG_COMP_ASRC=n | ||
| CONFIG_COMP_IGO_NR=n | ||
| CONFIG_COMP_COPIER=n | ||
| CONFIG_COMP_RTNR=n | ||
| CONFIG_COMP_ARIA=n | ||
| CONFIG_COMP_BASEFW_IPC4=n | ||
| CONFIG_COMP_UP_DOWN_MIXER=n | ||
| CONFIG_COMP_TDFB=n | ||
| CONFIG_COMP_SEL=n | ||
| CONFIG_COMP_MIXER=n | ||
| CONFIG_ASRC_SUPPORT_CONVERSION_24000_TO_08000=n | ||
| CONFIG_ASRC_SUPPORT_CONVERSION_24000_TO_16000=n | ||
| CONFIG_ASRC_SUPPORT_CONVERSION_48000_TO_08000=n | ||
| CONFIG_ASRC_SUPPORT_CONVERSION_48000_TO_11025=n | ||
| CONFIG_ASRC_SUPPORT_CONVERSION_48000_TO_12000=n | ||
| CONFIG_ASRC_SUPPORT_CONVERSION_48000_TO_16000=n | ||
| CONFIG_ASRC_SUPPORT_CONVERSION_48000_TO_22050=n | ||
| CONFIG_ASRC_SUPPORT_CONVERSION_48000_TO_24000=n | ||
| CONFIG_ASRC_SUPPORT_CONVERSION_48000_TO_32000=n | ||
| CONFIG_ASRC_SUPPORT_CONVERSION_48000_TO_44100=n | ||
| CONFIG_CORE_COUNT=1 | ||
| CONFIG_FORMAT_CONVERT_HIFI3=n |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| CONFIG_ACP_7_X=y | ||
| CONFIG_RIMAGE_SIGNING_SCHEMA="acp_7_3" | ||
| CONFIG_TRACE_CHANNEL=7 | ||
| CONFIG_WRAP_ACTUAL_POSITION=y | ||
| CONFIG_CORE_COUNT=1 | ||
| CONFIG_FORMAT_CONVERT_HIFI3=n | ||
| CONFIG_LP_SRAM=n | ||
| CONFIG_HAVE_AGENT=n | ||
| CONFIG_COMP_VOLUME=y | ||
| CONFIG_COMP_SRC=n | ||
| CONFIG_COMP_FIR=n | ||
| CONFIG_COMP_IIR=n | ||
| CONFIG_COMP_DCBLOCK=n | ||
| CONFIG_COMP_CROSSOVER=n | ||
| CONFIG_COMP_DRC=n | ||
| CONFIG_COMP_MULTIBAND_DRC=n | ||
| CONFIG_COMP_TONE=n | ||
| CONFIG_COMP_SWITCH=n | ||
| CONFIG_COMP_KPB=n | ||
| CONFIG_MAXIM_DSM=n | ||
| CONFIG_COMP_ASRC=n | ||
| CONFIG_COMP_IGO_NR=n | ||
| CONFIG_COMP_COPIER=n | ||
| CONFIG_COMP_RTNR=n | ||
| CONFIG_COMP_ARIA=n | ||
| CONFIG_COMP_BASEFW_IPC4=n | ||
| CONFIG_COMP_UP_DOWN_MIXER=n | ||
| CONFIG_COMP_TDFB=n | ||
| CONFIG_COMP_MUX=n | ||
| CONFIG_COMP_SEL=n | ||
| CONFIG_COMP_MIXER=n | ||
| CONFIG_PROBE=n |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -712,8 +712,13 @@ const struct pcm_func_map pcm_func_map[] = { | |
| { SOF_IPC_FRAME_S32_LE, SOF_IPC_FRAME_S16_LE, pcm_convert_s32_to_s16 }, | ||
| #endif /* CONFIG_PCM_CONVERTER_FORMAT_S32LE && CONFIG_PCM_CONVERTER_FORMAT_S16LE */ | ||
| #if CONFIG_PCM_CONVERTER_FORMAT_S32LE && CONFIG_PCM_CONVERTER_FORMAT_S24LE | ||
| #if defined(CONFIG_SOC_ACP_7_X) | ||
| { SOF_IPC_FRAME_S24_4LE, SOF_IPC_FRAME_S32_LE, just_copy }, | ||
| { SOF_IPC_FRAME_S32_LE, SOF_IPC_FRAME_S24_4LE, pcm_convert_s32_to_s24_be }, | ||
| #else | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you @singalsu check this? This is first time we have HW dependencies the the PCM converter list. It would prefer if we could keep same interpretations of the sample formats. This patch suggest your hardware natively 24bit encoding where the audio samples are stored in the 3 most significant bytes. The format we use for this is SOF_IPC_FRAME_S24_4LE_MSB. So in theory, you'd set the correct format in either DSP topology, or some of the HW specific code. E.g. for Intel, we overrode the sample format in sof/src/ipc/ipc3/dai.c:ipc_dai_data_config(). Then we could keep the converter table vendor neutral.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the review. |
||
| { SOF_IPC_FRAME_S24_4LE, SOF_IPC_FRAME_S32_LE, pcm_convert_s24_to_s32 }, | ||
| { SOF_IPC_FRAME_S32_LE, SOF_IPC_FRAME_S24_4LE, pcm_convert_s32_to_s24 }, | ||
| #endif | ||
|
Comment on lines
+715
to
+721
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the review. |
||
| #endif /* CONFIG_PCM_CONVERTER_FORMAT_S32LE && CONFIG_PCM_CONVERTER_FORMAT_S24LE */ | ||
| #if CONFIG_PCM_CONVERTER_FORMAT_FLOAT | ||
| { SOF_IPC_FRAME_FLOAT, SOF_IPC_FRAME_FLOAT, just_copy }, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -219,6 +219,13 @@ int volume_set_config(struct processing_module *mod, uint32_t config_id, | |
| volume_set_ramp_channel_counter(cd, cd->channels); | ||
|
|
||
| volume_ramp_check(mod); | ||
| #if defined(CONFIG_AMD) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks a bit odd? Why would this be HW/AMD specific functionality?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for the review. |
||
| /* Update function pointer after all volume changes */ | ||
| if (comp_dev_get_first_data_consumer(dev) != NULL) { | ||
| cd->is_passthrough = false; | ||
| set_volume_process(cd, dev, false); | ||
| } | ||
| #endif | ||
| break; | ||
|
|
||
| case SOF_CTRL_CMD_SWITCH: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,13 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| add_subdirectory(common) | ||
| if(CONFIG_RENOIR OR CONFIG_VANGOGH OR CONFIG_REMBRANDT OR CONFIG_ACP_6_3 OR CONFIG_ACP_7_0) | ||
| add_subdirectory(common) | ||
| endif() | ||
| if(CONFIG_RENOIR) | ||
| add_subdirectory(renoir) | ||
| elseif(CONFIG_REMBRANDT OR CONFIG_ACP_6_3 OR CONFIG_ACP_7_0) | ||
| add_subdirectory(rembrandt) | ||
| elseif(CONFIG_VANGOGH) | ||
| add_subdirectory(vangogh) | ||
| elseif(CONFIG_ACP_7_X) | ||
| add_subdirectory(acp_7_x) | ||
| endif() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| add_local_sources(sof | ||
| ipc.c | ||
| ) |
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.
Fixed in latest push.
Updated XCHAL_CORE_ID in core-isa.h to "ACP73x_HiFi5_NNE_PROD" to match XTENSA_CORE. The core-isa.h value was incorrect, not the build script.