Repository navigation
Conversation
|
SoundWire does not like this for sure. |
df7eeb5 to
5c3ec6e
Compare
5c3ec6e to
e5e0a24
Compare
yes indeed @ujfalusi ... Here's the summary of my convoluted day with lots of help from @ranj063. Freeing the widgets in .prepare is problematic because we only send the alh_index_id in the .hw_params DAI stage. So in the end we only do a pcm_ops->hw_free, which as not indicated by its name is not at all the dual operation to hw_params. pcm_ops->hw_free is really a 'post trigger' operation, and it does make sense to invoke this with the delayed stop. The last set of commits work for me in all know sof-test cases and the xrun with the gnome UI on a MTL/SoundWire device. Now it's time to debate if PR #4818 is more elegant/relevant/risky. |
|
SOFCI TEST |
ffee9fa to
3cec0be
Compare
For MeteorLake support, we need this helper back. It's not needed for previous solutions from CometLake to TigerLake, but with the change in IPC additional steps need to be done to clear the gateway node_id. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The widget_to_sdev() helper can be used in other files, move it as static inline in shared header file. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
When an xrun happens, the BE DAI hw_params doesn't get invoked before the stream restarts with a prepare. In this case, clearing the node ID when the DAI widget is freed and unprepared will result in an error when it is re-initialized. In order to avoid this, move the code to clear the node ID to the BE DAI hw_free op to keep it balanced with the BE DAI hw_params. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
…d logs For some reason the existing code stops on the first error, which potentially leaves the DMA and widgets in a weird state. Change to free-up all resources even in case of errors. Also add a more consistent error handling and logs, with the first error code returned to the caller. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The same sequence is used twice, use common helper. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Add a state variable to keep track of delayed stops, in case pcm_ops->platform_stop_during_hw_free is set. This patch should be iso-functionality, possibly removing no-op cases. The main purpose of this new state variable is to prepare a follow-up patch to reset all PCM and DMAs in case of stop/prepare xrun sequences. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
With the delayed stops, the xrun handling is problematic: the applications expects everything to be reset but the firmware and DMA are still in a PAUSED state. This patch makes sure the prepare while in stream_stopped is special-cased. Co-developed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The node_id for multi-gateway ALH DAI's get overwritten with the group_id during the DAI copier's ipc_prepare op. So, save the ALH dai_index during the BE DAI hw_params in the dai_index field of struct ipc4_copier and use that to set the device ID in the configuration blob. This will avoid errors during copier init after an xrun. Note that the dai_index is typically set in topology for DMIC/SSP, but it's not used for ALH. Reclaiming this dai_index field to store the node_id does not generate a conflict with topology-defined values. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
3cec0be to
6cce39a
Compare
|
Issues don't seem to be related to this PR https://sof-ci.01.org/linuxpr/PR4816/build1454/devicetest/index.html?model=MTLP_RVP_NOCODEC&testcase=check-playback-10sec The MOD_SET_DX looks like a known issue but I'll let @kv2019i and @ujfalusi comment https://sof-ci.01.org/linuxpr/PR4816/build1455/devicetest/index.html?model=TGLU_UP_HDA-ipc4&testcase=multiple-pause-resume-50 (filed as #4822) |
| blob->alh_cfg.mapping[i].device = alh_data->gtw_cfg.node_id; | ||
| node_type = SOF_IPC4_GET_NODE_TYPE(alh_data->gtw_cfg.node_id); | ||
| blob->alh_cfg.mapping[i].device = | ||
| SOF_IPC4_GET_NODE_TYPE(node_type); |
There was a problem hiding this comment.
Shouldn't this be SOF_IPC4_NODE_TYPE(node_type);?
|
replaced by #4829 |
tentative solution to address the problems of xruns with IPC4, where we don't properly reset DMAs/PCM.
The alternative suggested by @ujfalusi would be this
FIXME: the firmware doesn't seem to like the new transitions and loop on an error 104 which ends-up hanging the system. Probably some weird transitions I missed.Edit: the error 104 was due to the SoundWire node_id issue not reset properly.