ASoC: Intel: boards: harden codec property handling
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fri, 13 Aug 2021 15:11:09 +0000 (10:11 -0500)
committerMark Brown <broonie@kernel.org>
Fri, 13 Aug 2021 15:50:37 +0000 (16:50 +0100)
commitc50f126b3c9ebb77585838726a3a490ad33b92cd
treec6fb371887b313f7c68268608fb6a86a7b3e3f06
parent772d44526e203c062171786e514373f129616278
ASoC: Intel: boards: harden codec property handling

In current ACPI-based devices, the DSDT does not include any of the
properties required by the codec driver. This is not an ACPI
limitation proper since the _DSD method could be used, as done for
Camera and SoundWire in newer platforms. For legacy devices, there is
unfortunately no other option than using a work-around: we add
properties to the codec device from the machine driver.

To avoid any issues with the codec driver being unbound, we need to
keep a reference to the codec device until the card is removed.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Co-developed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210813151116.23931-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/bytcht_es8316.c
sound/soc/intel/boards/bytcr_rt5640.c
sound/soc/intel/boards/bytcr_rt5651.c