Skip to content

Commit f87b440

Browse files
jwrdegoedebroonie
authored andcommitted
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>
1 parent 8184e1d commit f87b440

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

sound/soc/intel/boards/cht_bsw_rt5645.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
534534
const char *platform_name;
535535
struct cht_mc_private *drv;
536536
struct acpi_device *adev;
537+
struct device *codec_dev;
537538
bool sof_parent;
538539
bool found = false;
539540
bool is_bytcr = false;
@@ -583,7 +584,14 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
583584
"i2c-%s", acpi_dev_name(adev));
584585
cht_dailink[dai_index].codecs->name = cht_rt5645_codec_name;
585586
}
587+
/* acpi_get_first_physical_node() returns a borrowed ref, no need to deref */
588+
codec_dev = acpi_get_first_physical_node(adev);
586589
acpi_dev_put(adev);
590+
if (!codec_dev)
591+
return -EPROBE_DEFER;
592+
593+
snd_soc_card_chtrt5645.components = rt5645_components(codec_dev);
594+
snd_soc_card_chtrt5650.components = rt5645_components(codec_dev);
587595

588596
/*
589597
* swap SSP0 if bytcr is detected

0 commit comments

Comments
 (0)