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
16 changes: 12 additions & 4 deletions sound/soc/intel/boards/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ config SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH

endif ## SND_SOC_INTEL_SKYLAKE

if SND_SOC_INTEL_SKYLAKE || SND_SOC_SOF_APOLLOLAKE
if SND_SOC_INTEL_SKYLAKE || SND_SOC_SOF_APOLLOLAKE && SND_SOC_SOF_HDA_LINK

config SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH
tristate "Broxton with DA7219 and MAX98357A in I2S Mode"
Expand Down Expand Up @@ -251,6 +251,10 @@ config SND_SOC_INTEL_BXT_RT298_MACH
Say Y or m if you have such a device. This is a recommended option.
If unsure select "N".

endif

if SND_SOC_SOF_APOLLOLAKE

config SND_SOC_INTEL_BXT_PCM512x_MACH
tristate "Broxton with TI PCM512x codec"
depends on MFD_INTEL_LPSS && I2C && ACPI
Expand All @@ -271,6 +275,10 @@ config SND_SOC_INTEL_BXT_WM8804_MACH
Say Y or m if you have such a device. This is a recommended option.
If unsure select "N".

endif

if SND_SOC_INTEL_SKYLAKE || SND_SOC_SOF_APOLLOLAKE

config SND_SOC_INTEL_BXT_TDF8532_MACH
tristate "ASoC Audio driver for BXT with TDF8532 in I2S mode"
depends on X86 && ACPI && I2C
Expand Down Expand Up @@ -341,7 +349,7 @@ config SND_SOC_INTEL_KBL_DA7219_MAX98927_MACH

endif ## SND_SOC_INTEL_SKYLAKE

if SND_SOC_INTEL_SKYLAKE || SND_SOC_SOF_HDA
if SND_SOC_INTEL_SKYLAKE || SND_SOC_SOF_HDA_AUDIO_CODEC

config SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH
tristate "SKL/KBL/BXT/APL with HDA Codecs"
Expand All @@ -355,7 +363,7 @@ config SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH

endif ## SND_SOC_INTEL_SKYLAKE || SND_SOC_SOF_HDA

if SND_SOC_INTEL_SKYLAKE || SND_SOC_SOF_GEMINILAKE
if SND_SOC_INTEL_SKYLAKE || SND_SOC_SOF_GEMINILAKE && SND_SOC_SOF_HDA_LINK

config SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH
tristate "GLK with RT5682 and MAX98357A in I2S Mode"
Expand All @@ -373,7 +381,7 @@ config SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH

endif ## SND_SOC_INTEL_SKYLAKE || SND_SOC_SOF_GEMINILAKE

if SND_SOC_INTEL_SKYLAKE || SND_SOC_SOF_CANNONLAKE
if SND_SOC_INTEL_SKYLAKE || SND_SOC_SOF_CANNONLAKE && SND_SOC_SOF_HDA_LINK

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have HDMI BE dai_links in cnl_rt274.c now so no need this adding?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have HDMI BE dai_links in cnl_rt274.c now so no need this adding?

Ah yes, this was added in a prototype code. Will remove all this anyways.


config SND_SOC_INTEL_CNL_RT274_MACH
tristate "Cannonlake with RT274 I2S mode"
Expand Down
54 changes: 37 additions & 17 deletions sound/soc/sof/intel/Kconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
config SND_SOC_SOF_INTEL
tristate "SOF support for Intel audio DSPs"
depends on SND_SOC_SOF
depends on SND_DMA_SGBUF
select SND_SOC_INTEL_MACH
select SND_SOC_SOF_XTENSA
help
This adds support for Sound Open Firmware for Intel(R) platforms.
Say Y if you have such a device.
If unsure select "N".

config SND_SOC_SOF_SPIDSP
tristate "SOF support over the SPI bus"
depends on SND_SOC_SOF
Expand All @@ -20,6 +9,17 @@ config SND_SOC_SOF_SPIDSP
Say Y if you have such a device.
If unsure select "N".

config SND_SOC_SOF_INTEL
tristate "SOF support for Intel audio DSPs"
depends on SND_SOC_SOF
depends on SND_DMA_SGBUF
select SND_SOC_INTEL_MACH
select SND_SOC_SOF_XTENSA
help
This adds support for Sound Open Firmware for Intel(R) platforms.
Say Y if you have such a device.
If unsure select "N".

if SND_SOC_SOF_INTEL

config SND_SOC_SOF_BAYTRAIL
Expand Down Expand Up @@ -111,17 +111,37 @@ config SND_SOC_SOF_HDA_COMMON
tristate
select SND_SOC_SOF_PCI
select SND_SOC_ACPI_INTEL_MATCH
select SND_SOC_SOF_HDA_LINK_BASELINE

config SND_SOC_SOF_HDA
tristate "SOF support for HDA Links(HDA/HDMI)"
depends on SND_SOC_SOF_HDA_COMMON
select SND_HDA_EXT_CORE
select SND_SOC_HDAC_HDA
select SND_SOC_HDAC_HDMI
if SND_SOC_SOF_HDA_COMMON

config SND_SOC_SOF_HDA_LINK
bool "SOF support for HDA Links(HDA/HDMI)"
help
This adds support for HDA links(HDA/HDMI) with Sound Open Firmware
for Intel(R) platforms.
Say Y if you want to enble HDA links with SOF.
If unsure select "N".

if SND_SOC_SOF_HDA_LINK
config SND_SOC_SOF_HDA_AUDIO_CODEC
bool "SOF support for HDAudio codecs"
help
This adds support for HDAudio codecs with Sound Open Firmware
for Intel(R) platforms.
Say Y if you want to enble HDAudio codecs with SOF.
If unsure select "N".
endif ## SND_SOC_SOF_HDA_LINK

endif ## SND_SOC_SOF_HDA_COMMON

config SND_SOC_SOF_HDA_LINK_BASELINE
tristate
select SND_SOC_SOF_HDA if SND_SOC_SOF_HDA_LINK

config SND_SOC_SOF_HDA
tristate
select SND_HDA_EXT_CORE if SND_SOC_SOF_HDA_LINK
select SND_SOC_HDAC_HDA if SND_SOC_SOF_HDA_AUDIO_CODEC

endif ## SND_SOC_SOF_INTEL
19 changes: 18 additions & 1 deletion sound/soc/sof/intel/hda-codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@
#include <sound/hda_i915.h>
#include <sound/hda_register.h>
#include <sound/hda_codec.h>

#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
#include "../../codecs/hdac_hda.h"
#endif /* CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC */

#include "../sof-priv.h"
#include "../ops.h"
#include "hda.h"

#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
#define IDISP_VID_INTEL 0x80860000

/* load the legacy HDA codec driver */
Expand All @@ -47,12 +49,16 @@ static void hda_codec_load_module(struct hda_codec *codec)
static void hda_codec_load_module(struct hda_codec *codec) {}
#endif

#endif /* CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC */

/* probe individual codec */
static int hda_codec_probe(struct snd_sof_dev *sdev, int address)
{
struct hda_bus *hbus = sof_to_hbus(sdev);
struct hdac_device *hdev;
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
struct hdac_hda_priv *hda_priv;
#endif
u32 hda_cmd = (address << 28) | (AC_NODE_ROOT << 20) |
(AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID;
u32 resp = -1;
Expand All @@ -67,6 +73,7 @@ static int hda_codec_probe(struct snd_sof_dev *sdev, int address)
dev_dbg(sdev->dev, "HDA codec #%d probed OK: response: %x\n",
address, resp);

#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
hda_priv = devm_kzalloc(&hbus->pci->dev, sizeof(*hda_priv),
GFP_KERNEL);
if (!hda_priv)
Expand All @@ -86,6 +93,16 @@ static int hda_codec_probe(struct snd_sof_dev *sdev, int address)
}

return 0;
#else
hdev = devm_kzalloc(&hbus->pci->dev, sizeof(*hdev),
GFP_KERNEL);
if (!hdev)
return -ENOMEM;

ret = snd_hdac_ext_bus_device_init(&hbus->core, address, hdev);

return ret;
#endif
}

/* Codec initialization */
Expand Down
4 changes: 3 additions & 1 deletion sound/soc/sof/intel/hda.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
#include "../sof-priv.h"
#include "../ops.h"
#include "hda.h"
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
#include "../../codecs/hdac_hda.h"
#endif

/* platform specific devices */
#include "shim.h"
Expand Down Expand Up @@ -397,7 +399,7 @@ static int hda_init(struct snd_sof_dev *sdev)
bus = sof_to_bus(sdev);

/* HDA bus init */
#if IS_ENABLED(CONFIG_SND_SOC_HDAC_HDA)
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
ext_ops = snd_soc_hdac_hda_get_ops();
#endif
sof_hda_bus_init(bus, &pci->dev, ext_ops);
Expand Down