OSDN Git Service

ASoC: Intel: Update request-reply IPC model
authorCezary Rojewski <cezary.rojewski@intel.com>
Tue, 23 Jul 2019 14:43:40 +0000 (16:43 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 7 Aug 2019 13:26:02 +0000 (14:26 +0100)
commitabf31feea26c0f412a191c83f408311a0de7435c
tree7ba0c7444738f672652cb35c711c9c48eb00e861
parentb8ba3b572c70c8559ef76c1e0ca02e7b05126e8c
ASoC: Intel: Update request-reply IPC model

struct ipc_message contains fields: header, tx_data and tx_size which
represent TX i.e. request while RX is represented by rx_data and rx_size
with reply's header equivalent missing.

Reply header may contain some vital information including, but not
limited to, received payload size. Some IPCs have entire payload found
within RX header instead. Content and value of said header is context
dependent and may vary between firmware versions and target platform.
Current model does not allow such IPCs to function at all.

Rather than appending yet another parameter to an already long list of
such for sst_ipc_tx_message_XXXs, declare message container in form of
struct sst_ipc_message and add them to parent's ipc_message declaration.

Align haswell, baytrail and skylake with updated request-reply model and
modify their reply processing functions to save RX header within message
container. Despite the range of changes, status quo is achieved.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20190723144341.21339-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/baytrail/sst-baytrail-ipc.c
sound/soc/intel/common/sst-ipc.c
sound/soc/intel/common/sst-ipc.h
sound/soc/intel/haswell/sst-haswell-ipc.c
sound/soc/intel/skylake/cnl-sst.c
sound/soc/intel/skylake/skl-sst-ipc.c