diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-10-15 11:07:44 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-10-15 11:07:44 -0700 |
commit | c48b75b7271db23c1b2d1204d6e8496d91f27711 (patch) | |
tree | 83c95f082e0605257b8af3ebd70b2c448262fd88 /include | |
parent | 93b694d096cc10994c817730d4d50288f9ae3d66 (diff) | |
parent | ce1558c285f9ad04c03b46833a028230771cc0a7 (diff) |
Merge tag 'sound-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"The amount of changes is smaller at this round (what a surprise), but
lots of activity is seen. Most of changes are about ASoC driver
development, especially Intel platforms. Here are some highlights:
General:
- Replace all tasklet usages with other alternatives
- Cleanup of the ASoC error unwinding code
- Fixes for trivial issues caught by static checker
- Spell fixes allover the places
ALSA Core:
- Lockdep fix for control devices
- Fix for potential OSS sequencer mutex stalls
HD-audio and USB-audio:
- SoundBlaster AE-7 support
- Changes in quirk table for the rename handling
- Quirks for HP and ASUS machines, Pioneer DJ DJM-250MK2.
ASoC:
- Lots of updates for Intel SOF and SoundWire enablement
- Replacement of the DSP driver for some older x86 systems; the new
code was written from scratch, better maintenance expected
- Helpers for parsing auxiluary devices from the device tree
- New support for AllWinner A64, Cirrus Logic CS4234, Mediatek MT6359
Microchip S/PDIF TX and RX controllers, Realtek RT1015P, and Texas
Instruments J721E, TAS2110, TAS2564 and TAS2764"
* tag 'sound-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (498 commits)
ALSA: hda/hdmi: fix incorrect locking in hdmi_pcm_close
ALSA: hda: fix jack detection with Realtek codecs when in D3
ALSA: fireworks: use semicolons rather than commas to separate statements
ALSA: hda: use semicolons rather than commas to separate statements
ALSA: hda/i915 - fix list corruption with concurrent probes
ASoC: dmaengine: Document support for TX only or RX only streams
ASoC: mchp-spdiftx: remove 'TX' from playback stream name
ASoC: ti: davinci-mcasp: Use &pdev->dev for early dev_warn
ASoC: tas2764: Add the driver for the TAS2764
dt-bindings: tas2764: Add the TAS2764 binding doc
ASoC: Intel: catpt: Add explicit DMADEVICES kconfig dependency
ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled
ASoC: stm32: dfsdm: add actual resolution trace
ASoC: stm32: dfsdm: change rate limits
ASoC: qcom: sc7180: Add support for audio over DP
Asoc: qcom: lpass-platform : Increase buffer size
ASoC: qcom: Add support for lpass hdmi driver
Asoc: qcom: lpass:Update lpaif_dmactl members order
Asoc:qcom:lpass-cpu:Update dts property read API
ASoC: dt-bindings: Add dt binding for lpass hdmi
...
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drm_audio_component.h | 4 | ||||
-rw-r--r-- | include/dt-bindings/sound/qcom,q6afe.h | 96 | ||||
-rw-r--r-- | include/dt-bindings/sound/sc7180-lpass.h | 11 | ||||
-rw-r--r-- | include/sound/hda_codec.h | 1 | ||||
-rw-r--r-- | include/sound/hda_register.h | 2 | ||||
-rw-r--r-- | include/sound/hdaudio_ext.h | 2 | ||||
-rw-r--r-- | include/sound/hdmi-codec.h | 3 | ||||
-rw-r--r-- | include/sound/pcm_params.h | 5 | ||||
-rw-r--r-- | include/sound/soc-acpi-intel-match.h | 1 | ||||
-rw-r--r-- | include/sound/soc-acpi.h | 4 | ||||
-rw-r--r-- | include/sound/soc-component.h | 28 | ||||
-rw-r--r-- | include/sound/soc-dai.h | 8 | ||||
-rw-r--r-- | include/sound/soc-link.h | 3 | ||||
-rw-r--r-- | include/sound/soc.h | 4 | ||||
-rw-r--r-- | include/sound/sof.h | 2 | ||||
-rw-r--r-- | include/sound/sof/ext_manifest.h | 7 | ||||
-rw-r--r-- | include/sound/sof/info.h | 6 | ||||
-rw-r--r-- | include/sound/sof/topology.h | 12 | ||||
-rw-r--r-- | include/sound/timer.h | 8 | ||||
-rw-r--r-- | include/trace/events/hswadsp.h | 385 | ||||
-rw-r--r-- | include/uapi/sound/sof/abi.h | 2 | ||||
-rw-r--r-- | include/uapi/sound/sof/tokens.h | 5 |
22 files changed, 181 insertions, 418 deletions
diff --git a/include/drm/drm_audio_component.h b/include/drm/drm_audio_component.h index a45f93487039..0d36bfd1a4cd 100644 --- a/include/drm/drm_audio_component.h +++ b/include/drm/drm_audio_component.h @@ -117,6 +117,10 @@ struct drm_audio_component { * @audio_ops: Ops implemented by hda driver, called by DRM driver */ const struct drm_audio_component_audio_ops *audio_ops; + /** + * @master_bind_complete: completion held during component master binding + */ + struct completion master_bind_complete; }; #endif /* _DRM_AUDIO_COMPONENT_H_ */ diff --git a/include/dt-bindings/sound/qcom,q6afe.h b/include/dt-bindings/sound/qcom,q6afe.h index 1df06f8ad5c3..f64b5d2e6efd 100644 --- a/include/dt-bindings/sound/qcom,q6afe.h +++ b/include/dt-bindings/sound/qcom,q6afe.h @@ -107,6 +107,100 @@ #define QUINARY_TDM_RX_7 102 #define QUINARY_TDM_TX_7 103 #define DISPLAY_PORT_RX 104 +#define WSA_CODEC_DMA_RX_0 105 +#define WSA_CODEC_DMA_TX_0 106 +#define WSA_CODEC_DMA_RX_1 107 +#define WSA_CODEC_DMA_TX_1 108 +#define WSA_CODEC_DMA_TX_2 109 +#define VA_CODEC_DMA_TX_0 110 +#define VA_CODEC_DMA_TX_1 111 +#define VA_CODEC_DMA_TX_2 112 +#define RX_CODEC_DMA_RX_0 113 +#define TX_CODEC_DMA_TX_0 114 +#define RX_CODEC_DMA_RX_1 115 +#define TX_CODEC_DMA_TX_1 116 +#define RX_CODEC_DMA_RX_2 117 +#define TX_CODEC_DMA_TX_2 118 +#define RX_CODEC_DMA_RX_3 119 +#define TX_CODEC_DMA_TX_3 120 +#define RX_CODEC_DMA_RX_4 121 +#define TX_CODEC_DMA_TX_4 122 +#define RX_CODEC_DMA_RX_5 123 +#define TX_CODEC_DMA_TX_5 124 +#define RX_CODEC_DMA_RX_6 125 +#define RX_CODEC_DMA_RX_7 126 -#endif /* __DT_BINDINGS_Q6_AFE_H__ */ +#define LPASS_CLK_ID_PRI_MI2S_IBIT 1 +#define LPASS_CLK_ID_PRI_MI2S_EBIT 2 +#define LPASS_CLK_ID_SEC_MI2S_IBIT 3 +#define LPASS_CLK_ID_SEC_MI2S_EBIT 4 +#define LPASS_CLK_ID_TER_MI2S_IBIT 5 +#define LPASS_CLK_ID_TER_MI2S_EBIT 6 +#define LPASS_CLK_ID_QUAD_MI2S_IBIT 7 +#define LPASS_CLK_ID_QUAD_MI2S_EBIT 8 +#define LPASS_CLK_ID_SPEAKER_I2S_IBIT 9 +#define LPASS_CLK_ID_SPEAKER_I2S_EBIT 10 +#define LPASS_CLK_ID_SPEAKER_I2S_OSR 11 +#define LPASS_CLK_ID_QUI_MI2S_IBIT 12 +#define LPASS_CLK_ID_QUI_MI2S_EBIT 13 +#define LPASS_CLK_ID_SEN_MI2S_IBIT 14 +#define LPASS_CLK_ID_SEN_MI2S_EBIT 15 +#define LPASS_CLK_ID_INT0_MI2S_IBIT 16 +#define LPASS_CLK_ID_INT1_MI2S_IBIT 17 +#define LPASS_CLK_ID_INT2_MI2S_IBIT 18 +#define LPASS_CLK_ID_INT3_MI2S_IBIT 19 +#define LPASS_CLK_ID_INT4_MI2S_IBIT 20 +#define LPASS_CLK_ID_INT5_MI2S_IBIT 21 +#define LPASS_CLK_ID_INT6_MI2S_IBIT 22 +#define LPASS_CLK_ID_QUI_MI2S_OSR 23 +#define LPASS_CLK_ID_PRI_PCM_IBIT 24 +#define LPASS_CLK_ID_PRI_PCM_EBIT 25 +#define LPASS_CLK_ID_SEC_PCM_IBIT 26 +#define LPASS_CLK_ID_SEC_PCM_EBIT 27 +#define LPASS_CLK_ID_TER_PCM_IBIT 28 +#define LPASS_CLK_ID_TER_PCM_EBIT 29 +#define LPASS_CLK_ID_QUAD_PCM_IBIT 30 +#define LPASS_CLK_ID_QUAD_PCM_EBIT 31 +#define LPASS_CLK_ID_QUIN_PCM_IBIT 32 +#define LPASS_CLK_ID_QUIN_PCM_EBIT 33 +#define LPASS_CLK_ID_QUI_PCM_OSR 34 +#define LPASS_CLK_ID_PRI_TDM_IBIT 35 +#define LPASS_CLK_ID_PRI_TDM_EBIT 36 +#define LPASS_CLK_ID_SEC_TDM_IBIT 37 +#define LPASS_CLK_ID_SEC_TDM_EBIT 38 +#define LPASS_CLK_ID_TER_TDM_IBIT 39 +#define LPASS_CLK_ID_TER_TDM_EBIT 40 +#define LPASS_CLK_ID_QUAD_TDM_IBIT 41 +#define LPASS_CLK_ID_QUAD_TDM_EBIT 42 +#define LPASS_CLK_ID_QUIN_TDM_IBIT 43 +#define LPASS_CLK_ID_QUIN_TDM_EBIT 44 +#define LPASS_CLK_ID_QUIN_TDM_OSR 45 +#define LPASS_CLK_ID_MCLK_1 46 +#define LPASS_CLK_ID_MCLK_2 47 +#define LPASS_CLK_ID_MCLK_3 48 +#define LPASS_CLK_ID_MCLK_4 49 +#define LPASS_CLK_ID_INTERNAL_DIGITAL_CODEC_CORE 50 +#define LPASS_CLK_ID_INT_MCLK_0 51 +#define LPASS_CLK_ID_INT_MCLK_1 52 +#define LPASS_CLK_ID_MCLK_5 53 +#define LPASS_CLK_ID_WSA_CORE_MCLK 54 +#define LPASS_CLK_ID_WSA_CORE_NPL_MCLK 55 +#define LPASS_CLK_ID_VA_CORE_MCLK 56 +#define LPASS_CLK_ID_TX_CORE_MCLK 57 +#define LPASS_CLK_ID_TX_CORE_NPL_MCLK 58 +#define LPASS_CLK_ID_RX_CORE_MCLK 59 +#define LPASS_CLK_ID_RX_CORE_NPL_MCLK 60 +#define LPASS_CLK_ID_VA_CORE_2X_MCLK 61 + +#define LPASS_HW_AVTIMER_VOTE 101 +#define LPASS_HW_MACRO_VOTE 102 +#define LPASS_HW_DCODEC_VOTE 103 + +#define Q6AFE_MAX_CLK_ID 104 +#define LPASS_CLK_ATTRIBUTE_INVALID 0x0 +#define LPASS_CLK_ATTRIBUTE_COUPLE_NO 0x1 +#define LPASS_CLK_ATTRIBUTE_COUPLE_DIVIDEND 0x2 +#define LPASS_CLK_ATTRIBUTE_COUPLE_DIVISOR 0x3 + +#endif /* __DT_BINDINGS_Q6_AFE_H__ */ diff --git a/include/dt-bindings/sound/sc7180-lpass.h b/include/dt-bindings/sound/sc7180-lpass.h new file mode 100644 index 000000000000..56ecaafd2dc6 --- /dev/null +++ b/include/dt-bindings/sound/sc7180-lpass.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __DT_SC7180_LPASS_H +#define __DT_SC7180_LPASS_H + +#define MI2S_PRIMARY 0 +#define MI2S_SECONDARY 1 +#define LPASS_DP_RX 2 + +#define LPASS_MCLK0 0 + +#endif /* __DT_APQ8016_LPASS_H */ diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h index 0fea49bfc5e8..73827b7d17e0 100644 --- a/include/sound/hda_codec.h +++ b/include/sound/hda_codec.h @@ -253,6 +253,7 @@ struct hda_codec { unsigned int force_pin_prefix:1; /* Add location prefix */ unsigned int link_down_at_suspend:1; /* link down at runtime suspend */ unsigned int relaxed_resume:1; /* don't resume forcibly for jack */ + unsigned int forced_resume:1; /* forced resume for jack */ unsigned int mst_no_extra_pcms:1; /* no backup PCMs for DP-MST */ #ifdef CONFIG_PM diff --git a/include/sound/hda_register.h b/include/sound/hda_register.h index 057d2a2d0bd0..4f987b1f32f7 100644 --- a/include/sound/hda_register.h +++ b/include/sound/hda_register.h @@ -119,7 +119,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 }; #define AZX_REG_VS_EM3U 0x103C #define AZX_REG_VS_EM4L 0x1040 #define AZX_REG_VS_EM4U 0x1044 -#define AZX_REG_VS_LTRC 0x1048 +#define AZX_REG_VS_LTRP 0x1048 #define AZX_REG_VS_D0I3C 0x104A #define AZX_REG_VS_PCE 0x104B #define AZX_REG_VS_L2MAGC 0x1050 diff --git a/include/sound/hdaudio_ext.h b/include/sound/hdaudio_ext.h index ef88b20c7b0a..7abf74c1c474 100644 --- a/include/sound/hdaudio_ext.h +++ b/include/sound/hdaudio_ext.h @@ -10,7 +10,7 @@ int snd_hdac_ext_bus_init(struct hdac_bus *bus, struct device *dev, void snd_hdac_ext_bus_exit(struct hdac_bus *bus); int snd_hdac_ext_bus_device_init(struct hdac_bus *bus, int addr, - struct hdac_device *hdev); + struct hdac_device *hdev, int type); void snd_hdac_ext_bus_device_exit(struct hdac_device *hdev); void snd_hdac_ext_bus_device_remove(struct hdac_bus *bus); diff --git a/include/sound/hdmi-codec.h b/include/sound/hdmi-codec.h index 7754631a3102..b55970859a13 100644 --- a/include/sound/hdmi-codec.h +++ b/include/sound/hdmi-codec.h @@ -117,9 +117,6 @@ struct hdmi_codec_pdata { struct snd_soc_component; struct snd_soc_jack; -int hdmi_codec_set_jack_detect(struct snd_soc_component *component, - struct snd_soc_jack *jack); - #define HDMI_CODEC_DRV_NAME "hdmi-audio-codec" #endif /* __HDMI_CODEC_H__ */ diff --git a/include/sound/pcm_params.h b/include/sound/pcm_params.h index 36f94735d23d..ba184f49f7e1 100644 --- a/include/sound/pcm_params.h +++ b/include/sound/pcm_params.h @@ -23,11 +23,6 @@ int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params, #define MASK_OFS(i) ((i) >> 5) #define MASK_BIT(i) (1U << ((i) & 31)) -static inline size_t snd_mask_sizeof(void) -{ - return sizeof(struct snd_mask); -} - static inline void snd_mask_none(struct snd_mask *mask) { memset(mask, 0, sizeof(*mask)); diff --git a/include/sound/soc-acpi-intel-match.h b/include/sound/soc-acpi-intel-match.h index ab6f75a86611..5c49e7d78002 100644 --- a/include/sound/soc-acpi-intel-match.h +++ b/include/sound/soc-acpi-intel-match.h @@ -16,7 +16,6 @@ */ extern struct snd_soc_acpi_mach snd_soc_acpi_intel_haswell_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_broadwell_machines[]; -extern struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_legacy_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_skl_machines[]; diff --git a/include/sound/soc-acpi.h b/include/sound/soc-acpi.h index d2e9e3b4d7ea..b16a844d16ef 100644 --- a/include/sound/soc-acpi.h +++ b/include/sound/soc-acpi.h @@ -58,7 +58,7 @@ static inline struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg) * snd_soc_acpi_mach_params: interface for machine driver configuration * * @acpi_ipc_irq_index: used for BYT-CR detection - * @platform: string used for HDaudio codec support + * @platform: string used for HDAudio codec support * @codec_mask: used for HDAudio support * @common_hdmi_codec_drv: use commom HDAudio HDMI codec driver * @link_mask: links enabled on the board @@ -93,11 +93,13 @@ struct snd_soc_acpi_endpoint { * @adr: 64 bit ACPI _ADR value * @num_endpoints: number of endpoints for this device * @endpoints: array of endpoints + * @name_prefix: string used for codec controls */ struct snd_soc_acpi_adr_device { const u64 adr; const u8 num_endpoints; const struct snd_soc_acpi_endpoint *endpoints; + const char *name_prefix; }; /** diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index 089ea9441fd1..2c790ce95259 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -217,6 +217,11 @@ struct snd_soc_component { /* machine specific init */ int (*init)(struct snd_soc_component *component); + /* function mark */ + struct snd_pcm_substream *mark_module; + struct snd_pcm_substream *mark_open; + void *mark_pm; + #ifdef CONFIG_DEBUG_FS struct dentry *debugfs_root; const char *debugfs_prefix; @@ -370,17 +375,19 @@ void snd_soc_component_exit_regmap(struct snd_soc_component *component); #endif #define snd_soc_component_module_get_when_probe(component)\ - snd_soc_component_module_get(component, 0) -#define snd_soc_component_module_get_when_open(component) \ - snd_soc_component_module_get(component, 1) + snd_soc_component_module_get(component, NULL, 0) +#define snd_soc_component_module_get_when_open(component, substream) \ + snd_soc_component_module_get(component, substream, 1) int snd_soc_component_module_get(struct snd_soc_component *component, + struct snd_pcm_substream *substream, int upon_open); #define snd_soc_component_module_put_when_remove(component) \ - snd_soc_component_module_put(component, 0) -#define snd_soc_component_module_put_when_close(component) \ - snd_soc_component_module_put(component, 1) + snd_soc_component_module_put(component, NULL, 0, 0) +#define snd_soc_component_module_put_when_close(component, substream, rollback) \ + snd_soc_component_module_put(component, substream, 1, rollback) void snd_soc_component_module_put(struct snd_soc_component *component, - int upon_open); + struct snd_pcm_substream *substream, + int upon_open, int rollback); static inline void snd_soc_component_set_drvdata(struct snd_soc_component *c, void *data) @@ -424,7 +431,8 @@ int snd_soc_component_force_enable_pin_unlocked( int snd_soc_component_open(struct snd_soc_component *component, struct snd_pcm_substream *substream); int snd_soc_component_close(struct snd_soc_component *component, - struct snd_pcm_substream *substream); + struct snd_pcm_substream *substream, + int rollback); void snd_soc_component_suspend(struct snd_soc_component *component); void snd_soc_component_resume(struct snd_soc_component *component); int snd_soc_component_is_suspended(struct snd_soc_component *component); @@ -457,5 +465,9 @@ void snd_soc_pcm_component_hw_free(struct snd_pcm_substream *substream, struct snd_soc_component *last); int snd_soc_pcm_component_trigger(struct snd_pcm_substream *substream, int cmd); +int snd_soc_pcm_component_pm_runtime_get(struct snd_soc_pcm_runtime *rtd, + void *stream); +void snd_soc_pcm_component_pm_runtime_put(struct snd_soc_pcm_runtime *rtd, + void *stream, int rollback); #endif /* __SOC_COMPONENT_H */ diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 776a60529e70..2150bd4c7a05 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -153,7 +153,7 @@ void snd_soc_dai_hw_free(struct snd_soc_dai *dai, int snd_soc_dai_startup(struct snd_soc_dai *dai, struct snd_pcm_substream *substream); void snd_soc_dai_shutdown(struct snd_soc_dai *dai, - struct snd_pcm_substream *substream); + struct snd_pcm_substream *substream, int rollback); snd_pcm_sframes_t snd_soc_dai_delay(struct snd_soc_dai *dai, struct snd_pcm_substream *substream); void snd_soc_dai_suspend(struct snd_soc_dai *dai); @@ -388,6 +388,9 @@ struct snd_soc_dai { struct list_head list; + /* function mark */ + struct snd_pcm_substream *mark_startup; + /* bit field */ unsigned int probed:1; }; @@ -471,7 +474,8 @@ static inline int snd_soc_dai_set_sdw_stream(struct snd_soc_dai *dai, * This routine only retrieves that was previously configured * with snd_soc_dai_get_sdw_stream() * - * Returns pointer to stream or -ENOTSUPP if callback is not supported; + * Returns pointer to stream or an ERR_PTR value, e.g. + * ERR_PTR(-ENOTSUPP) if callback is not supported; */ static inline void *snd_soc_dai_get_sdw_stream(struct snd_soc_dai *dai, int direction) diff --git a/include/sound/soc-link.h b/include/sound/soc-link.h index 337ac5666757..dac6c0ce6ede 100644 --- a/include/sound/soc-link.h +++ b/include/sound/soc-link.h @@ -14,7 +14,8 @@ int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params); int snd_soc_link_startup(struct snd_pcm_substream *substream); -void snd_soc_link_shutdown(struct snd_pcm_substream *substream); +void snd_soc_link_shutdown(struct snd_pcm_substream *substream, + int rollback); int snd_soc_link_prepare(struct snd_pcm_substream *substream); int snd_soc_link_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params); diff --git a/include/sound/soc.h b/include/sound/soc.h index fc4fcac72cf7..3b038c563ae1 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1159,6 +1159,9 @@ struct snd_soc_pcm_runtime { unsigned int num; /* 0-based and monotonic increasing */ struct list_head list; /* rtd list of the soc card */ + /* function mark */ + struct snd_pcm_substream *mark_startup; + /* bit field */ unsigned int pop_wait:1; unsigned int fe_compr:1; /* for Dynamic PCM */ @@ -1333,6 +1336,7 @@ void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card, int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, const char *propname); +int snd_soc_of_parse_aux_devs(struct snd_soc_card *card, const char *propname); unsigned int snd_soc_of_parse_daifmt(struct device_node *np, const char *prefix, struct device_node **bitclkmaster, diff --git a/include/sound/sof.h b/include/sound/sof.h index f3e716c8ce1c..9aa055289dcc 100644 --- a/include/sound/sof.h +++ b/include/sound/sof.h @@ -66,6 +66,8 @@ struct sof_dev_desc { /* alternate list of machines using this configuration */ struct snd_soc_acpi_mach *alt_machines; + bool use_acpi_target_states; + /* Platform resource indexes in BAR / ACPI resources. */ /* Must set to -1 if not used - add new items to end */ int resindex_lpe_base; diff --git a/include/sound/sof/ext_manifest.h b/include/sound/sof/ext_manifest.h index 04359cda92dc..342e86e54db5 100644 --- a/include/sound/sof/ext_manifest.h +++ b/include/sound/sof/ext_manifest.h @@ -60,6 +60,7 @@ enum sof_ext_man_elem_type { SOF_EXT_MAN_ELEM_FW_VERSION = 0, SOF_EXT_MAN_ELEM_WINDOW = SOF_IPC_EXT_WINDOW, SOF_EXT_MAN_ELEM_CC_VERSION = SOF_IPC_EXT_CC_INFO, + SOF_EXT_MAN_ELEM_DBG_ABI = SOF_IPC_EXT_USER_ABI_INFO, }; /* extended manifest element header */ @@ -92,4 +93,10 @@ struct sof_ext_man_cc_version { struct sof_ipc_cc_version cc_version; } __packed; +struct ext_man_dbg_abi { + struct sof_ext_man_elem_header hdr; + /* use sof_ipc struct because of code re-use */ + struct sof_ipc_user_abi_version dbg_abi; +} __packed; + #endif /* __SOF_FIRMWARE_EXT_MANIFEST_H__ */ diff --git a/include/sound/sof/info.h b/include/sound/sof/info.h index 5a55ba8b7e56..0b7101aef596 100644 --- a/include/sound/sof/info.h +++ b/include/sound/sof/info.h @@ -46,9 +46,11 @@ struct sof_ipc_fw_version { uint8_t time[10]; uint8_t tag[6]; uint32_t abi_version; + /* used to check FW and ldc file compatibility, reproducible value */ + uint32_t src_hash; /* reserved for future use */ - uint32_t reserved[4]; + uint32_t reserved[3]; } __packed; /* FW ready Message - sent by firmware when boot has completed */ @@ -99,7 +101,7 @@ struct sof_ipc_window_elem { struct sof_ipc_window { struct sof_ipc_ext_data_hdr ext_hdr; uint32_t num_windows; - struct sof_ipc_window_elem window[]; + struct sof_ipc_window_elem window[SOF_IPC_MAX_ELEMS]; } __packed; struct sof_ipc_cc_version { diff --git a/include/sound/sof/topology.h b/include/sound/sof/topology.h index f56e80d09b32..d12736e14b69 100644 --- a/include/sound/sof/topology.h +++ b/include/sound/sof/topology.h @@ -57,8 +57,8 @@ struct sof_ipc_comp { uint32_t pipeline_id; uint32_t core; - /* reserved for future use */ - uint32_t reserved[1]; + /* extended data length, 0 if no extended data */ + uint32_t ext_data_length; } __packed; /* @@ -87,6 +87,9 @@ struct sof_ipc_comp { */ #define SOF_BUF_UNDERRUN_PERMITTED BIT(1) +/* the UUID size in bytes, shared between FW and host */ +#define SOF_UUID_SIZE 16 + /* create new component buffer - SOF_IPC_TPLG_BUFFER_NEW */ struct sof_ipc_buffer { struct sof_ipc_comp comp; @@ -300,4 +303,9 @@ enum sof_event_types { SOF_KEYWORD_DETECT_DAPM_EVENT, }; +/* extended data struct for UUID components */ +struct sof_ipc_comp_ext { + uint8_t uuid[SOF_UUID_SIZE]; +} __packed; + #endif diff --git a/include/sound/timer.h b/include/sound/timer.h index 23e885d31525..760e132cc0cd 100644 --- a/include/sound/timer.h +++ b/include/sound/timer.h @@ -21,13 +21,13 @@ #define SNDRV_TIMER_HW_STOP 0x00000002 /* call stop before start */ #define SNDRV_TIMER_HW_SLAVE 0x00000004 /* only slave timer (variable resolution) */ #define SNDRV_TIMER_HW_FIRST 0x00000008 /* first tick can be incomplete */ -#define SNDRV_TIMER_HW_TASKLET 0x00000010 /* timer is called from tasklet */ +#define SNDRV_TIMER_HW_WORK 0x00000010 /* timer is called from work */ #define SNDRV_TIMER_IFLG_SLAVE 0x00000001 #define SNDRV_TIMER_IFLG_RUNNING 0x00000002 #define SNDRV_TIMER_IFLG_START 0x00000004 #define SNDRV_TIMER_IFLG_AUTO 0x00000008 /* auto restart */ -#define SNDRV_TIMER_IFLG_FAST 0x00000010 /* fast callback (do not use tasklet) */ +#define SNDRV_TIMER_IFLG_FAST 0x00000010 /* fast callback (do not use work) */ #define SNDRV_TIMER_IFLG_CALLBACK 0x00000020 /* timer callback is active */ #define SNDRV_TIMER_IFLG_EXCLUSIVE 0x00000040 /* exclusive owner - no more instances */ #define SNDRV_TIMER_IFLG_EARLY_EVENT 0x00000080 /* write early event to the poll queue */ @@ -74,7 +74,7 @@ struct snd_timer { struct list_head active_list_head; struct list_head ack_list_head; struct list_head sack_list_head; /* slow ack list head */ - struct tasklet_struct task_queue; + struct work_struct task_work; int max_instances; /* upper limit of timer instances */ int num_instances; /* current number of timer instances */ }; @@ -96,7 +96,7 @@ struct snd_timer_instance { unsigned long ticks; /* auto-load ticks when expired */ unsigned long cticks; /* current ticks */ unsigned long pticks; /* accumulated ticks for callback */ - unsigned long resolution; /* current resolution for tasklet */ + unsigned long resolution; /* current resolution for work */ unsigned long lost; /* lost ticks */ int slave_class; unsigned int slave_id; diff --git a/include/trace/events/hswadsp.h b/include/trace/events/hswadsp.h deleted file mode 100644 index 939d7a09d73f..000000000000 --- a/include/trace/events/hswadsp.h +++ /dev/null @@ -1,385 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM hswadsp - -#if !defined(_TRACE_HSWADSP_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_HSWADSP_H - -#include <linux/types.h> -#include <linux/ktime.h> -#include <linux/tracepoint.h> - -struct sst_hsw; -struct sst_hsw_stream; -struct sst_hsw_ipc_stream_free_req; -struct sst_hsw_ipc_volume_req; -struct sst_hsw_ipc_stream_alloc_req; -struct sst_hsw_audio_data_format_ipc; -struct sst_hsw_ipc_stream_info_reply; -struct sst_hsw_ipc_device_config_req; - -DECLARE_EVENT_CLASS(sst_irq, - - TP_PROTO(uint32_t status, uint32_t mask), - - TP_ARGS(status, mask), - - TP_STRUCT__entry( - __field( unsigned int, status ) - __field( unsigned int, mask ) - ), - - TP_fast_assign( - __entry->status = status; - __entry->mask = mask; - ), - - TP_printk("status 0x%8.8x mask 0x%8.8x", - (unsigned int)__entry->status, (unsigned int)__entry->mask) -); - -DEFINE_EVENT(sst_irq, sst_irq_busy, - - TP_PROTO(unsigned int status, unsigned int mask), - - TP_ARGS(status, mask) - -); - -DEFINE_EVENT(sst_irq, sst_irq_done, - - TP_PROTO(unsigned int status, unsigned int mask), - - TP_ARGS(status, mask) - -); - -DECLARE_EVENT_CLASS(ipc, - - TP_PROTO(const char *name, int val), - - TP_ARGS(name, val), - - TP_STRUCT__entry( - __string( name, name ) - __field( unsigned int, val ) - ), - - TP_fast_assign( - __assign_str(name, name); - __entry->val = val; - ), - - TP_printk("%s 0x%8.8x", __get_str(name), (unsigned int)__entry->val) - -); - -DEFINE_EVENT(ipc, ipc_request, - - TP_PROTO(const char *name, int val), - - TP_ARGS(name, val) - -); - -DEFINE_EVENT(ipc, ipc_reply, - - TP_PROTO(const char *name, int val), - - TP_ARGS(name, val) - -); - -DEFINE_EVENT(ipc, ipc_pending_reply, - - TP_PROTO(const char *name, int val), - - TP_ARGS(name, val) - -); - -DEFINE_EVENT(ipc, ipc_notification, - - TP_PROTO(const char *name, int val), - - TP_ARGS(name, val) - -); - -DEFINE_EVENT(ipc, ipc_error, - - TP_PROTO(const char *name, int val), - - TP_ARGS(name, val) - -); - -DECLARE_EVENT_CLASS(stream_position, - - TP_PROTO(unsigned int id, unsigned int pos), - - TP_ARGS(id, pos), - - TP_STRUCT__entry( - __field( unsigned int, id ) - __field( unsigned int, pos ) - ), - - TP_fast_assign( - __entry->id = id; - __entry->pos = pos; - ), - - TP_printk("id %d position 0x%x", - (unsigned int)__entry->id, (unsigned int)__entry->pos) -); - -DEFINE_EVENT(stream_position, stream_read_position, - - TP_PROTO(unsigned int id, unsigned int pos), - - TP_ARGS(id, pos) - -); - -DEFINE_EVENT(stream_position, stream_write_position, - - TP_PROTO(unsigned int id, unsigned int pos), - - TP_ARGS(id, pos) - -); - -TRACE_EVENT(hsw_stream_buffer, - - TP_PROTO(struct sst_hsw_stream *stream), - - TP_ARGS(stream), - - TP_STRUCT__entry( - __field( int, id ) - __field( int, pt_addr ) - __field( int, num_pages ) - __field( int, ring_size ) - __field( int, ring_offset ) - __field( int, first_pfn ) - ), - - TP_fast_assign( - __entry->id = stream->host_id; - __entry->pt_addr = stream->request.ringinfo.ring_pt_address; - __entry->num_pages = stream->request.ringinfo.num_pages; - __entry->ring_size = stream->request.ringinfo.ring_size; - __entry->ring_offset = stream->request.ringinfo.ring_offset; - __entry->first_pfn = stream->request.ringinfo.ring_first_pfn; - ), - - TP_printk("stream %d ring addr 0x%x pages %d size 0x%x offset 0x%x PFN 0x%x", - (int) __entry->id, (int)__entry->pt_addr, - (int)__entry->num_pages, (int)__entry->ring_size, - (int)__entry->ring_offset, (int)__entry->first_pfn) -); - -TRACE_EVENT(hsw_stream_alloc_reply, - - TP_PROTO(struct sst_hsw_stream *stream), - - TP_ARGS(stream), - - TP_STRUCT__entry( - __field( int, id ) - __field( int, stream_id ) - __field( int, mixer_id ) - __field( int, peak0 ) - __field( int, peak1 ) - __field( int, vol0 ) - __field( int, vol1 ) - ), - - TP_fast_assign( - __entry->id = stream->host_id; - __entry->stream_id = stream->reply.stream_hw_id; - __entry->mixer_id = stream->reply.mixer_hw_id; - __entry->peak0 = stream->reply.peak_meter_register_address[0]; - __entry->peak1 = stream->reply.peak_meter_register_address[1]; - __entry->vol0 = stream->reply.volume_register_address[0]; - __entry->vol1 = stream->reply.volume_register_address[1]; - ), - - TP_printk("stream %d hw id %d mixer %d peak 0x%x:0x%x vol 0x%x,0x%x", - (int) __entry->id, (int) __entry->stream_id, (int)__entry->mixer_id, - (int)__entry->peak0, (int)__entry->peak1, - (int)__entry->vol0, (int)__entry->vol1) -); - -TRACE_EVENT(hsw_mixer_info_reply, - - TP_PROTO(struct sst_hsw_ipc_stream_info_reply *reply), - - TP_ARGS(reply), - - TP_STRUCT__entry( - __field( int, mixer_id ) - __field( int, peak0 ) - __field( int, peak1 ) - __field( int, vol0 ) - __field( int, vol1 ) - ), - - TP_fast_assign( - __entry->mixer_id = reply->mixer_hw_id; - __entry->peak0 = reply->peak_meter_register_address[0]; - __entry->peak1 = reply->peak_meter_register_address[1]; - __entry->vol0 = reply->volume_register_address[0]; - __entry->vol1 = reply->volume_register_address[1]; - ), - - TP_printk("mixer id %d peak 0x%x:0x%x vol 0x%x,0x%x", - (int)__entry->mixer_id, - (int)__entry->peak0, (int)__entry->peak1, - (int)__entry->vol0, (int)__entry->vol1) -); - -TRACE_EVENT(hsw_stream_data_format, - - TP_PROTO(struct sst_hsw_stream *stream, - struct sst_hsw_audio_data_format_ipc *req), - - TP_ARGS(stream, req), - - TP_STRUCT__entry( - __field( uint32_t, id ) - __field( uint32_t, frequency ) - __field( uint32_t, bitdepth ) - __field( uint32_t, map ) - __field( uint32_t, config ) - __field( uint32_t, style ) - __field( uint8_t, ch_num ) - __field( uint8_t, valid_bit ) - ), - - TP_fast_assign( - __entry->id = stream->host_id; - __entry->frequency = req->frequency; - __entry->bitdepth = req->bitdepth; - __entry->map = req->map; - __entry->config = req->config; - __entry->style = req->style; - __entry->ch_num = req->ch_num; - __entry->valid_bit = req->valid_bit; - ), - - TP_printk("stream %d freq %d depth %d map 0x%x config 0x%x style 0x%x ch %d bits %d", - (int) __entry->id, (uint32_t)__entry->frequency, - (uint32_t)__entry->bitdepth, (uint32_t)__entry->map, - (uint32_t)__entry->config, (uint32_t)__entry->style, - (uint8_t)__entry->ch_num, (uint8_t)__entry->valid_bit) -); - -TRACE_EVENT(hsw_stream_alloc_request, - - TP_PROTO(struct sst_hsw_stream *stream, - struct sst_hsw_ipc_stream_alloc_req *req), - - TP_ARGS(stream, req), - - TP_STRUCT__entry( - __field( uint32_t, id ) - __field( uint8_t, path_id ) - __field( uint8_t, stream_type ) - __field( uint8_t, format_id ) - ), - - TP_fast_assign( - __entry->id = stream->host_id; - __entry->path_id = req->path_id; - __entry->stream_type = req->stream_type; - __entry->format_id = req->format_id; - ), - - TP_printk("stream %d path %d type %d format %d", - (int) __entry->id, (uint8_t)__entry->path_id, - (uint8_t)__entry->stream_type, (uint8_t)__entry->format_id) -); - -TRACE_EVENT(hsw_stream_free_req, - - TP_PROTO(struct sst_hsw_stream *stream, - struct sst_hsw_ipc_stream_free_req *req), - - TP_ARGS(stream, req), - - TP_STRUCT__entry( - __field( int, id ) - __field( int, stream_id ) - ), - - TP_fast_assign( - __entry->id = stream->host_id; - __entry->stream_id = req->stream_id; - ), - - TP_printk("stream %d hw id %d", - (int) __entry->id, (int) __entry->stream_id) -); - -TRACE_EVENT(hsw_volume_req, - - TP_PROTO(struct sst_hsw_stream *stream, - struct sst_hsw_ipc_volume_req *req), - - TP_ARGS(stream, req), - - TP_STRUCT__entry( - __field( int, id ) - __field( uint32_t, channel ) - __field( uint32_t, target_volume ) - __field( uint64_t, curve_duration ) - __field( uint32_t, curve_type ) - ), - - TP_fast_assign( - __entry->id = stream->host_id; - __entry->channel = req->channel; - __entry->target_volume = req->target_volume; - __entry->curve_duration = req->curve_duration; - __entry->curve_type = req->curve_type; - ), - - TP_printk("stream %d chan 0x%x vol %d duration %llu type %d", - (int) __entry->id, (uint32_t) __entry->channel, - (uint32_t)__entry->target_volume, - (uint64_t)__entry->curve_duration, - (uint32_t)__entry->curve_type) -); - -TRACE_EVENT(hsw_device_config_req, - - TP_PROTO(struct sst_hsw_ipc_device_config_req *req), - - TP_ARGS(req), - - TP_STRUCT__entry( - __field( uint32_t, ssp ) - __field( uint32_t, clock_freq ) - __field( uint32_t, mode ) - __field( uint16_t, clock_divider ) - ), - - TP_fast_assign( - __entry->ssp = req->ssp_interface; - __entry->clock_freq = req->clock_frequency; - __entry->mode = req->mode; - __entry->clock_divider = req->clock_divider; - ), - - TP_printk("SSP %d Freq %d mode %d div %d", - (uint32_t)__entry->ssp, - (uint32_t)__entry->clock_freq, (uint32_t)__entry->mode, - (uint32_t)__entry->clock_divider) -); - -#endif /* _TRACE_HSWADSP_H */ - -/* This part must be outside protection */ -#include <trace/define_trace.h> diff --git a/include/uapi/sound/sof/abi.h b/include/uapi/sound/sof/abi.h index d54be303090f..6af32f82fb99 100644 --- a/include/uapi/sound/sof/abi.h +++ b/include/uapi/sound/sof/abi.h @@ -26,7 +26,7 @@ /* SOF ABI version major, minor and patch numbers */ #define SOF_ABI_MAJOR 3 -#define SOF_ABI_MINOR 16 +#define SOF_ABI_MINOR 17 #define SOF_ABI_PATCH 0 /* SOF ABI version number. Format within 32bit word is MMmmmppp */ diff --git a/include/uapi/sound/sof/tokens.h b/include/uapi/sound/sof/tokens.h index 5941e2eb1588..a642bf30c027 100644 --- a/include/uapi/sound/sof/tokens.h +++ b/include/uapi/sound/sof/tokens.h @@ -24,6 +24,9 @@ #define SOF_TPLG_KCTL_ENUM_ID 257 #define SOF_TPLG_KCTL_BYTES_ID 258 #define SOF_TPLG_KCTL_SWITCH_ID 259 +#define SOF_TPLG_KCTL_BYTES_VOLATILE_RO 260 +#define SOF_TPLG_KCTL_BYTES_VOLATILE_RW 261 +#define SOF_TPLG_KCTL_BYTES_WO_ID 262 /* * Tokens - must match values in topology configurations @@ -73,6 +76,8 @@ /* Token retired with ABI 3.2, do not use for new capabilities * #define SOF_TKN_COMP_PRELOAD_COUNT 403 */ +#define SOF_TKN_COMP_CORE_ID 404 +#define SOF_TKN_COMP_UUID 405 /* SSP */ #define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500 |