Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/soc/sof/ipc3.c
static int sof_ipc3_ctx_save(struct snd_sof_dev *sdev) { return sof_ipc3_ctx_ipc(sdev, SOF_IPC_PM_CTX_SAVE); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc3.c
static int sof_ipc3_ctx_restore(struct snd_sof_dev *sdev) { return sof_ipc3_ctx_ipc(sdev, SOF_IPC_PM_CTX_RESTORE); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc4-control.c
static bool sof_ipc4_volume_put(struct snd_sof_control *scontrol, struct snd_ctl_elem_value *ucontrol) { struct sof_ipc4_control_data *cdata = scontrol->ipc_control_data; struct snd_soc_component *scomp = scontrol->scomp; struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(sco...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/ipc4-loader.c
static int sof_ipc4_validate_firmware(struct snd_sof_dev *sdev) { struct sof_ipc4_fw_data *ipc4_data = sdev->private; u32 fw_hdr_offset = ipc4_data->manifest_fw_hdr_offset; struct sof_man4_fw_binary_header *fw_header; const struct firmware *fw = sdev->basefw.fw; struct sof_ext_manifest4_hdr *ext_man_hdr; e...
[ 0, 1 ]
Linux Kernel
sound/soc/sof/ipc4-loader.c
int sof_ipc4_reload_fw_libraries(struct snd_sof_dev *sdev) { struct sof_ipc4_fw_data *ipc4_data = sdev->private; struct sof_ipc4_fw_library *fw_lib; unsigned long lib_id; int ret = 0; xa_for_each_start(&ipc4_data->fw_lib_xa, lib_id, fw_lib, 1) { ret = ipc4_data->load_library(sdev, fw_lib, true); if ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc4-mtrace.c
static int sof_ipc4_mtrace_dfs_open(struct inode *inode, struct file *file) { struct sof_mtrace_core_data *core_data = inode->i_private; int ret; mutex_lock(&core_data->buffer_lock); if (core_data->log_buffer) { ret = -EBUSY; goto out; } ret = debugfs_file_get(file->f_path.dentry); if (unlikel...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc4-mtrace.c
static int sof_ipc4_mtrace_dfs_release(struct inode *inode, struct file *file) { struct sof_mtrace_core_data *core_data = inode->i_private; debugfs_file_put(file->f_path.dentry); mutex_lock(&core_data->buffer_lock); kfree(core_data->log_buffer); core_data->log_buffer = NULL; mutex_unlock(&core_data->buff...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc4-mtrace.c
static int ipc4_mtrace_enable(struct snd_sof_dev *sdev) { struct sof_mtrace_priv *priv = sdev->fw_trace_data; const struct sof_ipc_ops *iops = sdev->ipc->ops; struct sof_ipc4_msg msg; u64 system_time; ktime_t kt; int ret; if (priv->mtrace_state != SOF_MTRACE_DISABLED) return 0; msg.primary = SOF_I...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/ipc4-mtrace.c
static int ipc4_mtrace_init(struct snd_sof_dev *sdev) { struct sof_ipc4_fw_data *ipc4_data = sdev->private; struct sof_mtrace_priv *priv; int i, ret; if (sdev->fw_trace_data) { dev_err(sdev->dev, "fw_trace_data has been already allocated\n"); return -EBUSY; } if (!ipc4_data->mtrace_log_bytes || ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc4-mtrace.c
static void ipc4_mtrace_free(struct snd_sof_dev *sdev) { ipc4_mtrace_disable(sdev); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc4-pcm.c
int sof_ipc4_set_pipeline_state(struct snd_sof_dev *sdev, u32 id, u32 state) { struct sof_ipc4_msg msg = {{0}}; u32 primary; dev_dbg(sdev->dev, "ipc4 set pipeline %d state %d", id, state); primary = state; primary |= SOF_IPC4_GLB_PIPE_STATE_ID(id); primary |= SOF_IPC4_MSG_TYPE_SET(SOF_IPC4_GLB_SET_PIPELI...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc4-pcm.c
static int sof_ipc4_pcm_trigger(struct snd_soc_component *component, struct snd_pcm_substream *substream, int cmd) { int state; switch (cmd) { case SNDRV_PCM_TRIGGER_PAUSE_PUSH: state = SOF_IPC4_PIPE_PAUSED; break; case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: case SNDRV_PCM_T...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc4-topology.c
static void sof_ipc4_free_audio_fmt(struct sof_ipc4_available_audio_format *available_fmt) { kfree(available_fmt->base_config); available_fmt->base_config = NULL; kfree(available_fmt->out_audio_fmt); available_fmt->out_audio_fmt = NULL; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc4-topology.c
static void sof_ipc4_widget_free_comp_pipeline(struct snd_sof_widget *swidget) { kfree(swidget->private); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc4-topology.c
static int sof_ipc4_widget_setup_comp_pipeline(struct snd_sof_widget *swidget) { struct snd_soc_component *scomp = swidget->scomp; struct sof_ipc4_pipeline *pipeline; int ret; pipeline = kzalloc(sizeof(*pipeline), GFP_KERNEL); if (!pipeline) return -ENOMEM; ret = sof_update_ipc_object(scomp, pip...
[ 1, 1 ]
Linux Kernel
sound/soc/sof/ipc4-topology.c
static int sof_ipc4_widget_setup_comp_mixer(struct snd_sof_widget *swidget) { struct snd_soc_component *scomp = swidget->scomp; struct sof_ipc4_mixer *mixer; int ret; dev_dbg(scomp->dev, "Updating IPC structure for %s\n", swidget->widget->name); mixer = kzalloc(sizeof(*mixer), GFP_KERNEL); if (!mixer) ...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/ipc4-topology.c
static int sof_ipc4_widget_assign_instance_id(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget) { struct sof_ipc4_fw_module *fw_module = swidget->module_info; int max_instances = fw_module->man4_module_entry.instance_max_count; swidget->instance_id = i...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc4-topology.c
static int sof_ipc4_prepare_mixer_module( struct snd_sof_widget *swidget, struct snd_pcm_hw_params *fe_params, struct snd_sof_platform_stream_params *platform_params, struct snd_pcm_hw_params *pipeline_params, int dir) { struct snd_soc_component *scomp = swidget->scomp; struct snd_sof_dev *sdev = snd_so...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/ipc4-topology.c
static int sof_ipc4_prepare_src_module( struct snd_sof_widget *swidget, struct snd_pcm_hw_params *fe_params, struct snd_sof_platform_stream_params *platform_params, struct snd_pcm_hw_params *pipeline_params, int dir) { struct snd_soc_component *scomp = swidget->scomp; struct snd_sof_dev *sdev = snd_soc_...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/ipc4-topology.c
static int sof_ipc4_control_load_volume(struct snd_sof_dev *sdev, struct snd_sof_control *scontrol) { struct sof_ipc4_control_data *control_data; struct sof_ipc4_msg *msg; int i; scontrol->size = struct_size(control_data, chanv, scontrol->num_channels); scontrol->ipc_...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc4-topology.c
static int sof_ipc4_control_setup(struct snd_sof_dev *sdev, struct snd_sof_control *scontrol) { switch (scontrol->info_type) { case SND_SOC_TPLG_CTL_VOLSW: case SND_SOC_TPLG_CTL_VOLSW_SX: case SND_SOC_TPLG_CTL_VOLSW_XR_SX: return sof_ipc4_control_load_volume(sdev, scontrol...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc4-topology.c
static int sof_ipc4_dai_config(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget, unsigned int flags, struct snd_sof_dai_config_data *data) { struct snd_sof_widget *pipe_widget = swidget->pipe_widget; struct sof_ipc4...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc4-topology.c
static int sof_ipc4_dai_get_clk(struct snd_sof_dev *sdev, struct snd_sof_dai *dai, int clk_type) { struct sof_ipc4_copier *ipc4_copier = dai->private; struct snd_soc_tplg_hw_config *hw_config; struct snd_sof_dai_link *slink; bool dai_link_found = false; bool hw_cfg_found = fal...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ipc4.c
static void sof_ipc4_log_header(struct device *dev, u8 *text, struct sof_ipc4_msg *msg, bool data_size_valid) { if (!sof_debug_check_flag(SOF_DBG_PRINT_DMA_POSITION_UPDATE_LOGS) && !SOF_IPC4_MSG_IS_MODULE_MSG(msg->primary) && SOF_IPC4_MSG_TY...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/ipc4.c
static int ipc4_tx_msg_unlocked(struct snd_sof_ipc *ipc, void *msg_data, size_t msg_bytes, void *reply_data, size_t reply_bytes) { struct sof_ipc4_msg *ipc4_msg = msg_data; struct snd_sof_dev *sdev = ipc->sdev; int ret; if (msg_bytes > ipc->max_pa...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/ipc4.c
static int sof_ipc4_tx_msg(struct snd_sof_dev *sdev, void *msg_data, size_t msg_bytes, void *reply_data, size_t reply_bytes, bool no_pm) { struct snd_sof_ipc *ipc = sdev->ipc; #ifdef DEBUG_VERBOSE struct sof_ipc4_msg *msg = NULL; #endif int ret; if (!msg_da...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8186/mt8186-clk.c
static int adsp_enable_all_clock(struct snd_sof_dev *sdev) { struct adsp_priv *priv = sdev->pdata->hw_pdata; struct device *dev = sdev->dev; int ret; ret = clk_prepare_enable(priv->clk[CLK_TOP_AUDIODSP]); if (ret) { dev_err(dev, "%s clk_prepare_enable(audiodsp) fail %d\n", __func__, ret); return ret...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8186/mt8186-clk.c
static void adsp_disable_all_clock(struct snd_sof_dev *sdev) { struct adsp_priv *priv = sdev->pdata->hw_pdata; clk_disable_unprepare(priv->clk[CLK_TOP_ADSP_BUS]); clk_disable_unprepare(priv->clk[CLK_TOP_AUDIODSP]); }
[ 1, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8186/mt8186-clk.c
int mt8186_adsp_clock_on(struct snd_sof_dev *sdev) { struct device *dev = sdev->dev; int ret; ret = adsp_enable_all_clock(sdev); if (ret) { dev_err(dev, "failed to adsp_enable_clock: %d\n", ret); return ret; } snd_sof_dsp_write(sdev, DSP_REG_BAR, ADSP_CK_EN, UART_EN | DMA_EN | ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8186/mt8186.c
static int mt8186_get_window_offset(struct snd_sof_dev *sdev, u32 id) { return MBOX_OFFSET; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8186/mt8186.c
static void mt8186_dsp_handle_request(struct mtk_adsp_ipc *ipc) { struct adsp_priv *priv = mtk_adsp_ipc_get_data(ipc); u32 p; int ret; /* Read the message from the debug box. */ sof_mailbox_read(priv->sdev, priv->sdev->debug_box.offset + 4, &p, sizeof(p)); /* Check to see if the message is a panic code 0x...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8186/mt8186.c
static int adsp_memory_remap_init(struct snd_sof_dev *sdev, struct mtk_adsp_chip_info *adsp) { u32 offset; offset = adsp->pa_dram - DRAM_PHYS_BASE_FROM_DSP_VIEW; adsp->dram_offset = offset; offset >>= DRAM_REMAP_SHIFT; dev_dbg(sdev->dev, "adsp->pa_dram %pa, offset %#x\n", &...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8186/mt8186.c
static int mt8186_run(struct snd_sof_dev *sdev) { u32 adsp_bootup_addr; adsp_bootup_addr = SRAM_PHYS_BASE_FROM_DSP_VIEW; dev_dbg(sdev->dev, "HIFIxDSP boot from base : 0x%08X\n", adsp_bootup_addr); mt8186_sof_hifixdsp_boot_sequence(sdev, adsp_bootup_addr); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8186/mt8186.c
static int mt8186_dsp_resume(struct snd_sof_dev *sdev) { int ret; ret = mt8186_adsp_clock_on(sdev); if (ret) { dev_err(sdev->dev, "mt8186_adsp_clock_on fail!\n"); return ret; } adsp_sram_power_on(sdev); return ret; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8186/mt8186.c
static int mt8186_get_bar_index(struct snd_sof_dev *sdev, u32 type) { return type; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8186/mt8186.c
static snd_pcm_uframes_t mt8186_pcm_pointer(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream) { int ret; snd_pcm_uframes_t pos; struct snd_sof_pcm *spcm; struct sof_ipc_stream_posn posn; struct snd_sof_pcm_stream *stream; struct snd_soc_component *scomp = sdev->component; ...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8195/mt8195-clk.c
static int adsp_default_clk_init(struct snd_sof_dev *sdev, bool enable) { struct device *dev = sdev->dev; struct adsp_priv *priv = sdev->pdata->hw_pdata; int ret; dev_dbg(dev, "%s: %s\n", __func__, enable ? "on" : "off"); if (enable) { ret = clk_set_parent(priv->clk[CLK_TOP_ADSP], priv->clk[CLK_TOP_CLK...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8195/mt8195-loader.c
void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr) { snd_sof_dsp_write(sdev, DSP_REG_BAR, DSP_ALTRESETVEC, boot_addr); /* pull high RunStall (set bit3 to 1) */ snd_sof_dsp_update_bits(sdev, DSP_REG_BAR, DSP_RESET_SW, ADSP_RUNSTALL, ADSP_RUNSTALL); /* pull high ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8195/mt8195.c
static int mt8195_send_msg(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg) { struct adsp_priv *priv = sdev->pdata->hw_pdata; sof_mailbox_write(sdev, sdev->host_box.offset, msg->msg_data, msg->msg_size); return mtk_adsp_ipc_send(priv->dsp_ipc, MTK_ADSP_IPC_REQ, ...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8195/mt8195.c
static int adsp_memory_remap_init(struct device *dev, struct mtk_adsp_chip_info *adsp) { void __iomem *vaddr_emi_map; int offset; if (!adsp) return -ENXIO; vaddr_emi_map = devm_ioremap(dev, DSP_EMI_MAP_ADDR, 0x4); if (!vaddr_emi_map) { dev_err(dev, "failed to iorema...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8195/mt8195.c
static int mt8195_run(struct snd_sof_dev *sdev) { u32 adsp_bootup_addr; adsp_bootup_addr = SRAM_PHYS_BASE_FROM_DSP_VIEW; dev_dbg(sdev->dev, "HIFIxDSP boot from base : 0x%08X\n", adsp_bootup_addr); sof_hifixdsp_boot_sequence(sdev, adsp_bootup_addr); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8195/mt8195.c
static int mt8195_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state) { struct platform_device *pdev = container_of(sdev->dev, struct platform_device, dev); int ret; u32 reset_sw, dbg_pc; ret = snd_sof_dsp_read_poll_timeout(sdev, DSP_REG_BAR, DSP_RESET_SW, reset_sw, ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/mediatek/mt8195/mt8195.c
static int mt8195_get_bar_index(struct snd_sof_dev *sdev, u32 type) { return type; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/nocodec.c
static int sof_nocodec_probe(struct platform_device *pdev) { struct snd_soc_card *card = &sof_nocodec_card; struct snd_soc_acpi_mach *mach; int ret; card->dev = &pdev->dev; card->topology_shortname_created = true; mach = pdev->dev.platform_data; ret = sof_nocodec_setup(card->dev, mach->mach_params.num_...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ops.c
static bool snd_sof_pci_update_bits_unlocked(struct snd_sof_dev *sdev, u32 offset, u32 mask, u32 value) { struct pci_dev *pci = to_pci_dev(sdev->dev); unsigned int old, new; u32 ret = 0; pci_read_config_dword(pci, offset, &ret); old = ret; dev_dbg(sdev->dev, "D...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/ops.c
bool snd_sof_dsp_update_bits_unlocked(struct snd_sof_dev *sdev, u32 bar, u32 offset, u32 mask, u32 value) { unsigned int old, new; u32 ret; ret = snd_sof_dsp_read(sdev, bar, offset); old = ret; new = (old & ~mask) | (value & mask); if (old == new) return false; ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ops.c
void snd_sof_dsp_panic(struct snd_sof_dev *sdev, u32 offset, bool non_recoverable) { if (!sdev->dsp_oops_offset) sdev->dsp_oops_offset = offset; /* * Print warning if the offset from the panic message differs from * dsp_oops_offset */ if (sdev->dsp_oops_offset != offset) ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ops.h
static inline int snd_sof_probe(struct snd_sof_dev *sdev) { return sof_ops(sdev)->probe(sdev); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ops.h
static inline int snd_sof_dsp_reset(struct snd_sof_dev *sdev) { if (sof_ops(sdev)->reset) return sof_ops(sdev)->reset(sdev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ops.h
static inline int snd_sof_dsp_parse_platform_ext_manifest( struct snd_sof_dev *sdev, const struct sof_ext_man_elem_header *hdr) { if (sof_ops(sdev)->parse_platform_ext_manifest) return sof_ops(sdev)->parse_platform_ext_manifest(sdev, hdr); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ops.h
static inline int snd_sof_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state) { if (sof_ops(sdev)->suspend) return sof_ops(sdev)->suspend(sdev, target_state); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ops.h
static inline int snd_sof_dsp_runtime_resume(struct snd_sof_dev *sdev) { if (sof_ops(sdev)->runtime_resume) return sof_ops(sdev)->runtime_resume(sdev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ops.h
static inline int snd_sof_dsp_runtime_suspend(struct snd_sof_dev *sdev) { if (sof_ops(sdev)->runtime_suspend) return sof_ops(sdev)->runtime_suspend(sdev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ops.h
static inline int snd_sof_dsp_block_read(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_type, u32 offset, void *dest, size_t bytes) { return sof_ops(sdev)->block_read(sdev, blk_type, offset, dest, bytes); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ops.h
static inline void snd_sof_dsp_mailbox_write(struct snd_sof_dev *sdev, u32 offset, void *src, size_t bytes) { if (sof_ops(sdev)->mailbox_write) sof_ops(sdev)->mailbox_write(sdev, offset, src, bytes); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ops.h
static inline int snd_sof_pcm_platform_open(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream) { if (sof_ops(sdev) && sof_ops(sdev)->pcm_open) return sof_ops(sdev)->pcm_open(sdev, substream); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ops.h
static inline int snd_sof_pcm_platform_hw_params( struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_sof_platform_stream_params *platform_params) { if (sof_ops(sdev) && sof_ops(sdev)->pcm_hw_params) return sof_ops(sdev)->pcm_hw_params(sdev, subs...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ops.h
static inline int snd_sof_pcm_platform_trigger(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, int cmd) { if (sof_ops(sdev) && sof_ops(sdev)->pcm_trigger) return sof_ops(sdev)->pcm_trigger(sdev, substream, cmd); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ops.h
static inline int snd_sof_machine_register(struct snd_sof_dev *sdev, void *pdata) { if (sof_ops(sdev) && sof_ops(sdev)->machine_register) return sof_ops(sdev)->machine_register(sdev, pdata); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/ops.h
static inline struct snd_soc_acpi_mach * snd_sof_machine_select(struct snd_sof_dev *sdev) { if (sof_ops(sdev) && sof_ops(sdev)->machine_select) return sof_ops(sdev)->machine_select(sdev); return NULL; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/pcm.c
static int sof_pcm_setup_connected_widgets( struct snd_sof_dev *sdev, struct snd_soc_pcm_runtime *rtd, struct snd_sof_pcm *spcm, struct snd_pcm_hw_params *params, struct snd_sof_platform_stream_params *platform_params, int dir) { struct snd_soc_dai *dai; int ret, j; for_each_rtd_cpu_dais(rtd, j, dai)...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/pcm.c
static int sof_pcm_close(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); struct snd_sof_pcm *spcm; int err; if (rtd->da...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/pcm.c
int sof_pcm_dai_link_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) { struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); struct snd_...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/pcm.c
static void sof_pcm_remove(struct snd_soc_component *component) { snd_soc_tplg_component_remove(component); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/pm.c
int snd_sof_runtime_suspend(struct device *dev) { return sof_suspend(dev, true); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/pm.c
int snd_sof_runtime_resume(struct device *dev) { return sof_resume(dev, true); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/pm.c
int snd_sof_prepare(struct device *dev) { struct snd_sof_dev *sdev = dev_get_drvdata(dev); const struct sof_dev_desc *desc = sdev->pdata->desc; sdev->system_suspend_target = SOF_SUSPEND_S3; /* * if the firmware is crashed or boot failed then we try to aim for S3 * to reboot the firmware */ if (sdev...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/sof-acpi-dev.c
int sof_acpi_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; if (!(sof_acpi_debug & SOF_ACPI_DISABLE_PM_RUNTIME)) pm_runtime_disable(dev); snd_sof_device_remove(dev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-audio.c
int sof_route_setup(struct snd_sof_dev *sdev, struct snd_soc_dapm_widget *wsource, struct snd_soc_dapm_widget *wsink) { const struct sof_ipc_tplg_ops *ipc_tplg_ops = sdev->ipc->ops->tplg; struct snd_sof_widget *src_widget = wsource->dobj.private; struct snd_sof_widget *sink...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/sof-audio.c
static void sof_unprepare_widgets_in_path(struct snd_sof_dev *sdev, struct snd_soc_dapm_widget *widget) { const struct sof_ipc_tplg_ops *ipc_tplg_ops = sdev->ipc->ops->tplg; const struct sof_ipc_tplg_widget_ops *widget_ops = ipc_tplg_ops->widget; struct snd_sof_widget *sw...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/sof-audio.c
int sof_widget_list_free(struct snd_sof_dev *sdev, struct snd_sof_pcm *spcm, int dir) { struct snd_soc_dapm_widget_list *list = spcm->stream[dir].list; int ret; if (!list) return 0; /* send IPC to free widget in the DSP */ ret = sof_walk_widgets_in_order(sdev, list, NULL, NULL, ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-audio.c
struct snd_sof_pcm *snd_sof_find_spcm_comp(struct snd_soc_component *scomp, unsigned int comp_id, int *direction) { struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); struct snd_sof_pcm *spcm; int dir; list_for...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-audio.c
struct snd_sof_widget * snd_sof_find_swidget_sname(struct snd_soc_component *scomp, const char *pcm_name, int dir) { struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); struct snd_sof_widget *swidget; enum snd_soc_dapm_type type; if (dir == SNDRV_PCM_STREAM_PLAYBACK) ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-audio.c
static int sof_dai_get_clk(struct snd_soc_pcm_runtime *rtd, int clk_type) { struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, SOF_AUDIO_PCM_DRV_NAME); struct snd_sof_dai *dai = snd_sof_find_dai(component, (char *)rtd->dai_link->name); struct snd_sof_dev *sdev = snd_soc_component_get_drv...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/sof-audio.c
int sof_dai_get_mclk(struct snd_soc_pcm_runtime *rtd) { return sof_dai_get_clk(rtd, SOF_DAI_CLK_INTEL_SSP_MCLK); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-audio.c
int sof_machine_check(struct snd_sof_dev *sdev) { struct snd_sof_pdata *sof_pdata = sdev->pdata; const struct sof_dev_desc *desc = sof_pdata->desc; struct snd_soc_acpi_mach *mach; if (!IS_ENABLED(CONFIG_SND_SOC_SOF_FORCE_NOCODEC_MODE)) { const struct snd_sof_of_mach *of_mach; if (IS_ENABLED(CONFIG_SND...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/sof-audio.c
void sof_machine_unregister(struct snd_sof_dev *sdev, void *pdata) { struct snd_sof_pdata *plat_data = pdata; if (!IS_ERR_OR_NULL(plat_data->pdev_mach)) platform_device_unregister(plat_data->pdev_mach); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-audio.h
static inline u32 mixer_to_ipc(unsigned int value, u32 *volume_map, int size) { if (value >= size) return volume_map[size - 1]; return volume_map[value]; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-audio.h
static inline struct snd_sof_pcm * snd_sof_find_spcm_dai(struct snd_soc_component *scomp, struct snd_soc_pcm_runtime *rtd) { struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); struct snd_sof_pcm *spcm; list_for_each_entry(spcm, &sdev->pcm_list, list) { if (le32_to_cpu(spc...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-audio.h
static inline void snd_sof_compr_fragment_elapsed(struct snd_compr_stream *cstream) {}
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-client-ipc-flood-test.c
static void sof_ipc_flood_remove(struct auxiliary_device *auxdev) { struct sof_client_dev *cdev = auxiliary_dev_to_sof_client_dev(auxdev); struct sof_ipc_flood_priv *priv = cdev->data; pm_runtime_disable(&auxdev->dev); if (auxdev->id == 0) { debugfs_remove(priv->dfs_link[0]); debugfs_remove(priv->dfs...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-client-ipc-msg-injector.c
static ssize_t sof_msg_inject_ipc4_dfs_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { struct sof_client_dev *cdev = file->private_data; struct sof_msg_inject_priv *priv = cdev->data; struct...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/sof-client-ipc-msg-injector.c
static int sof_msg_inject_dfs_release(struct inode *inode, struct file *file) { debugfs_file_put(file->f_path.dentry); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-client-probes-ipc3.c
static int ipc3_probes_init(struct sof_client_dev *cdev, u32 stream_tag, size_t buffer_size) { struct sof_ipc_probe_dma_add_params *msg; size_t size = struct_size(msg, dma, 1); struct sof_ipc_reply reply; int ret; msg = kmalloc(size, GFP_KERNEL); if (!msg) return -ENOMEM; ...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/sof-client-probes-ipc3.c
static int ipc3_probes_deinit(struct sof_client_dev *cdev) { struct sof_ipc_cmd_hdr msg; struct sof_ipc_reply reply; msg.size = sizeof(msg); msg.cmd = SOF_IPC_GLB_PROBE | SOF_IPC_PROBE_DEINIT; return sof_client_ipc_tx_message(cdev, &msg, &reply, sizeof(reply)); }
[ 1, 0 ]
Linux Kernel
sound/soc/sof/sof-client-probes-ipc3.c
static int ipc3_probes_info(struct sof_client_dev *cdev, unsigned int cmd, void **params, size_t *num_params) { size_t max_msg_size = sof_client_get_ipc_max_payload_size(cdev); struct sof_ipc_probe_info_params msg = {{{0}}}; struct sof_ipc_probe_info_params *reply; size_t bytes; i...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/sof-client-probes-ipc4.c
static struct sof_man4_module * sof_ipc4_probe_get_module_info(struct sof_client_dev *cdev) { struct sof_probes_priv *priv = cdev->data; struct device *dev = &cdev->auxdev.dev; static const guid_t probe_uuid = GUID_INIT(0x7CAD0808, 0xAB10, 0xCD23, 0xEF, 0x45, 0x12, 0xAB, 0x34, 0xCD, 0x56, 0x...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-client-probes-ipc4.c
static int ipc4_probes_deinit(struct sof_client_dev *cdev) { struct sof_man4_module *mentry = sof_ipc4_probe_get_module_info(cdev); struct sof_ipc4_msg msg; msg.primary = mentry->id; msg.primary |= SOF_IPC4_MSG_TYPE_SET(SOF_IPC4_MOD_DELETE_INSTANCE); msg.primary |= SOF_IPC4_MSG_DIR(SOF_IPC4_MSG_REQUEST); m...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-client-probes-ipc4.c
static int ipc4_probes_points_remove(struct sof_client_dev *cdev, unsigned int *buffer_id, size_t num_buffer_id) { struct sof_man4_module *mentry = sof_ipc4_probe_get_module_info(cdev); struct sof_ipc4_msg msg; u32 *probe_point_ids; int i...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/sof-client-probes.c
static int sof_probes_compr_copy(struct snd_soc_component *component, struct snd_compr_stream *cstream, char __user *buf, size_t count) { struct snd_compr_runtime *rtd = cstream->runtime; unsigned int offset, n; void *ptr; int ret; if (count ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-client-probes.c
static ssize_t sof_probes_dfs_points_read(struct file *file, char __user *to, size_t count, loff_t *ppos) { struct sof_client_dev *cdev = file->private_data; struct sof_probes_priv *priv = cdev->data; struct device *dev = &cdev->auxdev.dev; struct sof_probe_point_desc *...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/sof-client-probes.c
static ssize_t sof_probes_dfs_points_remove_write(struct file *file, const char __user *from, size_t count, loff_t *ppos) { struct sof_client_dev *cdev = file->private_data; struct sof_probes_priv *priv = cdev->data...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-client.c
static void sof_client_auxdev_release(struct device *dev) { struct auxiliary_device *auxdev = to_auxiliary_dev(dev); struct sof_client_dev *cdev = auxiliary_dev_to_sof_client_dev(auxdev); kfree(cdev->auxdev.dev.platform_data); kfree(cdev); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-client.c
static void sof_unregister_ipc_flood_test(struct snd_sof_dev *sdev) { int i; for (i = 0; i < CONFIG_SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST_NUM; i++) sof_client_dev_unregister(sdev, "ipc_flood", i); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-client.c
static inline int sof_register_ipc_flood_test(struct snd_sof_dev *sdev) { return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-client.c
static int sof_register_ipc_msg_injector(struct snd_sof_dev *sdev) { return sof_client_dev_register(sdev, "msg_injector", 0, NULL, 0); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-client.c
static void sof_unregister_ipc_msg_injector(struct snd_sof_dev *sdev) { sof_client_dev_unregister(sdev, "msg_injector", 0); } #else
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-client.c
static inline int sof_register_ipc_msg_injector(struct snd_sof_dev *sdev) { return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/sof-client.c
int sof_client_ipc_set_get_data(struct sof_client_dev *cdev, void *ipc_msg, bool set) { if (cdev->sdev->pdata->ipc_type == SOF_IPC) { struct sof_ipc_cmd_hdr *hdr = ipc_msg; return sof_ipc_set_get_data(cdev->sdev->ipc, ipc_msg, hdr->size, set); } else if (cdev->sdev->pdata->...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/sof-client.c
size_t sof_client_get_ipc_max_payload_size(struct sof_client_dev *cdev) { struct snd_sof_dev *sdev = sof_client_dev_to_sof_dev(cdev); return sdev->ipc->max_payload_size; }
[ 0, 0 ]