-
Notifications
You must be signed in to change notification settings - Fork 132
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
SOF client support (auxiliary bus) - take3 #3136
SOF client support (auxiliary bus) - take3 #3136
Conversation
aefada4
to
6e1af95
Compare
Changes since v1:
For v0 SOF CI reported 3 FAIL for APL_UP2_HDA, all three are capture tests and we only have playback support on the device. |
Interesting, typo fix in a comment and alignment fix for a function parameter broke CML_RVP_SDW and TGLH_RVP_HDA... |
for the record, the diff between v1 and v2 is: diff --git a/include/sound/sof.h b/include/sound/sof.h
index cdedf7da2e44..9102fdbe1d46 100644
--- a/include/sound/sof.h
+++ b/include/sound/sof.h
@@ -24,8 +24,9 @@ struct snd_sof_dsp_ops;
* @SOF_FW_BOOT_IN_PROGRESS: firmware boot is in progress
* @SOF_FW_BOOT_FAILED: firmware boot failed
* @SOF_FW_BOOT_READY_FAILED: firmware booted but fw_ready op failed
+ * @SOF_FW_BOOT_READY_OK: firmware booted and fw_ready op is OK
* @SOF_FW_BOOT_COMPLETE: firmware is booted up and functional
- * @SOF_FW_CRASHED: firmware crashed after sucessful boot
+ * @SOF_FW_CRASHED: firmware crashed after successful boot
*/
enum snd_sof_fw_state {
SOF_FW_BOOT_NOT_STARTED = 0,
diff --git a/sound/soc/sof/sof-client-dma-trace.c b/sound/soc/sof/sof-client-dma-trace.c
index f24e3da7216e..e7e542d68e2d 100644
--- a/sound/soc/sof/sof-client-dma-trace.c
+++ b/sound/soc/sof/sof-client-dma-trace.c
@@ -643,7 +643,7 @@ static int sof_dtrace_client_resume(struct auxiliary_device *auxdev)
}
static int sof_dtrace_client_suspend(struct auxiliary_device *auxdev,
- pm_message_t state)
+ pm_message_t state)
{
struct sof_client_dev *cdev = auxiliary_dev_to_sof_client_dev(auxdev); Something is not right for sure. It might be that IPC timeout should be treated as a feature and not a failure. Let me try that. |
6e1af95
to
46fbe99
Compare
Changes since v2:
|
Removed all reviewers for now until I figure out the root cause of the random failures reported by CI |
46fbe99
to
4bc265f
Compare
Changes since v3:
|
@ujfalusi my HDaudio renaming patch creates a conflict, can you rebase/push? Thanks! |
998f3fc
to
c1d92d5
Compare
@plbossart, done. There were one missed |
Not following, are you saying I missed one rename or you missed one? |
I think you have missed one in |
Hmm, I think I will add a fixup patch prior to the conversion for your cleanup tomorrow first thing and push the PR again so we can have a cleaner cleanup and SOF client conversion? |
sorry about the mess, I should have double-checked the new code with a regexp, I missed a couple. Now the only matches are in the Skylake driver but I am not going to touch this.
|
c1d92d5
to
c01419c
Compare
The only reference to D3_HOT and D3_COLD DSP power state is in intel/hda-dsp.c in form of a dev_dbg() print. Remove them as they are not used and even if they are they could be re-added via the substate. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
… header Move the enum sof_dsp_power_states to include/sound/sof.h to be accessible outside of the core SOF stack. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
…vents Change the parameter list for the firmware initiated message (IPC event) handler functions to: handler(struct snd_sof_dev *sdev, void *full_msg); Allocate memory and read the whole message in snd_sof_ipc_msgs_rx() then pass the pointer to the function handling the message. Do this only if we actually have a function which is tasked to process the given type. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The utils.c contains wrappers and implementation for accessing iomem mapped regions and a single unrelated function to create a compressed page table from snd_dma_buffer for firmware use. The latter is used by the PCM and the dma trace code and it needs to be moved to a generic source/header for the client conversion to be possible. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
A client in the SOF (Sound Open Firmware) context is a driver that needs to communicate with the DSP via IPC messages. The SOF core is responsible for serializing the IPC messages to the DSP from the different clients. One example of an SOF client would be an IPC test client that floods the DSP with test IPC messages to validate if the serialization works as expected. Multi-client support will also add the ability to split the existing audio cards into multiple ones, so as to e.g. to deal with HDMI with a dedicated client instead of adding HDMI to all cards. This patch introduces descriptors for SOF client driver and SOF client device along with APIs for registering and unregistering a SOF client driver, sending IPCs from a client device and accessing the SOF core debugfs root entry. Along with this, add a couple of new members to struct snd_sof_dev that will be used for maintaining the list of clients. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Co-developed-by: Fred Oh <fred.oh@linux.intel.com> Signed-off-by: Fred Oh <fred.oh@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
…ework Some SOF client can be of 'passive' type, meaning that they do not handle PM framework callbacks by themselves but rely on the auxiliary driver's suspend and resume callbacks to be notified about the core's suspend or resume event. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Move the IPC flood test code out from the debug file as separate SOF client driver. Based on the kernel configuration, the device registration for the new IPC flood test is going to happen in the core. With the separate client driver it is going to be possible to run multiple flood tests in parallel to increase the stress, the new Kconfig option can be used to select this (defaults to 1). In order to preserve backward compatibility with existing SW/scripts, the first IPC flood test's debugfs files have been linked to the old files. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Co-developed-by: Fred Oh <fred.oh@linux.intel.com> Signed-off-by: Fred Oh <fred.oh@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Move the IPC message injection code out from the debug file as separate SOF client driver. Based on the kernel configuration, the device registration for the new IPC message injector is going to happen in the core. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Add a new client driver for probes support and move all the probes-related code from the core to the client driver. The probes client driver registers a component driver with one CPU DAI driver for extraction and creates a new sound card with one DUMMY DAI link with a dummy codec that will be used for extracting audio data from specific points in the audio pipeline. The probes debugfs ops are based on the initial implementation by Cezary Rojewski and have been moved out of the SOF core into the client driver making it easier to maintain. This change will make it easier for the probes functionality to be added for all platforms without having the need to modify the existing(15+) machine drivers. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
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.
nice work @ujfalusi LGTM
Thanks all, finally merging this one. |
Hi,
This is the continuation of #3007, which grown a bit and it is impossible to follow the comments and discussions.
-- keeping it Draft still. --
The main change is that I have squashed the patches and the last four patch is the core SOF client support.
Notable changes compared to the last version of #3007 are:
https://lore.kernel.org/alsa-devel/20210901095255.3617-1-peter.ujfalusi@linux.intel.com/
Notable no changes:
PS: Take3 since the previous "SOF client support (auxiliary bus)" was in fact take2, but I used a new name. compared to the first version from me.