diff options
author | Takashi Iwai <tiwai@suse.de> | 2023-12-29 15:14:02 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-12-29 15:14:07 +0100 |
commit | 3abf66a42f1ff0f5ae5de3943ce1551ceedf81a0 (patch) | |
tree | 45efce6311378bbd33378cdf2d5689ac4166cc73 /sound/soc/codecs/hdac_hda.c | |
parent | ALSA: seq: fix kvmalloc_array() arguments order (diff) | |
parent | ALSA: hda/realtek: Add quirks for Dell models (diff) | |
download | linux-3abf66a42f1ff0f5ae5de3943ce1551ceedf81a0.tar.xz linux-3abf66a42f1ff0f5ae5de3943ce1551ceedf81a0.zip |
Merge branch 'topic/cs35l41' into for-next
Pull CS35L41 codec extension series.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc/codecs/hdac_hda.c')
-rw-r--r-- | sound/soc/codecs/hdac_hda.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/sound/soc/codecs/hdac_hda.c b/sound/soc/codecs/hdac_hda.c index 0c589e46574d..6aa3223985be 100644 --- a/sound/soc/codecs/hdac_hda.c +++ b/sound/soc/codecs/hdac_hda.c @@ -132,6 +132,9 @@ static struct snd_soc_dai_driver hdac_hda_dais[] = { .sig_bits = 24, }, }, +}; + +static struct snd_soc_dai_driver hdac_hda_hdmi_dais[] = { { .id = HDAC_HDMI_0_DAI_ID, .name = "intel-hdmi-hifi1", @@ -605,8 +608,16 @@ static const struct snd_soc_component_driver hdac_hda_codec = { .endianness = 1, }; +static const struct snd_soc_component_driver hdac_hda_hdmi_codec = { + .probe = hdac_hda_codec_probe, + .remove = hdac_hda_codec_remove, + .idle_bias_on = false, + .endianness = 1, +}; + static int hdac_hda_dev_probe(struct hdac_device *hdev) { + struct hdac_hda_priv *hda_pvt = dev_get_drvdata(&hdev->dev); struct hdac_ext_link *hlink; int ret; @@ -619,9 +630,15 @@ static int hdac_hda_dev_probe(struct hdac_device *hdev) snd_hdac_ext_bus_link_get(hdev->bus, hlink); /* ASoC specific initialization */ - ret = devm_snd_soc_register_component(&hdev->dev, - &hdac_hda_codec, hdac_hda_dais, - ARRAY_SIZE(hdac_hda_dais)); + if (hda_pvt->need_display_power) + ret = devm_snd_soc_register_component(&hdev->dev, + &hdac_hda_hdmi_codec, hdac_hda_hdmi_dais, + ARRAY_SIZE(hdac_hda_hdmi_dais)); + else + ret = devm_snd_soc_register_component(&hdev->dev, + &hdac_hda_codec, hdac_hda_dais, + ARRAY_SIZE(hdac_hda_dais)); + if (ret < 0) { dev_err(&hdev->dev, "failed to register HDA codec %d\n", ret); return ret; |