OSDN Git Service

ASoC: SOF: fix uninitialised "work" with VirtIO
authorGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Wed, 25 Mar 2020 21:12:31 +0000 (16:12 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 26 Mar 2020 18:31:14 +0000 (18:31 +0000)
commit9ef91cad92ba75d17d5a5203230746c9d9009705
treedcdc47d02607485c9e6853928a2786f02555ecc1
parentc688cf1d3a2cc1bca5737e7849325b3ac8e69a41
ASoC: SOF: fix uninitialised "work" with VirtIO

In the VirtIO case the sof_pcm_open() function isn't called on the
host during guest streaming, which then leaves "work" structures
uninitialised. However it is then used to handle position update
messages from the DSP. Move their initialisation to immediately after
allocation of the containing structure.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200325211233.27394-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/pcm.c
sound/soc/sof/sof-audio.h
sound/soc/sof/topology.c