This patch adds the missing NHLT blob support for Sue Creek type
of DMIC HW (v2). Previously the HW v1 type decoding of the blob
would have returned wrong DAI parameters and streaming fail.
Checks are added to verify correct usage of bitfields in OUTCONTROL,
CIC_CONTROL, and FIR_CONTROL. These registers are different in HW v1
and v2.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch replaces the TIE bitfield get by SIP bitfield get. The
mistake impacted DAI debug trace print.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The BSS usage exceeds available memory when building for
APL/cavs15 hardware with XCC, so disable it for now. Issue
tracked as https://github.com/thesofproject/sof/issues/4645
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
It is observed that on different platforms, the LLI need to be aligned
different, e.g. it is 128 Bytes on TGL, otherwise, the LLI struct might
be clobbered and the DMA channel might get unexpected stopped, which
will eventually lead to Xrun.
Here make the LLI alignment to platform specific and use 128 Bytes for
TGL.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This PR adds RTNR Noise Reduction/Suppression(NR/NS) component by
Realtek Semiconductor Corp. This feature links to proprietary libraries.
Please contact antz0525@realtek.com for any question about the library.
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
Update hd->local_pos instead of wrapping it to zero
for amd/renoir platform.
Update trace dma channel number specific to platform
instead of default channel 0.
Signed-off-by: Basavaraj Hiregoudar <basavaraj.hiregoudar@amd.com>
Signed-off-by: Anup Kulkarni <anup.kulkarni@amd.com>
Signed-off-by: balapati <balakishore.pati@amd.com>
By default SP mode was enable. BT mode will be
enable based on CONFIG_AMD_BT flag.
Signed-off-by: Basavaraj Hiregoudar <basavaraj.hiregoudar@amd.com>
Signed-off-by: Anup Kulkarni <anup.kulkarni@amd.com>
Signed-off-by: balapati <balakishore.pati@amd.com>
This adds support for platform drivers (dai, dma, clk)
and general platform initialization.
Signed-off-by: Basavaraj Hiregoudar <basavaraj.hiregoudar@amd.com>
Signed-off-by: Anup Kulkarni <anup.kulkarni@amd.com>
Signed-off-by: balapati <balakishore.pati@amd.com>
Remove the unnecessary assumption that Xtensa tools are installed under
'XtDevTools'.
Align indentation to use tabs as is used elsewhere in this file.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add support to build with XCC compiler by setting XTENSA_TOOLS_ROOT
env variable. The interface follows xtensa-build-all.sh, so existing
CI scripts for SOF builds can easily update to build with XCC.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Without enclosing ENDPOINT_NAME with `', the generated tplg has
pcm id 0 named to "Headphones" instead of "Speakers".
$ ./tplgtool.py ~/work/sof/tools/build_tools/topology/sof-tgl-max98357a-rt5682.tplg
pcm=Headphones;id=0;type=playback;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=Headset;id=1;type=both;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=HDMI1;id=2;type=playback;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=HDMI2;id=3;type=playback;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=HDMI3;id=4;type=playback;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=HDMI4;id=5;type=playback;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=EchoRef;id=6;type=capture;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=DMIC;id=99;type=capture;fmt=S32_LE;rate_min=48000;rate_max=48000;ch_min=4;ch_max=4;
pcm=DMIC16kHz;id=100;type=capture;fmt=S16_LE;rate_min=16000;rate_max=16000;ch_min=2;ch_max=2;
$ grep Headphones topology/sof-tgl-max98357a-rt5682.conf -n -B5
7071-# PCM Low Latency, id 0
7072:SectionPCM."Headphones" {
7073-
7074- # used for binding to the PCM
7075- id "0"
7076-
7077: dai."Headphones 0" {
7078- id "0"
7079- }
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
For speakers SSP2 link is used.
For Headset SSP0 link is used.
Adding required macros to select SSP and Platform.
Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
Currently we can only define one moudule in a file. But
for IPC4 case, some modules share a large part of code,
so they will be defined in one file. to support this
case, add module name to differentiate local staic module
declaration.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Clean up the ifdefs for ipc_pm_context_save(). By implementing
platform_timer_stop() in the Zephyr wrapper, the original context
save sequence can be used also for Zephyr builds.
By doing this, we can fix issues with IPC timeout on CTX_SAVE.
Disabling all interrupts before the IPC reply is needed also on
Zephyr.
BugLink: https://github.com/thesofproject/sof/issues/4507
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
make the core power down IDC blocking to ensure the core is
actually idle before notifying the host.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
To avoid buggy compiler optimization,
select COMPILER_WORKAROUND_CACHE_ATTR for all i.MX
platforms.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
For imx, is_cached() is implemented based on _memmap_cacheattr_reset.
This keeps the attributes for a 512MB region, therefore
we have the following address ranges:
Address range - hex digit
0 - 1FFFFFFF - 0
20000000 - 3FFFFFFF - 1
40000000 - 5FFFFFFF - 2
60000000 - 7FFFFFFF - 3
80000000 - 9FFFFFFF - 4
A0000000 - BFFFFFFF - 5
C0000000 - DFFFFFFF - 6
E0000000 - FFFFFFFF - 7
While testing on i.MX8ULP we discovered that addresses from
(0 – 1FFFFFFF) range where not correctly marked as cacheable,
because the compiler is optimizing the code incorrectly.
With macros, is_cached(address) expands to
(((((uint32_t)(&_memmap_cacheattr_reset_8ulp)) >> \
((((((uintptr_t)((void *)address) >> 29) & 0x7)) << 2))) \
& 0xF) == 1)
When using _memmap_cacheattr_reset_8ulp = 0x22222221
and address = 0x1A801000 is_cached(0x1A801000)
should be true, but instead is false.
We want to avoid this buggy compiler optimization.
So we replaced the macros from cache.h with functions.
To make this generic, I created a cache_attr.c file in
src/arch/xtensa/drivers/ and a config option
- COMPILER_WORKAROUND_CACHE_ATTR, which must be selected
if the workaround is needed.
Also, we replaced the call to glb_addr_attr() from glb_is_cached()
with a function pointer that is initialized in
src/arch/xtensa/drivers/cache_attr.c.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Copier module can work as a host, a dai or just a converter module
to convert format. For host or dai cases, Copier will create a
corresponding component and dispatch module message to it. The key issue
is buffer connection. In the view of pipeline, a component is
connected to a buffer and pipeline message is dispatched when visiting
this connection. So buffer is relinked to host or dai component when
copier dispatches message to these two components and restored to
copier module when control flow returns to copier from host or dai.
Copier will convert format based on input & output format if it is a
converter module.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Modify sof-jsl-rt5682 topology so Waves codec can be added
to playback in case 'WAVES' is defined.
Small refactoring
Signed-off-by: Oleh Titov <Otitov@waves.com>
The recent zephyr code add restriction to the SDK,
and requires the SDK version >= 0.13, we have to
update the docker image for zephyr SOF building.
As the default SDK version in docker image 0.18.1
is still 0.12.4, and the alternative SDK is 0.13.0,
we need to specify the SDK location with env.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
The patch to fix CHANNELS_MIN side effects had a bug in which caused
LOCAL_CHANNELS_MIN to slip into conf output. Example from
sof-adl-sdw-max98373-rt5682:
---cut--
SectionPCMCapabilities."Passthrough Capture 14" {
» formats "S16_LE"
» rate_min "8000"
» rate_max "16000"
» channels_min "LOCAL_CHANNELS_MIN"
--cut--
Fixes: 659266685b ("topology: remove side effects from macro definitions")
BugLink: https://github.com/thesofproject/sof/issues/4621
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Dynamic range compression (DRC) or simply compression is an
audio signal processing operation that reduces the volume of
loud sounds or amplifies quiet sounds, thus reducing or
compressing an audio signal's dynamic range.
This enables the DRC component for i.MX8QM/i.MX8QXP/i.MX8MP
with wm8960 codec.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Git comments indicate the delay is for consumer mode only. Lets not delay
in SSP clock producer mode.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
SDMA IP can be found only on I.MX8M so compile it only
on this platform to reduce the code size for the rest
of the platforms
Signed-off-by: Bud Liviu-Alexandru <budliviu@gmail.com>
ESAI Digital Audio Interface can be found only on I.MX8 and I.MX8X
so compile it only on this platforms to reduce the code size for the
rest of the platforms
Signed-off-by: Bud Liviu-Alexandru <budliviu@gmail.com>
This commit fixes the issue mentioned in #4583.
A temporary definition is introduced that takes it's value from
"CHANNELS_MIN" if it is already defined, otherwise it is set to
a default value. This temporary is used instead of "CHANNELS_MIN"
for the rest of the file. This avoids having the macro defined in
files where it shouldn't be.
In order to be completely sure it avoids side effects this temporary
is undefined after it is no longer needed.
Signed-off-by: Bud Liviu-Alexandru <budliviu@gmail.com>
Local adress can't set to edma on some platform, then need to add
a convert function.
For example, the address from DSP can't send to EDMA directly on
imx8ulp, need convert the address to that EDMA can access.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
There are a mapping between LOCAL and HOST on platform, then add macro
local_to_host, host_to_local.
DSP memory region has mapped to Arm memory region on imx8ulp:
ARM: 0x8e000000~0x8fffffff --- DSP: 0x1a000000~0x1bffffff
Then if we want access the address from ARM, need to convert the
address.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
Fix compiler warning by using the "fallthrough" attribute with GCC
as well.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When the SOF Kconfig is included in other projects, the main menu should
not be that of SOF, rather it should be of the project including SOF.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>