OSDN Git Service

ASoC: Intel: Skylake: large_config_get overhaul
authorCezary Rojewski <cezary.rojewski@intel.com>
Thu, 8 Aug 2019 18:15:49 +0000 (20:15 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 8 Aug 2019 20:22:33 +0000 (21:22 +0100)
commit36004c42c761a6d95b867a4fbb9a955034e53351
treef07efe44fdec98551940c8eeb7672ba56c25cf07
parent63e45324c284d240562a5b435afc4b23ae7d923c
ASoC: Intel: Skylake: large_config_get overhaul

LARGE_CONFIG_GET is mainly used to retrieve requested module parameters
but it may also carry TX payload with them. Update its implementation to
account for both TX and RX data.
First reply.header carries total payload size within data_off_sizefield.
Make use of reply.header to realloc returned buffer with correct size.

Failure of IPC request is permissive - error-payload may be returned, an
informative data why GET for given param failed - and thus function
should not collapse before entire processing is finished. Caller is
responsible for checking returned payload and bytes parameters.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20190808181549.12521-3-cezary.rojewski@intel.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-messages.c
sound/soc/intel/skylake/skl-sst-ipc.c
sound/soc/intel/skylake/skl-sst-ipc.h