Repository navigation
Conversation
a5a03fc to
0a6b7df
Compare
|
Changes since v1:
|
plbossart
left a comment
There was a problem hiding this comment.
need @dbaluta and @ajitkupandey to review (NXP and AMD-related changes)
ajitkupandey
left a comment
There was a problem hiding this comment.
looks really good, just a minor comment with commit description
| @@ -361,8 +361,7 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data) | |||
| if (!sof_ops(sdev) || !sof_ops(sdev)->probe || !sof_ops(sdev)->run || | |||
There was a problem hiding this comment.
Commit description need to be updated , it still says "pcm_set_pipeline_offset() callback." while it's renamed to stream_data_offset()
There was a problem hiding this comment.
There is always one left ;)
I will fix it right away, thanks for spotting it!
…laration The implementation for snd_sof_ipc_stream_pcm_params() does not exist, remove it from the header file. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Instead of using the values from ipc_params, take them directly from substream->runtime. This is in preparation of making the platform hw_params callback to be IPC agnostic. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Do not send IPC structure directly via pcm_hw_params to make it IPC agnostic. A new struct is created to retrieve the needed platform parameters and if there is a need it can be extended with new options. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Call directly for snd_sof_ipc_pcm_params() from sof_pcm_hw_params() and remove the wrapper for it. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Each running audio stream's data have distinct start offset within the stream mailbox area from/to where the host can read/write. Instead of using the struct sof_ipc_pcm_params_reply to configure this offset, add an optional callback which is IPC agnostic. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
d173012
0a6b7df to
d173012
Compare
AMD is only implementing an empty function to pass the required test and it is going to be deprecated in favor of the IPC agnostic set_stream_data_offset() callback. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Add implementation for the generic set_stream_data_offset() callback in core to be used by platforms. Convert the sof_ipc_pcm_params() to a wrapper for the new function. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Add implementation for the generic set_stream_data_offset() callback to be used by HDA platforms. Convert the hda_ipc_pcm_params() to a wrapper for the new function. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Switch from the IPC dependent ipc_pcm_params() ops to the IPC neutral set_stream_data_offset(). Remove the no longer used hda_ipc_pcm_params() function as well. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The ipc_pcm_params() ops implementation for AMD is a NOP and since the callback is marked now as optional, it can be dropped along with the empty function. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Switch from the IPC dependent ipc_pcm_params() ops to the IPC neutral set_stream_data_offset(). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
All users have been converted to use the IPC agnostic set_stream_data_offsett() Remove all code related to the old API. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
|
Changes since v2:
|
|
let's wait on @dbaluta review. |
|
@ujfalusi it looks good to me. The only thing I didn't fully internalized is what is the reason for this change? I mean OK it is fine to have hw_params to be IPC neutral but is there a future change that will benefit from this? |
@dbaluta this is in preparation for introducing IPC4 which will be using new structures for IPC payload. Without this change, we'd struggle with a clean separation of sequences for the 2 different IPC versions. |
That was a good explanation. @ujfalusi is there any way to squash this information in one of the commits? |
Hi,
in the current implementation in the sof_pcm_hw_params() path we are passing IPC structures via callbacks from core to platform code to be used and/or to be updated.
This PR converts these callbacks to be IPC neutral while preserving their functionality which will allow us to create simple IPC dependent functions to deal with IPC messages based on the information we have, thus making the core functions completely IPC independent.