Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sound/soc/sof/intel/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ if SND_SOC_SOF_HDA_COMMON

config SND_SOC_SOF_HDA_LINK
bool "SOF support for HDA Links(HDA/HDMI)"
depends on SND_SOC_SOF_NOCODEC=n
select SND_SOC_SOF_PROBE_WORK_QUEUE
help
This adds support for HDA links(HDA/HDMI) with Sound Open Firmware
Expand Down
34 changes: 13 additions & 21 deletions sound/soc/sof/intel/hda.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,35 +297,27 @@ static int hda_init_caps(struct snd_sof_dev *sdev)
* If no machine driver is found, then:
*
* hda machine driver is used if :
* 1. there are HDMI codec and one external HDAudio codec
* 2. only HDMI codec and NOCODEC is not enabled
*
* nocodec machine driver would be used if:
* 1. only HDMI codec and but NOCODEC is enabled
* 2. there is no codec found
* 1. there is one HDMI codec and one external HDAudio codec
* 2. only HDMI codec
*/
if (!pdata->machine && codec_num <= 2 &&
HDA_IDISP_CODEC(bus->codec_mask)) {
if (codec_num == 2 ||
!IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC)) {
hda_mach = snd_soc_acpi_intel_hda_machines;
pdata->machine = hda_mach;
hda_mach = snd_soc_acpi_intel_hda_machines;
pdata->machine = hda_mach;

/* topology: use the info from hda_machines */
pdata->tplg_filename =
hda_mach->sof_tplg_filename;
/* topology: use the info from hda_machines */
pdata->tplg_filename =
hda_mach->sof_tplg_filename;

/* firmware: pick the first in machine list */
mach = pdata->desc->machines;
pdata->fw_filename = mach->sof_fw_filename;
/* firmware: pick the first in machine list */
mach = pdata->desc->machines;
pdata->fw_filename = mach->sof_fw_filename;

dev_info(bus->dev, "using HDA machine driver %s now\n",
hda_mach->drv_name);
}
dev_info(bus->dev, "using HDA machine driver %s now\n",
hda_mach->drv_name);

/* fixup topology file for HDMI only platforms */
if (codec_num == 1 &&
!IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC)) {
if (codec_num == 1) {
/* use local variable for readability */
tplg_filename = pdata->tplg_filename;
tplg_filename = fixup_tplg_name(sdev, tplg_filename);
Expand Down