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
28 changes: 21 additions & 7 deletions include/sound/soc-acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,37 @@ struct snd_soc_acpi_package_context {
#define SND_ACPI_I2C_ID_LEN (4 + ACPI_ID_LEN + 3 + 1)

#if IS_ENABLED(CONFIG_ACPI)
/* acpi match */
struct snd_soc_acpi_mach *
snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines);

bool snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
struct snd_soc_acpi_package_context *ctx);

/* check all codecs */
struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg);

#else
/* acpi match */
static inline struct snd_soc_acpi_mach *
snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
{
return NULL;
}

static inline bool
snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
struct snd_soc_acpi_package_context *ctx)
{
return false;
}
#endif

/* acpi match */
struct snd_soc_acpi_mach *
snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines);
/* check all codecs */
static inline struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
{
return NULL;
}
#endif

/**
* snd_soc_acpi_mach_params: interface for machine driver configuration
Expand Down Expand Up @@ -105,7 +122,4 @@ struct snd_soc_acpi_codecs {
u8 codecs[SND_SOC_ACPI_MAX_CODECS][ACPI_ID_LEN];
};

/* check all codecs */
struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg);

#endif
8 changes: 6 additions & 2 deletions sound/soc/sof/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if SND_SOC_SOF_TOPLEVEL
config SND_SOC_SOF_PCI
tristate "SOF PCI enumeration support"
depends on PCI
select SND_SOC_SOF
select SND_SOC_SOF_OPTIONS
select SND_SOC_SOF_INTEL_PCI if SND_SOC_SOF_INTEL_TOPLEVEL
help
Expand All @@ -22,6 +23,7 @@ config SND_SOC_SOF_PCI
config SND_SOC_SOF_ACPI
tristate "SOF ACPI enumeration support"
depends on ACPI || COMPILE_TEST
select SND_SOC_SOF
select SND_SOC_SOF_OPTIONS
select SND_SOC_SOF_INTEL_ACPI if SND_SOC_SOF_INTEL_TOPLEVEL
select IOSF_MBI if X86
Expand All @@ -35,6 +37,7 @@ config SND_SOC_SOF_SPI
tristate "SOF SPI support"
select SPI
select SPI_MASTER
select SND_SOC_SOF
select SND_SOC_SOF_OPTIONS
select SND_SOC_SOF_SPIDSP
help
Expand Down Expand Up @@ -135,8 +138,9 @@ config SND_SOC_SOF
help
This option is not user-selectable but automagically handled by
'select' statements at a higher level
Due to module dependencies this option needs to be selected
at the lowest level for each platform
The selection is made at the top level and does not exactly follow
module dependencies but since the module or built-in type is decided
at the top level it doesn't matter.

source "sound/soc/sof/intel/Kconfig"
source "sound/soc/sof/xtensa/Kconfig"
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sof/hw-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ static int spi_cmd_done(struct snd_sof_dev *sof_dev __maybe_unused, int dir __ma
}

/* SPI SOF ops */
struct snd_sof_dsp_ops snd_sof_spi_ops = {
const struct snd_sof_dsp_ops snd_sof_spi_ops = {
/* device init */
.probe = spi_sof_probe,
.remove = spi_sof_remove,
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sof/hw-spi.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef HW_SPI_H
#define HW_SPI_H

extern struct snd_sof_dsp_ops snd_sof_spi_ops;
extern const struct snd_sof_dsp_ops snd_sof_spi_ops;

#endif
2 changes: 1 addition & 1 deletion sound/soc/sof/intel/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ config SND_SOC_SOF_INTEL_COMMON
tristate
select SND_SOC_ACPI_INTEL_MATCH
select SND_SOC_SOF_XTENSA
select SND_SOC_SOF
select SND_SOC_INTEL_MACH
select SND_SOC_ACPI if ACPI
help
This option is not user-selectable but automagically handled by
'select' statements at a higher level
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sof/virtio-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static int virtio_fe_remove(struct snd_sof_dev *sdev)
}

/* baytrail ops */
struct snd_sof_dsp_ops snd_sof_virtio_fe_ops = {
const struct snd_sof_dsp_ops snd_sof_virtio_fe_ops = {
/* device init */
.probe = virtio_fe_probe,
.remove = virtio_fe_remove,
Expand Down