summaryrefslogtreecommitdiff
path: root/sound/soc/sof/sof-audio.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-01-21 18:04:23 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-01-21 18:04:23 +0300
commit1946b5e4c0f81e9cc29d597904a22b78079e5fc7 (patch)
tree8a8edaffe01d35135ce572f56cd9641e2cb1f665 /sound/soc/sof/sof-audio.h
parent360c5c53fcb5a0e8533aa04717b941bd541c749e (diff)
parenta6ad5510dbb5f55cd2d1b44b11a18120bf79a5a3 (diff)
downloadlinux-1946b5e4c0f81e9cc29d597904a22b78079e5fc7.tar.xz
Merge v6.12.10
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/soc/sof/sof-audio.h')
-rw-r--r--sound/soc/sof/sof-audio.h33
1 files changed, 24 insertions, 9 deletions
diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index 3606595a7500..01b819dd8498 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -3,7 +3,7 @@
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
*
- * Copyright(c) 2019 Intel Corporation. All rights reserved.
+ * Copyright(c) 2019 Intel Corporation
*
* Author: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
*/
@@ -44,8 +44,9 @@
#define WIDGET_IS_AIF_OR_DAI(id) (WIDGET_IS_DAI(id) || WIDGET_IS_AIF(id))
#define WIDGET_IS_COPIER(id) (WIDGET_IS_AIF_OR_DAI(id) || (id) == snd_soc_dapm_buffer)
-#define SOF_DAI_CLK_INTEL_SSP_MCLK 0
-#define SOF_DAI_CLK_INTEL_SSP_BCLK 1
+#define SOF_DAI_PARAM_INTEL_SSP_MCLK 0
+#define SOF_DAI_PARAM_INTEL_SSP_BCLK 1
+#define SOF_DAI_PARAM_INTEL_SSP_TDM_SLOTS 2
enum sof_widget_op {
SOF_WIDGET_PREPARE,
@@ -91,6 +92,7 @@ struct snd_sof_pcm;
struct snd_sof_dai_config_data {
int dai_index;
int dai_data; /* contains DAI-specific information */
+ int dai_node_id; /* contains DAI-specific information for Gateway configuration */
};
/**
@@ -103,7 +105,10 @@ struct snd_sof_dai_config_data {
* additional memory in the SOF PCM stream structure
* @pcm_free: Function pointer for PCM free that can be used for freeing any
* additional memory in the SOF PCM stream structure
- * @delay: Function pointer for pcm delay calculation
+ * @pointer: Function pointer for pcm pointer
+ * Note: the @pointer callback may return -EOPNOTSUPP which should be
+ * handled in a same way as if the callback is not provided
+ * @delay: Function pointer for pcm delay reporting
* @reset_hw_params_during_stop: Flag indicating whether the hw_params should be reset during the
* STOP pcm trigger
* @ipc_first_on_start: Send IPC before invoking platform trigger during
@@ -125,6 +130,9 @@ struct sof_ipc_pcm_ops {
int (*dai_link_fixup)(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params);
int (*pcm_setup)(struct snd_sof_dev *sdev, struct snd_sof_pcm *spcm);
void (*pcm_free)(struct snd_sof_dev *sdev, struct snd_sof_pcm *spcm);
+ int (*pointer)(struct snd_soc_component *component,
+ struct snd_pcm_substream *substream,
+ snd_pcm_uframes_t *pointer);
snd_pcm_sframes_t (*delay)(struct snd_soc_component *component,
struct snd_pcm_substream *substream);
bool reset_hw_params_during_stop;
@@ -201,7 +209,7 @@ struct sof_ipc_tplg_widget_ops {
* @widget_setup: Function pointer for setting up setup in the DSP
* @widget_free: Function pointer for freeing widget in the DSP
* @dai_config: Function pointer for sending DAI config IPC to the DSP
- * @dai_get_clk: Function pointer for getting the DAI clock setting
+ * @dai_get_param: Function pointer for getting the DAI parameter
* @set_up_all_pipelines: Function pointer for setting up all topology pipelines
* @tear_down_all_pipelines: Function pointer for tearing down all topology pipelines
* @parse_manifest: Function pointer for ipc4 specific parsing of topology manifest
@@ -222,7 +230,7 @@ struct sof_ipc_tplg_ops {
int (*widget_free)(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget);
int (*dai_config)(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget,
unsigned int flags, struct snd_sof_dai_config_data *data);
- int (*dai_get_clk)(struct snd_sof_dev *sdev, struct snd_sof_dai *dai, int clk_type);
+ int (*dai_get_param)(struct snd_sof_dev *sdev, struct snd_sof_dai *dai, int param_type);
int (*set_up_all_pipelines)(struct snd_sof_dev *sdev, bool verify);
int (*tear_down_all_pipelines)(struct snd_sof_dev *sdev, bool verify);
int (*parse_manifest)(struct snd_soc_component *scomp, int index,
@@ -277,6 +285,8 @@ enum sof_tokens {
SOF_GAIN_TOKENS,
SOF_ACPDMIC_TOKENS,
SOF_ACPI2S_TOKENS,
+ SOF_MICFIL_TOKENS,
+ SOF_ACP_SDW_TOKENS,
/* this should be the last */
SOF_TOKEN_COUNT,
@@ -304,12 +314,12 @@ struct sof_token_info {
/**
* struct snd_sof_pcm_stream_pipeline_list - List of pipelines associated with a PCM stream
- * @count: number of pipeline widgets in the @pipe_widgets array
* @pipelines: array of pipelines
+ * @count: number of pipeline widgets in the @pipe_widgets array
*/
struct snd_sof_pcm_stream_pipeline_list {
- u32 count;
struct snd_sof_pipeline **pipelines;
+ u32 count;
};
/* PCM stream, mapped to FW component */
@@ -322,6 +332,7 @@ struct snd_sof_pcm_stream {
struct work_struct period_elapsed_work;
struct snd_soc_dapm_widget_list *list; /* list of connected DAPM widgets */
bool d0i3_compatible; /* DSP can be in D0I3 when this pcm is opened */
+ unsigned int dsp_max_burst_size_in_ms; /* The maximum size of the host DMA burst in ms */
/*
* flag to indicate that the DSP pipelines should be kept
* active or not while suspending the stream
@@ -336,11 +347,14 @@ struct snd_sof_pcm_stream {
/* ALSA SOF PCM device */
struct snd_sof_pcm {
struct snd_soc_component *scomp;
- struct snd_soc_tplg_pcm pcm;
struct snd_sof_pcm_stream stream[2];
struct list_head list; /* list in sdev pcm list */
struct snd_pcm_hw_params params[2];
bool prepared[2]; /* PCM_PARAMS set successfully */
+ bool pending_stop[2]; /* only used if (!pcm_ops->platform_stop_during_hw_free) */
+
+ /* Must be last - ends in a flex-array member. */
+ struct snd_soc_tplg_pcm pcm;
};
struct snd_sof_led_control {
@@ -514,6 +528,7 @@ struct snd_sof_route {
struct snd_sof_dai {
struct snd_soc_component *scomp;
const char *name;
+ u32 type;
int number_configs;
int current_config;