Skip to content
Closed
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
2 changes: 1 addition & 1 deletion include/sound/soc-acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ struct snd_soc_acpi_mach {
const char *board;
struct snd_soc_acpi_mach * (*machine_quirk)(void *arg);
const void *quirk_data;
void *pdata;
const void *pdata;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

NAK. we can't do this, the field is used by other drivers to store non-constant information. We'd have to add a new field but we'll do this later.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You also missed the patch 'ASoC: SOF: make ops constant' that I pushed 5 days ago. I missed the spi stuff so will add it through a different PR

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good to hear that.

struct snd_soc_acpi_mach_params mach_params;
const char *sof_fw_filename;
const char *sof_tplg_filename;
Expand Down
4 changes: 2 additions & 2 deletions include/sound/sof.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ int sof_nocodec_setup(struct device *dev,
struct snd_sof_pdata *sof_pdata,
struct snd_soc_acpi_mach *mach,
const struct sof_dev_desc *desc,
struct snd_sof_dsp_ops *ops);
const struct snd_sof_dsp_ops *ops);

int sof_bes_setup(struct device *dev, struct snd_sof_dsp_ops *ops,
int sof_bes_setup(struct device *dev, const struct snd_sof_dsp_ops *ops,
struct snd_soc_dai_link *links, int link_num,
struct snd_soc_card *card);
#endif
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/apl.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static const struct snd_sof_debugfs_map apl_dsp_debugfs[] = {
};

/* apollolake ops */
struct snd_sof_dsp_ops sof_apl_ops = {
const struct snd_sof_dsp_ops sof_apl_ops = {
/* probe and remove */
.probe = hda_dsp_probe,
.remove = hda_dsp_remove,
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sof/intel/bdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ static struct snd_soc_dai_driver bdw_dai[] = {
};

/* broadwell ops */
struct snd_sof_dsp_ops sof_bdw_ops = {
const struct snd_sof_dsp_ops sof_bdw_ops = {
/*Device init */
.probe = bdw_probe,

Expand Down
4 changes: 2 additions & 2 deletions sound/soc/sof/intel/byt.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ static struct snd_soc_dai_driver byt_dai[] = {
};

/* baytrail ops */
struct snd_sof_dsp_ops sof_byt_ops = {
const struct snd_sof_dsp_ops sof_byt_ops = {
/* device init */
.probe = byt_probe,

Expand Down Expand Up @@ -751,7 +751,7 @@ struct snd_sof_dsp_ops sof_byt_ops = {
EXPORT_SYMBOL(sof_byt_ops);

/* cherrytrail and braswell ops */
struct snd_sof_dsp_ops sof_cht_ops = {
const struct snd_sof_dsp_ops sof_cht_ops = {
/* device init */
.probe = byt_probe,

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sof/intel/cnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static int cnl_ipc_send_msg(struct snd_sof_dev *sdev,
}

/* cannonlake ops */
struct snd_sof_dsp_ops sof_cnl_ops = {
const struct snd_sof_dsp_ops sof_cnl_ops = {
/* probe and remove */
.probe = hda_dsp_probe,
.remove = hda_dsp_remove,
Expand Down
8 changes: 4 additions & 4 deletions sound/soc/sof/intel/hda.h
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ struct sof_intel_dsp_desc {
int ipc_ack;
int ipc_ack_mask;
int ipc_ctl;
struct snd_sof_dsp_ops *ops;
const struct snd_sof_dsp_ops *ops;
};

#define SOF_HDA_PLAYBACK_STREAMS 16
Expand Down Expand Up @@ -530,8 +530,8 @@ extern struct snd_soc_dai_driver skl_dai[];
/*
* Platform Specific HW abstraction Ops.
*/
extern struct snd_sof_dsp_ops sof_apl_ops;
extern struct snd_sof_dsp_ops sof_cnl_ops;
extern struct snd_sof_dsp_ops sof_skl_ops;
extern const struct snd_sof_dsp_ops sof_apl_ops;
extern const struct snd_sof_dsp_ops sof_cnl_ops;
extern const struct snd_sof_dsp_ops sof_skl_ops;

#endif
2 changes: 1 addition & 1 deletion sound/soc/sof/intel/hsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ static struct snd_soc_dai_driver hsw_dai[] = {
};

/* haswell ops */
struct snd_sof_dsp_ops sof_hsw_ops = {
const struct snd_sof_dsp_ops sof_hsw_ops = {
/*Device init */
.probe = hsw_probe,

Expand Down
8 changes: 4 additions & 4 deletions sound/soc/sof/intel/shim.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@
#define PCI_PMCS 0x84
#define PCI_PMCS_PS_MASK 0x3

extern struct snd_sof_dsp_ops sof_byt_ops;
extern struct snd_sof_dsp_ops sof_cht_ops;
extern struct snd_sof_dsp_ops sof_hsw_ops;
extern struct snd_sof_dsp_ops sof_bdw_ops;
extern const struct snd_sof_dsp_ops sof_byt_ops;
extern const struct snd_sof_dsp_ops sof_cht_ops;
extern const struct snd_sof_dsp_ops sof_hsw_ops;
extern const struct snd_sof_dsp_ops sof_bdw_ops;

#endif
2 changes: 1 addition & 1 deletion sound/soc/sof/intel/skl.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static const struct snd_sof_debugfs_map skl_dsp_debugfs[] = {
};

/* skylake ops */
struct snd_sof_dsp_ops sof_skl_ops = {
const struct snd_sof_dsp_ops sof_skl_ops = {
/* probe and remove */
.probe = hda_dsp_probe,
.remove = hda_dsp_remove,
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sof/nocodec.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ int sof_nocodec_setup(struct device *dev,
struct snd_sof_pdata *sof_pdata,
struct snd_soc_acpi_mach *mach,
const struct sof_dev_desc *desc,
struct snd_sof_dsp_ops *ops)
const struct snd_sof_dsp_ops *ops)
{
struct snd_soc_dai_link *links;
int ret;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sof/ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ snd_sof_pcm_platform_pointer(struct snd_sof_dev *sdev,
return 0;
}

static inline struct snd_sof_dsp_ops
static inline const struct snd_sof_dsp_ops
*sof_get_ops(const struct sof_dev_desc *d,
const struct sof_ops_table mach_ops[], int asize)
{
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sof/sof-acpi-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static int sof_acpi_probe(struct platform_device *pdev)
struct snd_soc_acpi_mach *mach;
struct snd_sof_pdata *sof_pdata;
struct sof_platform_priv *priv;
struct snd_sof_dsp_ops *ops;
const struct snd_sof_dsp_ops *ops;
int ret = 0;

dev_dbg(&pdev->dev, "ACPI DSP detected");
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sof/sof-pci-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static int sof_pci_probe(struct pci_dev *pci,
struct snd_soc_acpi_mach *mach;
struct snd_sof_pdata *sof_pdata;
struct sof_platform_priv *priv;
struct snd_sof_dsp_ops *ops;
const struct snd_sof_dsp_ops *ops;
int ret = 0;

dev_dbg(&pci->dev, "PCI DSP detected");
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sof/sof-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ struct sof_arch_ops {
/* DSP device HW descriptor mapping between bus ID and ops */
struct sof_ops_table {
const struct sof_dev_desc *desc;
struct snd_sof_dsp_ops *ops;
const struct snd_sof_dsp_ops *ops;
};

/* FS entry for debug files that can expose DSP memories, registers */
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sof/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <sound/sof.h>
#include "sof-priv.h"

int sof_bes_setup(struct device *dev, struct snd_sof_dsp_ops *ops,
int sof_bes_setup(struct device *dev, const struct snd_sof_dsp_ops *ops,
struct snd_soc_dai_link *links, int link_num,
struct snd_soc_card *card)
{
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