ASoC: SOF: new functionality with MINOR ABI changes
Subsystems (3)
cover ASoC: SOF: new functionality with MINOR ABI changes
The first patches are to align with firmware, we unfortunately had a couple of misses before the new ABI change process was introduced [1].
The new functionality added after the initial cleanup is:
1. sending the kernel time to firmware so that the trace logs use the same base across suspend-resume cycles.
2. introducing an IPC flood mechanism which already helped harden the IPC sequences, be it with QEMU or on real hardware.
3. support for mux/demux component
4. initial SoundWire support
This patchset is independent from the IPC changes submitted on alsa-devel, but will only apply if previous trace related changes are applied. ([PATCH 3/5] ASoC: SOF: trace: move to opt-in with Kconfig and module parameter)
[1] https://github.com/orgs/thesofproject/projects/2
Bard liao (1):
ASoC: SOF: send time stamp to FW for alignment
Jaska Uimonen (1):
ASoC: SOF: topology: add support for mux/demux component
Kai Vehmanen (1):
ASoC: SOF: fix DSP oops definitions in FW ABI
Pan Xiuli (1):
ASoC: SOF: soundwire: add initial soundwire support
Pierre-Louis Bossart (2):
ASoC: SOF: uapi: mirror firmware changes
ASoC: SOF: bump to ABI 3.6
Ranjani Sridharan (3):
ASoC: SOF: add mode parameter for snd_sof_debugfs_buf_item
ASoC: SOF: ipc: Introduce SOF_IPC_GLB_TEST_MSG IPC command
ASoC: SOF: debug: add new debugfs entries for IPC flood test
include/sound/sof/dai.h | 1 + include/sound/sof/header.h | 30 ++++- include/sound/sof/topology.h | 3 + include/sound/sof/trace.h | 10 ++ include/sound/sof/xtensa.h | 9 +- include/uapi/sound/sof/abi.h | 2 +- sound/soc/sof/Kconfig | 8 ++ sound/soc/sof/debug.c | 247 ++++++++++++++++++++++++++++++++++- sound/soc/sof/intel/bdw.c | 17 ++- sound/soc/sof/intel/byt.c | 15 ++- sound/soc/sof/intel/hda.c | 16 ++- sound/soc/sof/ipc.c | 9 ++ sound/soc/sof/loader.c | 4 +- sound/soc/sof/sof-priv.h | 8 +- sound/soc/sof/topology.c | 2 + sound/soc/sof/trace.c | 16 ++- sound/soc/sof/xtensa/core.c | 2 +- 17 files changed, 366 insertions(+), 33 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/9 ASoC: SOF: uapi: mirror firmware changes
We missed these two definitions for GDB support and component notifications, they are defined for the SOF firmware. Since they are not used by the kernel so far, we can still add them without any ABI change.
--- include/sound/sof/header.h | 2 ++ 1 file changed, 2 insertions(+)
include/sound/sof/header.h +2 -0
@@ -48,6 +48,7 @@#define SOF_IPC_FW_READY SOF_GLB_TYPE(0x7U)#define SOF_IPC_GLB_DAI_MSG SOF_GLB_TYPE(0x8U)#define SOF_IPC_GLB_TRACE_MSG SOF_GLB_TYPE(0x9U) +#define SOF_IPC_GLB_GDB_DEBUG SOF_GLB_TYPE(0xAU)/* * DSP Command Message Types
@@ -78,6 +79,7 @@#define SOF_IPC_COMP_GET_VALUE SOF_CMD_TYPE(0x002)#define SOF_IPC_COMP_SET_DATA SOF_CMD_TYPE(0x003)#define SOF_IPC_COMP_GET_DATA SOF_CMD_TYPE(0x004) +#define SOF_IPC_COMP_NOTIFICATION SOF_CMD_TYPE(0x005)/* DAI messages */ #define SOF_IPC_DAI_CONFIG SOF_CMD_TYPE(0x001)
Signature · 1 line
2.20.1
Mark Brown
maintainerRe: [PATCH 1/9] ASoC: SOF: uapi: mirror firmware changes
Quoted 4 lines · Pierre-Louis Bossart
We missed these two definitions for GDB support and component notifications, they are defined for the SOF firmware. Since they are not used by the kernel so far, we can still add them without any ABI change.
Adding stuff is generally not an ABI break in and of itself (though requiring new stuff can be).
Mark Brown
maintainerApplied "ASoC: SOF: uapi: mirror firmware changes" to the asoc tree
In reply to Pierre-Louis BossartThe patch
ASoC: SOF: uapi: mirror firmware changes
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.2
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
59be197354496b87869792bfa15477e8798462daMon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <[email protected]>
Date: Mon, 3 Jun 2019 11:18:13 -0500
Subject: [PATCH] ASoC: SOF: uapi: mirror firmware changes
We missed these two definitions for GDB support and component notifications, they are defined for the SOF firmware. Since they are not used by the kernel so far, we can still add them without any ABI change.
--- include/sound/sof/header.h | 2 ++ 1 file changed, 2 insertions(+)
include/sound/sof/header.h +2 -0
@@ -48,6 +48,7 @@#define SOF_IPC_FW_READY SOF_GLB_TYPE(0x7U)#define SOF_IPC_GLB_DAI_MSG SOF_GLB_TYPE(0x8U)#define SOF_IPC_GLB_TRACE_MSG SOF_GLB_TYPE(0x9U) +#define SOF_IPC_GLB_GDB_DEBUG SOF_GLB_TYPE(0xAU)/* * DSP Command Message Types
@@ -78,6 +79,7 @@#define SOF_IPC_COMP_GET_VALUE SOF_CMD_TYPE(0x002)#define SOF_IPC_COMP_SET_DATA SOF_CMD_TYPE(0x003)#define SOF_IPC_COMP_GET_DATA SOF_CMD_TYPE(0x004) +#define SOF_IPC_COMP_NOTIFICATION SOF_CMD_TYPE(0x005)/* DAI messages */ #define SOF_IPC_DAI_CONFIG SOF_CMD_TYPE(0x001)
Signature · 1 line
2.20.1
PATCH 2/9 ASoC: SOF: soundwire: add initial soundwire support
In reply to Pierre-Louis BossartFrom: Pan Xiuli <[email protected]>
Add soundwire dai type and update ABI version.
--- include/sound/sof/dai.h | 1 + include/uapi/sound/sof/abi.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
include/sound/sof/dai.h +1 -0
@@ -49,6 +49,7 @@ enum sof_ipc_dai_type {SOF_DAI_INTEL_SSP ,/**< Intel SSP */ SOF_DAI_INTEL_DMIC ,/**< Intel DMIC */ SOF_DAI_INTEL_HDA ,/**< Intel HD/A */ + SOF_DAI_INTEL_SOUNDWIRE, /**< Intel SoundWire */ };/* general purpose DAI configuration */
include/uapi/sound/sof/abi.h +1 -1
@@ -26,7 +26,7 @@/* SOF ABI version major, minor and patch numbers */ #define SOF_ABI_MAJOR 3 -#define SOF_ABI_MINOR 4 +#define SOF_ABI_MINOR 5#define SOF_ABI_PATCH 0/* SOF ABI version number. Format within 32bit word is MMmmmppp */
Signature · 1 line
2.20.1
Mark Brown
maintainerApplied "ASoC: SOF: soundwire: add initial soundwire support" to the asoc tree
The patch
ASoC: SOF: soundwire: add initial soundwire support
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
a893ef9b8bba6a1ba262d9afa04012fcab334c34Mon Sep 17 00:00:00 2001
From: Pan Xiuli <[email protected]>
Date: Mon, 3 Jun 2019 11:18:14 -0500
Subject: [PATCH] ASoC: SOF: soundwire: add initial soundwire support
Add soundwire dai type and update ABI version.
--- include/sound/sof/dai.h | 1 + include/uapi/sound/sof/abi.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
include/sound/sof/dai.h +1 -0
@@ -49,6 +49,7 @@ enum sof_ipc_dai_type {SOF_DAI_INTEL_SSP ,/**< Intel SSP */ SOF_DAI_INTEL_DMIC ,/**< Intel DMIC */ SOF_DAI_INTEL_HDA ,/**< Intel HD/A */ + SOF_DAI_INTEL_SOUNDWIRE, /**< Intel SoundWire */ };/* general purpose DAI configuration */
include/uapi/sound/sof/abi.h +1 -1
@@ -26,7 +26,7 @@/* SOF ABI version major, minor and patch numbers */ #define SOF_ABI_MAJOR 3 -#define SOF_ABI_MINOR 4 +#define SOF_ABI_MINOR 5#define SOF_ABI_PATCH 0/* SOF ABI version number. Format within 32bit word is MMmmmppp */
Signature · 1 line
2.20.1
Mark Brown
maintainerApplied "ASoC: SOF: soundwire: add initial soundwire support" to the asoc tree
In reply to Pierre-Louis BossartThe patch
ASoC: SOF: soundwire: add initial soundwire support
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
ca6c6f1850498ff2325e6092e37644a7e6000af0Mon Sep 17 00:00:00 2001
From: Pan Xiuli <[email protected]>
Date: Mon, 3 Jun 2019 11:18:14 -0500
Subject: [PATCH] ASoC: SOF: soundwire: add initial soundwire support
Add soundwire dai type and update ABI version.
--- include/sound/sof/dai.h | 1 + include/uapi/sound/sof/abi.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
include/sound/sof/dai.h +1 -0
@@ -49,6 +49,7 @@ enum sof_ipc_dai_type {SOF_DAI_INTEL_SSP ,/**< Intel SSP */ SOF_DAI_INTEL_DMIC ,/**< Intel DMIC */ SOF_DAI_INTEL_HDA ,/**< Intel HD/A */ + SOF_DAI_INTEL_SOUNDWIRE, /**< Intel SoundWire */ };/* general purpose DAI configuration */
include/uapi/sound/sof/abi.h +1 -1
@@ -26,7 +26,7 @@/* SOF ABI version major, minor and patch numbers */ #define SOF_ABI_MAJOR 3 -#define SOF_ABI_MINOR 4 +#define SOF_ABI_MINOR 5#define SOF_ABI_PATCH 0/* SOF ABI version number. Format within 32bit word is MMmmmppp */
Signature · 1 line
2.20.1
PATCH 3/9 ASoC: SOF: fix DSP oops definitions in FW ABI
In reply to Pierre-Louis BossartFrom: Kai Vehmanen <[email protected]>
The definitions for DSP oops structures were not aligned correctly to current FW ABI version 3.6.0, leading to invalid data being printed out to debug logs. Fix the structs and update related platform code accordingly.
--- include/sound/sof/header.h | 21 +++++++++++++++++++++ include/sound/sof/xtensa.h | 9 +++++++-- sound/soc/sof/intel/bdw.c | 17 ++++++++++------- sound/soc/sof/intel/byt.c | 15 +++++++++------ sound/soc/sof/intel/hda.c | 16 ++++++++++------ sound/soc/sof/xtensa/core.c | 2 +- 6 files changed, 58 insertions(+), 22 deletions(-)
include/sound/sof/header.h +21 -0
@@ -155,6 +155,27 @@ struct sof_ipc_compound_hdr { uint32_t count; /**< count of 0 means end of compound sequence */ } __packed; +/** +* OOPS header architecture specific data. +*/ +struct sof_ipc_dsp_oops_arch_hdr { +uint32_t arch;/* Identifier of architecture */ +uint32_t totalsize;/* Total size of oops message */ +} __packed; + +/** +* OOPS header platform specific data. +*/ +struct sof_ipc_dsp_oops_plat_hdr { +uint32_t configidhi;/* ConfigID hi 32bits */ +uint32_t configidlo;/* ConfigID lo 32bits */ +uint32_t numaregs;/* Special regs num */ +uint32_t stackoffset;/* Offset to stack pointer from beginning of +* oops message +*/ +uint32_t stackptr;/* Stack ptr */ +} __packed; +/** @}*/ #endif
include/sound/sof/xtensa.h +7 -2
@@ -17,7 +17,8 @@/* Xtensa Firmware Oops data */ struct sof_ipc_dsp_oops_xtensa { -struct sof_ipc_hdr hdr; +struct sof_ipc_dsp_oops_arch_hdr arch_hdr; +struct sof_ipc_dsp_oops_plat_hdr plat_hdr;uint32_t exccause;uint32_t excvaddr;uint32_t ps;
@@ -38,7 +39,11 @@ struct sof_ipc_dsp_oops_xtensa {uint32_t intenable;uint32_t interrupt;uint32_t sar; - uint32_t stack; +uint32_t debugcause; +uint32_t windowbase; +uint32_t windowstart; +uint32_t excsave1; + uint32_t ar[]; } __packed;#endif
sound/soc/sof/intel/bdw.c +10 -7
@@ -220,17 +220,20 @@ static void bdw_get_registers(struct snd_sof_dev *sdev,struct sof_ipc_panic_info *panic_info, u32 *stack, size_t stack_words) { -/* first read regsisters */ - sof_mailbox_read(sdev, sdev->dsp_oops_offset, xoops, sizeof(*xoops)); + u32 offset = sdev->dsp_oops_offset; + +/* first read registers */ +sof_mailbox_read (sdev, offset, xoops,sizeof (*xoops)); + +/* note: variable AR register array is not read */ /* then get panic info */ -sof_mailbox_read (sdev, sdev->dsp_oops_offset +sizeof (*xoops), - panic_info,sizeof (*panic_info)); + offset += xoops->arch_hdr.totalsize; +sof_mailbox_read (sdev, offset, panic_info,sizeof (*panic_info));/* then get the stack */ -sof_mailbox_read (sdev, sdev->dsp_oops_offset +sizeof (*xoops) + -sizeof (*panic_info), stack, - stack_words *sizeof (u32)); + offset +=sizeof (*panic_info); +sof_mailbox_read (sdev, offset, stack, stack_words *sizeof (u32)); }static void bdw_dump (struct snd_sof_dev *sdev,u32 flags)
sound/soc/sof/intel/byt.c +9 -6
@@ -265,17 +265,20 @@ static void byt_get_registers(struct snd_sof_dev *sdev,struct sof_ipc_panic_info *panic_info, u32 *stack, size_t stack_words) { + u32 offset = sdev->dsp_oops_offset; +/* first read regsisters */ - sof_mailbox_read(sdev, sdev->dsp_oops_offset, xoops, sizeof(*xoops)); +sof_mailbox_read (sdev, offset, xoops,sizeof (*xoops)); + +/* note: variable AR register array is not read */ /* then get panic info */ -sof_mailbox_read (sdev, sdev->dsp_oops_offset +sizeof (*xoops), - panic_info,sizeof (*panic_info)); + offset += xoops->arch_hdr.totalsize; +sof_mailbox_read (sdev, offset, panic_info,sizeof (*panic_info));/* then get the stack */ -sof_mailbox_read (sdev, sdev->dsp_oops_offset +sizeof (*xoops) + -sizeof (*panic_info), stack, - stack_words *sizeof (u32)); + offset +=sizeof (*panic_info); +sof_mailbox_read (sdev, offset, stack, stack_words *sizeof (u32)); }static void byt_dump (struct snd_sof_dev *sdev,u32 flags)
sound/soc/sof/intel/hda.c +10 -6
@@ -111,17 +111,21 @@ static void hda_dsp_get_registers(struct snd_sof_dev *sdev,struct sof_ipc_panic_info *panic_info, u32 *stack, size_t stack_words) { + u32 offset = sdev->dsp_oops_offset; +/* first read registers */ - sof_block_read(sdev, sdev->mmio_bar, sdev->dsp_oops_offset, xoops, - sizeof(*xoops)); +sof_mailbox_read (sdev, offset, xoops,sizeof (*xoops)); + +/* note: variable AR register array is not read */ /* then get panic info */ -sof_block_read (sdev, sdev->mmio_bar, sdev->dsp_oops_offset + -sizeof (*xoops), panic_info,sizeof (*panic_info)); + offset += xoops->arch_hdr.totalsize; +sof_block_read (sdev, sdev->mmio_bar, offset, + panic_info,sizeof (*panic_info));/* then get the stack */ -sof_block_read (sdev, sdev->mmio_bar, sdev->dsp_oops_offset + -sizeof (*xoops) +sizeof (*panic_info), stack, + offset +=sizeof (*panic_info); +sof_block_read (sdev, sdev->mmio_bar, offset, stack, stack_words *sizeof (u32)); }
sound/soc/sof/xtensa/core.c +1 -1
@@ -110,7 +110,7 @@ static void xtensa_stack(struct snd_sof_dev *sdev, void *oops, u32 *stack, u32 stack_words) {struct sof_ipc_dsp_oops_xtensa *xoops = oops; -u32 stack_ptr = xoops->stack; +u32 stack_ptr = xoops->plat_hdr.stackptr;/* 4 * 8chars + 3 ws + 1 terminating NUL */ unsigned char buf[4 *8 +3 +1 ];int i;
Signature · 1 line
2.20.1
Mark Brown
maintainerApplied "ASoC: SOF: fix DSP oops definitions in FW ABI" to the asoc tree
The patch
ASoC: SOF: fix DSP oops definitions in FW ABI
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.2
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
14104eb6a351a5bad21fdd2cf05ca46ad5e5beabMon Sep 17 00:00:00 2001
From: Kai Vehmanen <[email protected]>
Date: Mon, 3 Jun 2019 11:18:15 -0500
Subject: [PATCH] ASoC: SOF: fix DSP oops definitions in FW ABI
The definitions for DSP oops structures were not aligned correctly to current FW ABI version 3.6.0, leading to invalid data being printed out to debug logs. Fix the structs and update related platform code accordingly.
--- include/sound/sof/header.h | 21 +++++++++++++++++++++ include/sound/sof/xtensa.h | 9 +++++++-- sound/soc/sof/intel/bdw.c | 17 ++++++++++------- sound/soc/sof/intel/byt.c | 15 +++++++++------ sound/soc/sof/intel/hda.c | 16 ++++++++++------ sound/soc/sof/xtensa/core.c | 2 +- 6 files changed, 58 insertions(+), 22 deletions(-)
include/sound/sof/header.h +21 -0
@@ -155,6 +155,27 @@ struct sof_ipc_compound_hdr { uint32_t count; /**< count of 0 means end of compound sequence */ } __packed; +/** +* OOPS header architecture specific data. +*/ +struct sof_ipc_dsp_oops_arch_hdr { +uint32_t arch;/* Identifier of architecture */ +uint32_t totalsize;/* Total size of oops message */ +} __packed; + +/** +* OOPS header platform specific data. +*/ +struct sof_ipc_dsp_oops_plat_hdr { +uint32_t configidhi;/* ConfigID hi 32bits */ +uint32_t configidlo;/* ConfigID lo 32bits */ +uint32_t numaregs;/* Special regs num */ +uint32_t stackoffset;/* Offset to stack pointer from beginning of +* oops message +*/ +uint32_t stackptr;/* Stack ptr */ +} __packed; +/** @}*/ #endif
include/sound/sof/xtensa.h +7 -2
@@ -17,7 +17,8 @@/* Xtensa Firmware Oops data */ struct sof_ipc_dsp_oops_xtensa { -struct sof_ipc_hdr hdr; +struct sof_ipc_dsp_oops_arch_hdr arch_hdr; +struct sof_ipc_dsp_oops_plat_hdr plat_hdr;uint32_t exccause;uint32_t excvaddr;uint32_t ps;
@@ -38,7 +39,11 @@ struct sof_ipc_dsp_oops_xtensa {uint32_t intenable;uint32_t interrupt;uint32_t sar; - uint32_t stack; +uint32_t debugcause; +uint32_t windowbase; +uint32_t windowstart; +uint32_t excsave1; + uint32_t ar[]; } __packed;#endif
sound/soc/sof/intel/bdw.c +10 -7
@@ -220,17 +220,20 @@ static void bdw_get_registers(struct snd_sof_dev *sdev,struct sof_ipc_panic_info *panic_info, u32 *stack, size_t stack_words) { -/* first read regsisters */ - sof_mailbox_read(sdev, sdev->dsp_oops_offset, xoops, sizeof(*xoops)); + u32 offset = sdev->dsp_oops_offset; + +/* first read registers */ +sof_mailbox_read (sdev, offset, xoops,sizeof (*xoops)); + +/* note: variable AR register array is not read */ /* then get panic info */ -sof_mailbox_read (sdev, sdev->dsp_oops_offset +sizeof (*xoops), - panic_info,sizeof (*panic_info)); + offset += xoops->arch_hdr.totalsize; +sof_mailbox_read (sdev, offset, panic_info,sizeof (*panic_info));/* then get the stack */ -sof_mailbox_read (sdev, sdev->dsp_oops_offset +sizeof (*xoops) + -sizeof (*panic_info), stack, - stack_words *sizeof (u32)); + offset +=sizeof (*panic_info); +sof_mailbox_read (sdev, offset, stack, stack_words *sizeof (u32)); }static void bdw_dump (struct snd_sof_dev *sdev,u32 flags)
sound/soc/sof/intel/byt.c +9 -6
@@ -265,17 +265,20 @@ static void byt_get_registers(struct snd_sof_dev *sdev,struct sof_ipc_panic_info *panic_info, u32 *stack, size_t stack_words) { + u32 offset = sdev->dsp_oops_offset; +/* first read regsisters */ - sof_mailbox_read(sdev, sdev->dsp_oops_offset, xoops, sizeof(*xoops)); +sof_mailbox_read (sdev, offset, xoops,sizeof (*xoops)); + +/* note: variable AR register array is not read */ /* then get panic info */ -sof_mailbox_read (sdev, sdev->dsp_oops_offset +sizeof (*xoops), - panic_info,sizeof (*panic_info)); + offset += xoops->arch_hdr.totalsize; +sof_mailbox_read (sdev, offset, panic_info,sizeof (*panic_info));/* then get the stack */ -sof_mailbox_read (sdev, sdev->dsp_oops_offset +sizeof (*xoops) + -sizeof (*panic_info), stack, - stack_words *sizeof (u32)); + offset +=sizeof (*panic_info); +sof_mailbox_read (sdev, offset, stack, stack_words *sizeof (u32)); }static void byt_dump (struct snd_sof_dev *sdev,u32 flags)
sound/soc/sof/intel/hda.c +10 -6
@@ -108,17 +108,21 @@ static void hda_dsp_get_registers(struct snd_sof_dev *sdev,struct sof_ipc_panic_info *panic_info, u32 *stack, size_t stack_words) { + u32 offset = sdev->dsp_oops_offset; +/* first read registers */ - sof_block_read(sdev, sdev->mmio_bar, sdev->dsp_oops_offset, xoops, - sizeof(*xoops)); +sof_mailbox_read (sdev, offset, xoops,sizeof (*xoops)); + +/* note: variable AR register array is not read */ /* then get panic info */ -sof_block_read (sdev, sdev->mmio_bar, sdev->dsp_oops_offset + -sizeof (*xoops), panic_info,sizeof (*panic_info)); + offset += xoops->arch_hdr.totalsize; +sof_block_read (sdev, sdev->mmio_bar, offset, + panic_info,sizeof (*panic_info));/* then get the stack */ -sof_block_read (sdev, sdev->mmio_bar, sdev->dsp_oops_offset + -sizeof (*xoops) +sizeof (*panic_info), stack, + offset +=sizeof (*panic_info); +sof_block_read (sdev, sdev->mmio_bar, offset, stack, stack_words *sizeof (u32)); }
sound/soc/sof/xtensa/core.c +1 -1
@@ -110,7 +110,7 @@ static void xtensa_stack(struct snd_sof_dev *sdev, void *oops, u32 *stack, u32 stack_words) {struct sof_ipc_dsp_oops_xtensa *xoops = oops; -u32 stack_ptr = xoops->stack; +u32 stack_ptr = xoops->plat_hdr.stackptr;/* 4 * 8chars + 3 ws + 1 terminating NUL */ unsigned char buf[4 *8 +3 +1 ];int i;
Signature · 1 line
2.20.1
PATCH 4/9 ASoC: SOF: bump to ABI 3.6
In reply to Pierre-Louis BossartWe had a couple of misses with ABI changes, e.g. for Xtensa oops information and the integration of sound trigger, before we set-up a formal process to track evolutions.
With this patch, the SOF kernel patches are officially aligned with the firmware 3.6 level. Changing this level has no impact on existing users and is fully backwards-compatible.
--- include/uapi/sound/sof/abi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/sound/sof/abi.h +1 -1
@@ -26,7 +26,7 @@/* SOF ABI version major, minor and patch numbers */ #define SOF_ABI_MAJOR 3 -#define SOF_ABI_MINOR 5 +#define SOF_ABI_MINOR 6#define SOF_ABI_PATCH 0/* SOF ABI version number. Format within 32bit word is MMmmmppp */
Signature · 1 line
2.20.1
Mark Brown
maintainerApplied "ASoC: SOF: bump to ABI 3.6" to the asoc tree
The patch
ASoC: SOF: bump to ABI 3.6
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.2
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
f86588302360e01fd0e0a4fc1a8d1b05e85e5173Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <[email protected]>
Date: Mon, 3 Jun 2019 11:18:16 -0500
Subject: [PATCH] ASoC: SOF: bump to ABI 3.6
We had a couple of misses with ABI changes, e.g. for Xtensa oops information and the integration of sound trigger, before we set-up a formal process to track evolutions.
With this patch, the SOF kernel patches are officially aligned with the firmware 3.6 level. Changing this level has no impact on existing users and is fully backwards-compatible.
--- include/uapi/sound/sof/abi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/sound/sof/abi.h +1 -1
@@ -26,7 +26,7 @@/* SOF ABI version major, minor and patch numbers */ #define SOF_ABI_MAJOR 3 -#define SOF_ABI_MINOR 5 +#define SOF_ABI_MINOR 6#define SOF_ABI_PATCH 0/* SOF ABI version number. Format within 32bit word is MMmmmppp */
Signature · 1 line
2.20.1
PATCH 5/9 ASoC: SOF: send time stamp to FW for alignment
In reply to Pierre-Louis BossartFrom: Bard liao <[email protected]>
Timer will be reset when DSP is powered down. So the time stamp of trace log will be reset after resume. Send time stamp to FW can align the time stamp and avoid reset time stamp in trace log.
--- include/sound/sof/header.h | 1 + include/sound/sof/trace.h | 10 ++++++++++ include/uapi/sound/sof/abi.h | 2 +- sound/soc/sof/trace.c | 16 +++++++++++++--- 4 files changed, 25 insertions(+), 4 deletions(-)
include/sound/sof/header.h +1 -0
@@ -102,6 +102,7 @@/* trace and debug */ #define SOF_IPC_TRACE_DMA_PARAMS SOF_CMD_TYPE(0x001)#define SOF_IPC_TRACE_DMA_POSITION SOF_CMD_TYPE(0x002) +#define SOF_IPC_TRACE_DMA_PARAMS_EXT SOF_CMD_TYPE(0x003)/* Get message component id */ #define SOF_IPC_MESSAGE_ID (x) ((x) & 0xffff)
include/sound/sof/trace.h +10 -0
@@ -19,12 +19,22 @@#define SOF_TRACE_FILENAME_SIZE 32/* DMA for Trace params info - SOF_IPC_DEBUG_DMA_PARAMS */ +/* Deprecated - use sof_ipc_dma_trace_params_ext */ struct sof_ipc_dma_trace_params {struct sof_ipc_cmd_hdr hdr;struct sof_ipc_host_buffer buffer;uint32_t stream_tag; } __packed; +/* DMA for Trace params info - SOF_IPC_DEBUG_DMA_PARAMS_EXT */ +struct sof_ipc_dma_trace_params_ext { +struct sof_ipc_cmd_hdr hdr; +struct sof_ipc_host_buffer buffer; +uint32_t stream_tag; +uint64_t timestamp_ns;/* in nanosecond */ +uint32_t reserved[8 ]; +} __packed; +/* DMA for Trace params info - SOF_IPC_DEBUG_DMA_PARAMS */ struct sof_ipc_dma_trace_posn {struct sof_ipc_reply rhdr;
include/uapi/sound/sof/abi.h +1 -1
@@ -26,7 +26,7 @@/* SOF ABI version major, minor and patch numbers */ #define SOF_ABI_MAJOR 3 -#define SOF_ABI_MINOR 6 +#define SOF_ABI_MINOR 7#define SOF_ABI_PATCH 0/* SOF ABI version number. Format within 32bit word is MMmmmppp */
sound/soc/sof/trace.c +13 -3
@@ -161,7 +161,9 @@ static int trace_debugfs_create(struct snd_sof_dev *sdev)int snd_sof_init_trace_ipc (struct snd_sof_dev *sdev) { -struct sof_ipc_dma_trace_params params; +struct sof_ipc_fw_ready *ready = &sdev->fw_ready; +struct sof_ipc_fw_version *v = &ready->version; +struct sof_ipc_dma_trace_params_ext params;struct sof_ipc_reply ipc_reply;int ret;
@@ -172,8 +174,16 @@ int snd_sof_init_trace_ipc(struct snd_sof_dev *sdev)return -EINVAL ;/* set IPC parameters */ - params.hdr.size =sizeof (params); - params.hdr.cmd =SOF_IPC_GLB_TRACE_MSG |SOF_IPC_TRACE_DMA_PARAMS ; + params.hdr.cmd =SOF_IPC_GLB_TRACE_MSG ; +/* PARAMS_EXT is only supported from ABI 3.7.0 onwards */ +if (v->abi_version >=SOF_ABI_VER (3 ,7 ,0 )) { + params.hdr.size =sizeof (struct sof_ipc_dma_trace_params_ext ); + params.hdr.cmd |=SOF_IPC_TRACE_DMA_PARAMS_EXT ; + params.timestamp_ns =ktime_get ();/* in nanosecond */ + }else { + params.hdr.size =sizeof (struct sof_ipc_dma_trace_params ); + params.hdr.cmd |=SOF_IPC_TRACE_DMA_PARAMS ; + } params.buffer.phy_addr = sdev->dmatp.addr; params.buffer.size = sdev->dmatb.bytes; params.buffer.pages = sdev->dma_trace_pages;
Signature · 1 line
2.20.1
Mark Brown
maintainerApplied "ASoC: SOF: send time stamp to FW for alignment" to the asoc tree
The patch
ASoC: SOF: send time stamp to FW for alignment
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
e3adc9495ab26fc4bfe29253d4e7aad47dab2307Mon Sep 17 00:00:00 2001
From: Bard liao <[email protected]>
Date: Mon, 3 Jun 2019 11:18:17 -0500
Subject: [PATCH] ASoC: SOF: send time stamp to FW for alignment
Timer will be reset when DSP is powered down. So the time stamp of trace log will be reset after resume. Send time stamp to FW can align the time stamp and avoid reset time stamp in trace log.
--- include/sound/sof/header.h | 1 + include/sound/sof/trace.h | 10 ++++++++++ include/uapi/sound/sof/abi.h | 2 +- sound/soc/sof/trace.c | 16 +++++++++++++--- 4 files changed, 25 insertions(+), 4 deletions(-)
include/sound/sof/header.h +1 -0
@@ -102,6 +102,7 @@/* trace and debug */ #define SOF_IPC_TRACE_DMA_PARAMS SOF_CMD_TYPE(0x001)#define SOF_IPC_TRACE_DMA_POSITION SOF_CMD_TYPE(0x002) +#define SOF_IPC_TRACE_DMA_PARAMS_EXT SOF_CMD_TYPE(0x003)/* Get message component id */ #define SOF_IPC_MESSAGE_ID (x) ((x) & 0xffff)
include/sound/sof/trace.h +10 -0
@@ -19,12 +19,22 @@#define SOF_TRACE_FILENAME_SIZE 32/* DMA for Trace params info - SOF_IPC_DEBUG_DMA_PARAMS */ +/* Deprecated - use sof_ipc_dma_trace_params_ext */ struct sof_ipc_dma_trace_params {struct sof_ipc_cmd_hdr hdr;struct sof_ipc_host_buffer buffer;uint32_t stream_tag; } __packed; +/* DMA for Trace params info - SOF_IPC_DEBUG_DMA_PARAMS_EXT */ +struct sof_ipc_dma_trace_params_ext { +struct sof_ipc_cmd_hdr hdr; +struct sof_ipc_host_buffer buffer; +uint32_t stream_tag; +uint64_t timestamp_ns;/* in nanosecond */ +uint32_t reserved[8 ]; +} __packed; +/* DMA for Trace params info - SOF_IPC_DEBUG_DMA_PARAMS */ struct sof_ipc_dma_trace_posn {struct sof_ipc_reply rhdr;
include/uapi/sound/sof/abi.h +1 -1
@@ -26,7 +26,7 @@/* SOF ABI version major, minor and patch numbers */ #define SOF_ABI_MAJOR 3 -#define SOF_ABI_MINOR 6 +#define SOF_ABI_MINOR 7#define SOF_ABI_PATCH 0/* SOF ABI version number. Format within 32bit word is MMmmmppp */
sound/soc/sof/trace.c +13 -3
@@ -161,7 +161,9 @@ static int trace_debugfs_create(struct snd_sof_dev *sdev)int snd_sof_init_trace_ipc (struct snd_sof_dev *sdev) { -struct sof_ipc_dma_trace_params params; +struct sof_ipc_fw_ready *ready = &sdev->fw_ready; +struct sof_ipc_fw_version *v = &ready->version; +struct sof_ipc_dma_trace_params_ext params;struct sof_ipc_reply ipc_reply;int ret;
@@ -169,8 +171,16 @@ int snd_sof_init_trace_ipc(struct snd_sof_dev *sdev)return -EINVAL ;/* set IPC parameters */ - params.hdr.size =sizeof (params); - params.hdr.cmd =SOF_IPC_GLB_TRACE_MSG |SOF_IPC_TRACE_DMA_PARAMS ; + params.hdr.cmd =SOF_IPC_GLB_TRACE_MSG ; +/* PARAMS_EXT is only supported from ABI 3.7.0 onwards */ +if (v->abi_version >=SOF_ABI_VER (3 ,7 ,0 )) { + params.hdr.size =sizeof (struct sof_ipc_dma_trace_params_ext ); + params.hdr.cmd |=SOF_IPC_TRACE_DMA_PARAMS_EXT ; + params.timestamp_ns =ktime_get ();/* in nanosecond */ + }else { + params.hdr.size =sizeof (struct sof_ipc_dma_trace_params ); + params.hdr.cmd |=SOF_IPC_TRACE_DMA_PARAMS ; + } params.buffer.phy_addr = sdev->dmatp.addr; params.buffer.size = sdev->dmatb.bytes; params.buffer.pages = sdev->dma_trace_pages;
Signature · 1 line
2.20.1
PATCH 6/9 ASoC: SOF: add mode parameter for snd_sof_debugfs_buf_item
In reply to Pierre-Louis BossartFrom: Ranjani Sridharan <[email protected]>
Add mode parameter for snd_sof_debugfs_buf_item() to specify the mode while creating debugfs entries.
--- sound/soc/sof/debug.c | 4 ++-- sound/soc/sof/loader.c | 4 ++-- sound/soc/sof/sof-priv.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
sound/soc/sof/debug.c +2 -2
@@ -161,7 +161,7 @@ EXPORT_SYMBOL_GPL(snd_sof_debugfs_io_item);/* create FS entry for debug files to expose kernel memory */ int snd_sof_debugfs_buf_item (struct snd_sof_dev *sdev,void *base,size_t size, -const char *name) +const char *name,mode_t mode) {struct snd_sof_dfsentry *dfse;
@@ -177,7 +177,7 @@ int snd_sof_debugfs_buf_item(struct snd_sof_dev *sdev, dfse->size = size; dfse->sdev = sdev; - dfse->dfsentry =debugfs_create_file (name,0444 , sdev->debugfs_root, + dfse->dfsentry =debugfs_create_file (name, mode, sdev->debugfs_root, dfse, &sof_dfs_fops);if (!dfse->dfsentry) {/* can't rely on debugfs, only log error and keep going */
sound/soc/sof/loader.c +2 -2
@@ -335,11 +335,11 @@ int snd_sof_run_firmware(struct snd_sof_dev *sdev)init_waitqueue_head (&sdev->boot_wait); sdev->boot_complete = false; -/* create fw_version debugfs to store boot version info */ +/* create read-only fw_version debugfs to store boot version info */ if (sdev->first_boot) { ret =snd_sof_debugfs_buf_item (sdev, &sdev->fw_version,sizeof (sdev->fw_version), -"fw_version" ); +"fw_version" ,0444 );/* errors are only due to memory allocation, not debugfs */ if (ret <0 ) {dev_err (sdev->dev,"error: snd_sof_debugfs_buf_item failed\n" );
sound/soc/sof/sof-priv.h +1 -1
@@ -547,7 +547,7 @@ int snd_sof_debugfs_io_item(struct snd_sof_dev *sdev, enum sof_debugfs_access_type access_type);int snd_sof_debugfs_buf_item (struct snd_sof_dev *sdev,void *base,size_t size, -const char *name); +const char *name,mode_t mode);int snd_sof_trace_update_pos (struct snd_sof_dev *sdev,struct sof_ipc_dma_trace_posn *posn);void snd_sof_trace_notify_for_error (struct snd_sof_dev *sdev);
Signature · 1 line
2.20.1
Mark Brown
maintainerApplied "ASoC: SOF: add mode parameter for snd_sof_debugfs_buf_item" to the asoc tree
The patch
ASoC: SOF: add mode parameter for snd_sof_debugfs_buf_item
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
5c9714f637365a84e05f0532cd9ae00c65b70dc1Mon Sep 17 00:00:00 2001
From: Ranjani Sridharan <[email protected]>
Date: Mon, 3 Jun 2019 11:18:18 -0500
Subject: [PATCH] ASoC: SOF: add mode parameter for snd_sof_debugfs_buf_item
Add mode parameter for snd_sof_debugfs_buf_item() to specify the mode while creating debugfs entries.
--- sound/soc/sof/debug.c | 4 ++-- sound/soc/sof/loader.c | 4 ++-- sound/soc/sof/sof-priv.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
sound/soc/sof/debug.c +2 -2
@@ -161,7 +161,7 @@ EXPORT_SYMBOL_GPL(snd_sof_debugfs_io_item);/* create FS entry for debug files to expose kernel memory */ int snd_sof_debugfs_buf_item (struct snd_sof_dev *sdev,void *base,size_t size, -const char *name) +const char *name,mode_t mode) {struct snd_sof_dfsentry *dfse;
@@ -177,7 +177,7 @@ int snd_sof_debugfs_buf_item(struct snd_sof_dev *sdev, dfse->size = size; dfse->sdev = sdev; - dfse->dfsentry =debugfs_create_file (name,0444 , sdev->debugfs_root, + dfse->dfsentry =debugfs_create_file (name, mode, sdev->debugfs_root, dfse, &sof_dfs_fops);if (!dfse->dfsentry) {/* can't rely on debugfs, only log error and keep going */
sound/soc/sof/loader.c +2 -2
@@ -335,11 +335,11 @@ int snd_sof_run_firmware(struct snd_sof_dev *sdev)init_waitqueue_head (&sdev->boot_wait); sdev->boot_complete = false; -/* create fw_version debugfs to store boot version info */ +/* create read-only fw_version debugfs to store boot version info */ if (sdev->first_boot) { ret =snd_sof_debugfs_buf_item (sdev, &sdev->fw_version,sizeof (sdev->fw_version), -"fw_version" ); +"fw_version" ,0444 );/* errors are only due to memory allocation, not debugfs */ if (ret <0 ) {dev_err (sdev->dev,"error: snd_sof_debugfs_buf_item failed\n" );
sound/soc/sof/sof-priv.h +1 -1
@@ -546,7 +546,7 @@ int snd_sof_debugfs_io_item(struct snd_sof_dev *sdev, enum sof_debugfs_access_type access_type);int snd_sof_debugfs_buf_item (struct snd_sof_dev *sdev,void *base,size_t size, -const char *name); +const char *name,mode_t mode);int snd_sof_trace_update_pos (struct snd_sof_dev *sdev,struct sof_ipc_dma_trace_posn *posn);void snd_sof_trace_notify_for_error (struct snd_sof_dev *sdev);
Signature · 1 line
2.20.1
PATCH 7/9 ASoC: SOF: ipc: Introduce SOF_IPC_GLB_TEST_MSG IPC command
In reply to Pierre-Louis BossartFrom: Ranjani Sridharan <[email protected]>
Add a new class of IPC command along with the first test type, IPC_FLOOD, which will be used for flooding the DSP with IPCs.
--- include/sound/sof/header.h | 6 +++++- sound/soc/sof/ipc.c | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-)
include/sound/sof/header.h +5 -1
@@ -49,6 +49,7 @@#define SOF_IPC_GLB_DAI_MSG SOF_GLB_TYPE(0x8U)#define SOF_IPC_GLB_TRACE_MSG SOF_GLB_TYPE(0x9U)#define SOF_IPC_GLB_GDB_DEBUG SOF_GLB_TYPE(0xAU) +#define SOF_IPC_GLB_TEST_MSG SOF_GLB_TYPE(0xBU)/* * DSP Command Message Types
@@ -99,11 +100,14 @@#define SOF_IPC_STREAM_VORBIS_PARAMS SOF_CMD_TYPE(0x010)#define SOF_IPC_STREAM_VORBIS_FREE SOF_CMD_TYPE(0x011) -/* trace and debug */ +/* trace */ #define SOF_IPC_TRACE_DMA_PARAMS SOF_CMD_TYPE(0x001)#define SOF_IPC_TRACE_DMA_POSITION SOF_CMD_TYPE(0x002)#define SOF_IPC_TRACE_DMA_PARAMS_EXT SOF_CMD_TYPE(0x003) +/* debug */ +#define SOF_IPC_TEST_IPC_FLOOD SOF_CMD_TYPE(0x001) +/* Get message component id */ #define SOF_IPC_MESSAGE_ID (x) ((x) & 0xffff)
sound/soc/sof/ipc.c +9 -0
@@ -175,6 +175,15 @@ static void ipc_log_header(struct device *dev, u8 *text, u32 cmd)break ;case SOF_IPC_GLB_TRACE_MSG : str ="GLB_TRACE_MSG" ;break ; +case SOF_IPC_GLB_TEST_MSG : + str ="GLB_TEST_MSG" ; +switch (type) { +case SOF_IPC_TEST_IPC_FLOOD : + str2 ="IPC_FLOOD" ;break ; +default : + str2 ="unknown type" ;break ; + } +break ;default : str ="unknown GLB command" ;break ; }
Signature · 1 line
2.20.1
Mark Brown
maintainerApplied "ASoC: SOF: ipc: Introduce SOF_IPC_GLB_TEST_MSG IPC command" to the asoc tree
The patch
ASoC: SOF: ipc: Introduce SOF_IPC_GLB_TEST_MSG IPC command
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
53b22d25ec36cebc2f5888a0bd5fba84b05f3deeMon Sep 17 00:00:00 2001
From: Ranjani Sridharan <[email protected]>
Date: Mon, 3 Jun 2019 11:18:19 -0500
Subject: [PATCH] ASoC: SOF: ipc: Introduce SOF_IPC_GLB_TEST_MSG IPC command
Add a new class of IPC command along with the first test type, IPC_FLOOD, which will be used for flooding the DSP with IPCs.
--- include/sound/sof/header.h | 6 +++++- sound/soc/sof/ipc.c | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-)
include/sound/sof/header.h +5 -1
@@ -49,6 +49,7 @@#define SOF_IPC_GLB_DAI_MSG SOF_GLB_TYPE(0x8U)#define SOF_IPC_GLB_TRACE_MSG SOF_GLB_TYPE(0x9U)#define SOF_IPC_GLB_GDB_DEBUG SOF_GLB_TYPE(0xAU) +#define SOF_IPC_GLB_TEST_MSG SOF_GLB_TYPE(0xBU)/* * DSP Command Message Types
@@ -99,11 +100,14 @@#define SOF_IPC_STREAM_VORBIS_PARAMS SOF_CMD_TYPE(0x010)#define SOF_IPC_STREAM_VORBIS_FREE SOF_CMD_TYPE(0x011) -/* trace and debug */ +/* trace */ #define SOF_IPC_TRACE_DMA_PARAMS SOF_CMD_TYPE(0x001)#define SOF_IPC_TRACE_DMA_POSITION SOF_CMD_TYPE(0x002)#define SOF_IPC_TRACE_DMA_PARAMS_EXT SOF_CMD_TYPE(0x003) +/* debug */ +#define SOF_IPC_TEST_IPC_FLOOD SOF_CMD_TYPE(0x001) +/* Get message component id */ #define SOF_IPC_MESSAGE_ID (x) ((x) & 0xffff)
sound/soc/sof/ipc.c +9 -0
@@ -175,6 +175,15 @@ static void ipc_log_header(struct device *dev, u8 *text, u32 cmd)break ;case SOF_IPC_GLB_TRACE_MSG : str ="GLB_TRACE_MSG" ;break ; +case SOF_IPC_GLB_TEST_MSG : + str ="GLB_TEST_MSG" ; +switch (type) { +case SOF_IPC_TEST_IPC_FLOOD : + str2 ="IPC_FLOOD" ;break ; +default : + str2 ="unknown type" ;break ; + } +break ;default : str ="unknown GLB command" ;break ; }
Signature · 1 line
2.20.1
PATCH 8/9 ASoC: SOF: debug: add new debugfs entries for IPC flood test
In reply to Pierre-Louis BossartFrom: Ranjani Sridharan <[email protected]>
Add a couple of new debugfs entries "ipc_flood_count"
and "ipc_flood_duration_ms" that can be used to
execute the IPC flood test. "ipc_flood_count" floods the DSP with the number of test IPCs specified and ipc_flood_duration_ms floods the DSP with test IPC's for the duration(in ms) specified. The test stats such as average, min and max IPC response times are logged in the dmesg and saved in the debugfs entry cache buffer.
--- sound/soc/sof/Kconfig | 8 ++ sound/soc/sof/debug.c | 243 +++++++++++++++++++++++++++++++++++++++ sound/soc/sof/sof-priv.h | 6 +- 3 files changed, 256 insertions(+), 1 deletion(-)
sound/soc/sof/Kconfig +8 -0
@@ -139,6 +139,14 @@ config SND_SOC_SOF_DEBUG_ENABLE_FIRMWARE_TRACE module parameter (similar to dynamic debug) If unsure, select "N". +config SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST + bool "SOF enable IPC flood test" + help + This option enables the IPC flood test which can be used to flood + the DSP with test IPCs and gather stats about response times. + Say Y if you want to enable IPC flood test. + If unsure, select "N". + endif ## SND_SOC_SOF_DEBUG endif ## SND_SOC_SOF_OPTIONS
sound/soc/sof/debug.c +243 -0
273 lines not on this page · raw message
sound/soc/sof/sof-priv.h +5 -1
@@ -56,6 +56,10 @@#define SOF_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | \ SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_FLOAT) +#define ENABLE_DEBUGFS_CACHEBUF \ + (IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_ENABLE_DEBUGFS_CACHE) || \ + IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST)) +struct snd_sof_dev ;struct snd_sof_ipc_msg ;struct snd_sof_ipc ;
@@ -226,7 +230,7 @@ struct snd_sof_dfsentry {* or if it is accessible only when the DSP is in D0. */ enum sof_debugfs_access_type access_type; -#if IS_ENABLED (CONFIG_SND_SOC_SOF_DEBUG_ENABLE_DEBUGFS_CACHE ) +#if ENABLE_DEBUGFS_CACHEBUF char *cache_buf;/* buffer to cache the contents of debugfs memory */ #endif struct snd_sof_dev *sdev;
Signature · 1 line
2.20.1
PATCH 9/9 ASoC: SOF: topology: add support for mux/demux component
In reply to Pierre-Louis BossartFrom: Jaska Uimonen <[email protected]>
Add enumerations to support mux/demux processing component.
--- include/sound/sof/topology.h | 3 +++ sound/soc/sof/topology.c | 2 ++ 2 files changed, 5 insertions(+)
include/sound/sof/topology.h +3 -0
@@ -35,6 +35,7 @@ enum sof_comp_type {SOF_COMP_KEYWORD_DETECT ,SOF_COMP_KPB ,/* A key phrase buffer component */ SOF_COMP_SELECTOR ,/**< channel selector component */ +SOF_COMP_DEMUX ,/* keep FILEREAD/FILEWRITE as the last ones */ SOF_COMP_FILEREAD =10000 ,/**< host test based file IO */ SOF_COMP_FILEWRITE = 10001, /**< host test based file IO */
@@ -175,6 +176,8 @@ enum sof_ipc_process_type {SOF_PROCESS_KEYWORD_DETECT ,/**< Keyword Detection */ SOF_PROCESS_KPB ,/**< KeyPhrase Buffer Manager */ SOF_PROCESS_CHAN_SELECTOR ,/**< Channel Selector */ +SOF_PROCESS_MUX , + SOF_PROCESS_DEMUX, };/* generic "effect", "codec" or proprietary processing component */
sound/soc/sof/topology.c +2 -0
@@ -394,6 +394,8 @@ static const struct sof_process_types sof_process[] = { {"KEYWORD_DETECT", SOF_PROCESS_KEYWORD_DETECT, SOF_COMP_KEYWORD_DETECT}, {"KPB", SOF_PROCESS_KPB, SOF_COMP_KPB}, {"CHAN_SELECTOR", SOF_PROCESS_CHAN_SELECTOR, SOF_COMP_SELECTOR}, + {"MUX", SOF_PROCESS_MUX, SOF_COMP_MUX}, + {"DEMUX", SOF_PROCESS_DEMUX, SOF_COMP_DEMUX}, };static enum sof_ipc_process_type find_process (const char *name)
Signature · 1 line
2.20.1
Mark Brown
maintainerApplied "ASoC: SOF: topology: add support for mux/demux component" to the asoc tree
The patch
ASoC: SOF: topology: add support for mux/demux component
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
663580695611b9c3837cdf596de2194234f0fbd5Mon Sep 17 00:00:00 2001
From: Jaska Uimonen <[email protected]>
Date: Mon, 3 Jun 2019 11:18:21 -0500
Subject: [PATCH] ASoC: SOF: topology: add support for mux/demux component
Add enumerations to support mux/demux processing component.
--- include/sound/sof/topology.h | 3 +++ sound/soc/sof/topology.c | 2 ++ 2 files changed, 5 insertions(+)
include/sound/sof/topology.h +3 -0
@@ -35,6 +35,7 @@ enum sof_comp_type {SOF_COMP_KEYWORD_DETECT ,SOF_COMP_KPB ,/* A key phrase buffer component */ SOF_COMP_SELECTOR ,/**< channel selector component */ +SOF_COMP_DEMUX ,/* keep FILEREAD/FILEWRITE as the last ones */ SOF_COMP_FILEREAD =10000 ,/**< host test based file IO */ SOF_COMP_FILEWRITE = 10001, /**< host test based file IO */
@@ -175,6 +176,8 @@ enum sof_ipc_process_type {SOF_PROCESS_KEYWORD_DETECT ,/**< Keyword Detection */ SOF_PROCESS_KPB ,/**< KeyPhrase Buffer Manager */ SOF_PROCESS_CHAN_SELECTOR ,/**< Channel Selector */ +SOF_PROCESS_MUX , + SOF_PROCESS_DEMUX, };/* generic "effect", "codec" or proprietary processing component */
sound/soc/sof/topology.c +2 -0
@@ -394,6 +394,8 @@ static const struct sof_process_types sof_process[] = { {"KEYWORD_DETECT", SOF_PROCESS_KEYWORD_DETECT, SOF_COMP_KEYWORD_DETECT}, {"KPB", SOF_PROCESS_KPB, SOF_COMP_KPB}, {"CHAN_SELECTOR", SOF_PROCESS_CHAN_SELECTOR, SOF_COMP_SELECTOR}, + {"MUX", SOF_PROCESS_MUX, SOF_COMP_MUX}, + {"DEMUX", SOF_PROCESS_DEMUX, SOF_COMP_DEMUX}, };static enum sof_ipc_process_type find_process (const char *name)
Signature · 1 line
2.20.1