]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: create pcm for codec2codec links as well
authorJerome Brunet <jbrunet@baylibre.com>
Thu, 25 Jul 2019 16:59:47 +0000 (18:59 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 1 Aug 2019 12:54:25 +0000 (13:54 +0100)
commita16d8bc27c604d0c2d8cb92810fcb79fbd547792
treea5f4e89d4fb309ec641930c339137696335d495a
parent69a41aeff547a6e62c4d2a857ff52782424c4b89
ASoC: create pcm for codec2codec links as well

At the moment, codec to codec links uses an ephemeral variable for
the struct snd_pcm_substream. Also the struct snd_soc_pcm_runtime
does not have real struct snd_pcm.

This might a problem if the functions used by a codec on codec to
codec link expect these structures to exist, and keep on existing
during the life of the codec.

For example, it is the case of the hdmi-codec, which uses
snd_pcm_add_chmap_ctls(). For the controls to works, the pcm and
substream must to exist.

This change is first step, it create pcm (and substreams) for codec
to codec links, in the same way as dpcm backend links.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20190725165949.29699-5-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c
sound/soc/soc-pcm.c