summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2023-11-26 22:40:24 +0100
committerMark Brown <broonie@kernel.org>2023-12-21 21:00:47 +0000
commitf87b4402163be352601f7a012ab0d8dba7ecc64d (patch)
treee8e0079b0bce046b1bd06814d215d1710d11dfc5 /sound
parent8184e1db699befc5101bcfe401283becfc228a0b (diff)
downloadlinux-f87b4402163be352601f7a012ab0d8dba7ecc64d.tar.gz
linux-f87b4402163be352601f7a012ab0d8dba7ecc64d.tar.bz2
linux-f87b4402163be352601f7a012ab0d8dba7ecc64d.zip
ASoC: Intel: cht_bsw_rt5645: Set card.components string
Set the card.components string using the new rt5645_components() helper which returns a components string based on the DMI quirks inside the rt5645 codec driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://msgid.link/r/20231126214024.300505-8-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/intel/boards/cht_bsw_rt5645.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c
index df23a581c10e..c952a96cde7e 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5645.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5645.c
@@ -534,6 +534,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
const char *platform_name;
struct cht_mc_private *drv;
struct acpi_device *adev;
+ struct device *codec_dev;
bool sof_parent;
bool found = false;
bool is_bytcr = false;
@@ -583,7 +584,14 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
"i2c-%s", acpi_dev_name(adev));
cht_dailink[dai_index].codecs->name = cht_rt5645_codec_name;
}
+ /* acpi_get_first_physical_node() returns a borrowed ref, no need to deref */
+ codec_dev = acpi_get_first_physical_node(adev);
acpi_dev_put(adev);
+ if (!codec_dev)
+ return -EPROBE_DEFER;
+
+ snd_soc_card_chtrt5645.components = rt5645_components(codec_dev);
+ snd_soc_card_chtrt5650.components = rt5645_components(codec_dev);
/*
* swap SSP0 if bytcr is detected