]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: Intel: hda: assign link DMA channel at run-time
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Wed, 12 Jun 2019 17:23:36 +0000 (12:23 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 17 Jun 2019 12:37:16 +0000 (13:37 +0100)
commit03a0b8e92b4ef0862a44c273d2afec15a79ce3b1
tree481b38a46933ca89eb1903802ca36ff13d64d7e4
parent8b40b346a12c9c5b12cf49e0fbff5241f4a17afc
ASoC: SOF: Intel: hda: assign link DMA channel at run-time

The recommended HDA HW programming sequence for setting
the DMA format requires that the link DMA and host DMA
channels be coupled before setting the format. This
change means that host DMA or link DMA channels be
reserved even if only one is used.

Statically assigned link DMA channels would mean that
all the corresponding host DMA channels will need to be
reserved, leaving only a few channels available at run-time.
So, the suggestion here is to switch to dynamically assigning
both host DMA channels and link DMA channels are run-time.

The host DMA channel is assigned when the pcm
is opened as before. While choosing the link DMA channel,
if the host DMA channel corresponding to the link DMA channel
is already taken, the proposed method checks to make
sure that the BE is connected to the FE that has been assigned
this host DMA channel. Once the link DMA channel is assigned,
an IPC is sent to the DSP to set the link DMA channel.

The link DMA channel is freed during hw_free() and also in the
SUSPEND trigger callback. It will be re-assigned when hw_params
are set upon resume.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-dai.c
sound/soc/sof/sof-priv.h
sound/soc/sof/topology.c