]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: add helper to change platform name for all dailinks
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fri, 25 Jan 2019 20:34:55 +0000 (14:34 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 28 Jan 2019 18:05:38 +0000 (18:05 +0000)
commitec8ca64e6ca4e9e57e77d4599e23a9ee06d96ead
treee46c22d3403d3d4427195772ea17d69806cbceba
parent763a720a6f064d9cbdab41afc4fec5a1a8d142e5
ASoC: add helper to change platform name for all dailinks

To reuse the same machine drivers with Atom/SST, Skylake and SOF, we
need to change the default platform_name (or platforms->name in the
"modern" representation).

So far, this override was done with an automatic override, which was
broken by a set of changes for DT platforms related to deferred probe
handling.

This automatic override is actually not really needed, the machine
driver can already receive the platform name as a platform_data
parameter. This is used e.g. for HDaudio support where we have
different PCI aliases used for different platforms. We can reuse the
same mechanism and modify the machine drivers to override the dailinks
prior to registrating the card.

This will require additional work for SOF, but with this helper it'll
be just two lines of additional code per machine driver which is
reused, not the end of the world.

This helper can be simplified when all drivers have transitioned to
the "modern" representation of dailinks.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h