Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/soc/soc-pcm.c
int snd_soc_dpcm_runtime_update(struct snd_soc_card *card) { struct snd_soc_pcm_runtime *fe; int ret = 0; mutex_lock_nested(&card->pcm_mutex, card->pcm_subclass); for_each_card_rtds(card, fe) { ret = soc_dpcm_fe_runtime_update(fe, 0); if (ret) goto out; } /* bring new paths up */ for_each...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
static int dpcm_fe_dai_open(struct snd_pcm_substream *fe_substream) { struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(fe_substream); struct snd_soc_dapm_widget_list *list; int ret; int stream = fe_substream->stream; snd_soc_dpcm_mutex_lock(fe); fe->dpcm[stream].runtime = fe_substream->runtime; re...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-pcm.c
int snd_soc_dpcm_fe_can_update(struct snd_soc_pcm_runtime *fe, int stream) { if (fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_FE) return 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-topology-test.c
static int snd_soc_tplg_test_init(struct kunit *test) { test_dev = root_device_register("sound-soc-topology-test"); test_dev = get_device(test_dev); if (!test_dev) return -ENODEV; test_dev->driver = &test_drv; return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-topology-test.c
static void snd_soc_tplg_test_exit(struct kunit *test) { put_device(test_dev); root_device_unregister(test_dev); }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-topology-test.c
static void snd_soc_tplg_test_load_empty_tplg_bad_size(struct kunit *test) { struct kunit_soc_component *kunit_comp; struct tplg_tmpl_001 *data; int size; int ret; kunit_comp = kunit_kzalloc(test, sizeof(*kunit_comp), GFP_KERNEL); KUNIT_EXPECT_NOT_ERR_OR_NULL(test, kunit_comp); kunit_comp->kunit = test; ...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-topology.c
static int soc_tplg_check_elem_count(struct soc_tplg *tplg, size_t elem_size, unsigned int count, size_t bytes, const char *elem_type) { const u8 *end = tplg->pos + elem_size * count; if (end > tplg->fw->data + tplg->fw->size) { dev_err(...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-topology.c
static int get_widget_id(int tplg_type) { int i; for (i = 0; i < ARRAY_SIZE(dapm_map); i++) { if (tplg_type == dapm_map[i].uid) return dapm_map[i].kid; } return -EINVAL; }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-topology.c
static int soc_tplg_add_kcontrol(struct soc_tplg *tplg, struct snd_kcontrol_new *k, struct snd_kcontrol **kcontrol) { struct snd_soc_component *comp = tplg->comp; return soc_tplg_add_dcontrol(comp->card->snd_card, tplg->dev, k, ...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-topology.c
static void remove_bytes(struct snd_soc_component *comp, struct snd_soc_dobj *dobj, int pass) { struct snd_card *card = comp->card->snd_card; if (pass != SOC_TPLG_PASS_CONTROL) return; if (dobj->ops && dobj->ops->control_unload) dobj->ops->control_unload(comp, dobj); snd_ctl_...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-topology.c
static int soc_tplg_denum_create_values(struct soc_tplg *tplg, struct soc_enum *se, struct snd_soc_tplg_enum_control *ec) { int i; if (le32_to_cpu(ec->items) > SND_SOC_TPLG_NUM_TEXTS) return -EINVAL; se->dobj.control.dvalues = ...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-topology.c
static int soc_tplg_dapm_widget_elems_load(struct soc_tplg *tplg, struct snd_soc_tplg_hdr *hdr) { int count, i; count = le32_to_cpu(hdr->count); dev_dbg(tplg->dev, "ASoC: adding %d DAPM widgets\n", count); for (i = 0; i < count; i++) { struct snd_soc_tplg_dapm_w...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-topology.c
static int set_stream_info(struct soc_tplg *tplg, struct snd_soc_pcm_stream *stream, struct snd_soc_tplg_stream_caps *caps) { stream->stream_name = devm_kstrdup(tplg->dev, caps->name, GFP_KERNEL); if (!stream->stream_name) return -ENOMEM; stream->channel...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-topology.c
static int soc_tplg_pcm_elems_load(struct soc_tplg *tplg, struct snd_soc_tplg_hdr *hdr) { struct snd_soc_tplg_pcm *pcm, *_pcm; int count; int size; int i; bool abi_match; int ret; count = le32_to_cpu(hdr->count); pcm = (struct snd_soc_tplg_pcm *)tplg->pos; size = l...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-topology.c
static int soc_tplg_link_config(struct soc_tplg *tplg, struct snd_soc_tplg_link_config *cfg) { struct snd_soc_dai_link *link; const char *name, *stream_name; size_t len; int ret; len = strnlen(cfg->name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN); if (len == SNDRV_CTL_ELEM_ID_NAME_MAXLE...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-topology.c
static int soc_tplg_link_elems_load(struct soc_tplg *tplg, struct snd_soc_tplg_hdr *hdr) { struct snd_soc_tplg_link_config *link, *_link; int count; int size; int i, ret; bool abi_match; count = le32_to_cpu(hdr->count); link = (struct snd_soc_tplg_link_config *)tplg->...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-topology.c
static int manifest_new_ver(struct soc_tplg *tplg, struct snd_soc_tplg_manifest *src, struct snd_soc_tplg_manifest **manifest) { struct snd_soc_tplg_manifest *dest; struct snd_soc_tplg_manifest_v4 *src_v4; int size; *manifest = NULL; size = le32_to_cpu...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-utils.c
int snd_soc_tdm_params_to_bclk(struct snd_pcm_hw_params *params, int tdm_width, int tdm_slots, int slot_multiple) { if (!tdm_slots) tdm_slots = params_channels(params); if (slot_multiple > 1) tdm_slots = roundup(tdm_slots, slot_multiple); if (!tdm_width) { tdm_width = ...
[ 0, 0 ]
Linux Kernel
sound/soc/soc-utils.c
static int dummy_dma_open(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); int i; for_each_rtd_components(rtd, i, component) { if (component->driver == &dummy_platform) return 0; }...
[ 1, 0 ]
Linux Kernel
sound/soc/soc-utils.c
int snd_soc_dai_is_dummy(struct snd_soc_dai *dai) { if (dai->driver == &dummy_dai) return 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/soc-utils.c
int __init snd_soc_util_init(void) { int ret; soc_dummy_dev = platform_device_register_simple("snd-soc-dummy", -1, NULL, 0); if (IS_ERR(soc_dummy_dev)) return PTR_ERR(soc_dummy_dev); ret = platform_driver_register(&soc_dummy_driver); if (ret != 0) platform_device_unregister(soc_dummy_dev); retur...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/amd/acp-common.c
int acp_dai_probe(struct snd_soc_dai *dai) { struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(dai->component); const struct sof_amd_acp_desc *desc = get_chip_info(sdev->pdata); unsigned int val; val = snd_sof_dsp_read(sdev, ACP_DSP_BAR, desc->i2s_pin_config_offset); if (val != desc->i2s_mode) { ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/amd/acp-common.c
void amd_sof_ipc_dump(struct snd_sof_dev *sdev) { const struct sof_amd_acp_desc *desc = get_chip_info(sdev->pdata); u32 base = desc->dsp_intr_base; u32 dsp_msg_write = sdev->debug_box.offset + offsetof(struct scratch_ipc_conf, sof_dsp_msg_write); u32 dsp_ack_write = sdev->debug_box.offset ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/amd/acp-common.c
struct snd_soc_acpi_mach *amd_sof_machine_select(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; mach = snd_soc_acpi_find_machine(desc->machines); if (!mach) { dev_warn(sdev->dev, "No matching A...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/amd/acp-ipc.c
static void acp_dsp_ipc_host_done(struct snd_sof_dev *sdev) { unsigned int dsp_msg = sdev->debug_box.offset + offsetof(struct scratch_ipc_conf, sof_dsp_msg_write); snd_sof_dsp_write(sdev, ACP_DSP_BAR, ACP_SCRATCH_REG_0 + dsp_msg, 0); }
[ 1, 0 ]
Linux Kernel
sound/soc/sof/amd/acp-ipc.c
int acp_sof_ipc_get_window_offset(struct snd_sof_dev *sdev, u32 id) { return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/amd/acp-loader.c
int acp_dsp_block_write(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_type, u32 offset, void *src, size_t size) { struct pci_dev *pci = to_pci_dev(sdev->dev); const struct sof_amd_acp_desc *desc = get_chip_info(sdev->pdata); struct acp_dev_data *adata; v...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/amd/acp-stream.c
struct acp_dsp_stream *acp_dsp_stream_get(struct snd_sof_dev *sdev, int tag) { struct acp_dev_data *adata = sdev->pdata->hw_pdata; struct acp_dsp_stream *stream = adata->stream_buf; int i; for (i = 0; i < ACP_MAX_STREAM; i++, stream++) { if (stream->active) continue; if (!tag) { stream->ac...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/amd/acp-stream.c
int acp_dsp_stream_put(struct snd_sof_dev *sdev, struct acp_dsp_stream *acp_stream) { struct acp_dev_data *adata = sdev->pdata->hw_pdata; struct acp_dsp_stream *stream = adata->stream_buf; int i; for (i = 0; i < ACP_MAX_STREAM; i++, stream++) { if (stream == acp_stream) { strea...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/amd/acp-trace.c
int acp_sof_trace_init(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab, struct sof_ipc_dma_trace_params_ext *dtrace_params) { struct acp_dsp_stream *stream; struct acp_dev_data *adata; int ret; adata = sdev->pdata->hw_pdata; stream = acp_dsp_stream_get(sdev, ACP_LOGGER_STREAM); ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/amd/acp.c
static int acpbus_dma_start(struct acp_dev_data *adata, unsigned int ch, unsigned int dscr_count, struct dma_descriptor *dscr_info) { struct snd_sof_dev *sdev = adata->dev; int ret; u16 dscr; if (!dscr_info || !dscr_count) return -EINVAL; for (dsc...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/amd/acp.c
int configure_and_run_dma(struct acp_dev_data *adata, unsigned int src_addr, unsigned int dest_addr, int dsp_data_size) { struct snd_sof_dev *sdev = adata->dev; unsigned int desc_count, index; int ret; for (desc_count = 0; desc_count < ACP_MAX_DESC && dsp_data_size >= 0; desc_c...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/amd/acp.c
static int acp_reset(struct snd_sof_dev *sdev) { const struct sof_amd_acp_desc *desc = get_chip_info(sdev->pdata); unsigned int val; int ret; snd_sof_dsp_write(sdev, ACP_DSP_BAR, ACP_SOFT_RESET, ACP_ASSERT_RESET); ret = snd_sof_dsp_read_poll_timeout( sdev, ACP_DSP_BAR, ACP_SOFT_RESET, val, val & ACP_...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/amd/acp.c
static int acp_init(struct snd_sof_dev *sdev) { int ret; ret = acp_power_on(sdev); if (ret) { dev_err(sdev->dev, "ACP power on failed\n"); return ret; } snd_sof_dsp_write(sdev, ACP_DSP_BAR, ACP_CONTROL, 0x01); /* Reset */ return acp_reset(sdev); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/amd/pci-rmb.c
static void acp_pci_rmb_remove(struct pci_dev *pci) { if (dmic_dev) platform_device_unregister(dmic_dev); if (pdev) platform_device_unregister(pdev); sof_pci_remove(pci); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/compress.c
static int sof_compr_pointer(struct snd_soc_component *component, struct snd_compr_stream *cstream, struct snd_compr_tstamp *tstamp) { struct snd_sof_pcm *spcm; struct snd_soc_pcm_runtime *rtd = cstream->private_data; struct sof_compr_stream *sstream = cs...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/control.c
int snd_sof_enum_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct soc_enum *se = (struct soc_enum *)kcontrol->private_value; struct snd_sof_control *scontrol = se->dobj.private; struct snd_soc_component *scomp = scontrol->scomp; struct snd_sof_dev *sdev = sn...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/control.c
int snd_sof_bytes_ext_put(struct snd_kcontrol *kcontrol, const unsigned int __user *binary_data, unsigned int size) { struct soc_bytes_ext *be = (struct soc_bytes_ext *)kcontrol->private_value; struct snd_sof_control *scontrol = be->dobj.private; struct snd_soc_...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/control.c
int snd_sof_bytes_ext_get(struct snd_kcontrol *kcontrol, unsigned int __user *binary_data, unsigned int size) { struct soc_bytes_ext *be = (struct soc_bytes_ext *)kcontrol->private_value; struct snd_sof_control *scontrol = be->dobj.private; struct snd_soc_component *scomp = scontrol->sc...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/debug.c
static ssize_t sof_dfsentry_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { size_t size; char *string; int ret; string = kzalloc(count + 1, GFP_KERNEL); if (!string) return -ENOMEM; size = simple_write_to_buffer(string, count, ppos, ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/debug.c
static int snd_sof_debugfs_io_item(struct snd_sof_dev *sdev, void __iomem *base, size_t size, const char *name, enum sof_debugfs_access_type access_type) { struct snd_sof_dfsentry *dfse; if (!sdev) return -EINVAL; dfse = devm_kzalloc(sdev...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/debug.c
int snd_sof_dbg_memory_info_init(struct snd_sof_dev *sdev) { struct snd_sof_dfsentry *dfse; dfse = devm_kzalloc(sdev->dev, sizeof(*dfse), GFP_KERNEL); if (!dfse) return -ENOMEM; dfse->type = SOF_DFSENTRY_TYPE_BUF; dfse->sdev = sdev; debugfs_create_file("memory_info", 0444, sdev->debugfs_root, dfse, ...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/debug.c
void snd_sof_free_debug(struct snd_sof_dev *sdev) { debugfs_remove_recursive(sdev->debugfs_root); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/debug.c
static void snd_sof_ipc_dump(struct snd_sof_dev *sdev) { if (sof_ops(sdev)->ipc_dump && !sdev->ipc_dump_printed) { dev_err(sdev->dev, "------------[ IPC dump start ]------------\n"); sof_ops(sdev)->ipc_dump(sdev); dev_err(sdev->dev, "------------[ IPC dump end ]------------\n"); if (!sof_debug_check_...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/imx/imx-common.c
void imx8_get_registers(struct snd_sof_dev *sdev, struct sof_ipc_dsp_oops_xtensa *xoops, struct sof_ipc_panic_info *panic_info, u32 *stack, size_t stack_words) { u32 offset = sdev->dsp_oops_offset; sof_mailbox_read(sdev, offset, xoops, sizeof(...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/imx/imx-common.c
int imx8_enable_clocks(struct snd_sof_dev *sdev, struct imx_clocks *clks) { return clk_bulk_prepare_enable(clks->num_dsp_clks, clks->dsp_clks); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/imx/imx8.c
static int imx8_send_msg(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg) { struct imx8_priv *priv = sdev->pdata->hw_pdata; sof_mailbox_write(sdev, sdev->host_box.offset, msg->msg_data, msg->msg_size); imx_dsp_ring_doorbell(priv->dsp_ipc, 0); return 0; }
[ 1, 0 ]
Linux Kernel
sound/soc/sof/imx/imx8.c
static int imx8x_run(struct snd_sof_dev *sdev) { struct imx8_priv *dsp_priv = sdev->pdata->hw_pdata; int ret; ret = imx_sc_misc_set_control(dsp_priv->sc_ipc, IMX_SC_R_DSP, IMX_SC_C_OFS_SEL, 1); if (ret < 0) { dev_err(sdev->dev, "Error system address offset source select\n");...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/imx/imx8.c
static int imx8_remove(struct snd_sof_dev *sdev) { struct imx8_priv *priv = sdev->pdata->hw_pdata; int i; imx8_disable_clocks(sdev, priv->clks); platform_device_unregister(priv->ipc_dev); for (i = 0; i < priv->num_domains; i++) { device_link_del(priv->link[i]); dev_pm_domain_detach(priv->pd_dev[i],...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/imx/imx8.c
static int imx8_resume(struct snd_sof_dev *sdev) { struct imx8_priv *priv = (struct imx8_priv *)sdev->pdata->hw_pdata; int ret; int i; ret = imx8_enable_clocks(sdev, priv->clks); if (ret < 0) return ret; for (i = 0; i < DSP_MU_CHAN_NUM; i++) imx_dsp_request_channel(priv->dsp_ipc, i); return 0;...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/imx/imx8.c
static int imx8_dsp_runtime_resume(struct snd_sof_dev *sdev) { int ret; const struct sof_dsp_power_state target_dsp_state = { .state = SOF_DSP_PM_D0, }; ret = imx8_resume(sdev); if (ret < 0) return ret; return snd_sof_dsp_set_power_state(sdev, &target_dsp_state); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/imx/imx8m.c
static int imx8m_get_mailbox_offset(struct snd_sof_dev *sdev) { return MBOX_OFFSET; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/imx/imx8m.c
static int imx8m_get_window_offset(struct snd_sof_dev *sdev, u32 id) { return MBOX_OFFSET; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/imx/imx8ulp.c
static int imx8ulp_get_mailbox_offset(struct snd_sof_dev *sdev) { return MBOX_OFFSET; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/imx/imx8ulp.c
static void imx8ulp_dsp_handle_reply(struct imx_dsp_ipc *ipc) { struct imx8ulp_priv *priv = imx_dsp_get_data(ipc); unsigned long flags; spin_lock_irqsave(&priv->sdev->ipc_lock, flags); snd_sof_ipc_process_reply(priv->sdev, 0); spin_unlock_irqrestore(&priv->sdev->ipc_lock, flags); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/imx/imx8ulp.c
static int imx8ulp_send_msg(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg) { struct imx8ulp_priv *priv = sdev->pdata->hw_pdata; sof_mailbox_write(sdev, sdev->host_box.offset, msg->msg_data, msg->msg_size); imx_dsp_ring_doorbell(priv->dsp_ipc, 0); return 0; }
[ 1, 0 ]
Linux Kernel
sound/soc/sof/imx/imx8ulp.c
static int imx8ulp_remove(struct snd_sof_dev *sdev) { struct imx8ulp_priv *priv = sdev->pdata->hw_pdata; imx8_disable_clocks(sdev, priv->clks); platform_device_unregister(priv->ipc_dev); return 0; }
[ 1, 0 ]
Linux Kernel
sound/soc/sof/imx/imx8ulp.c
static int imx8ulp_dsp_resume(struct snd_sof_dev *sdev) { const struct sof_dsp_power_state target_dsp_state = { .state = SOF_DSP_PM_D0, .substate = 0, }; imx8ulp_resume(sdev); if (pm_runtime_suspended(sdev->dev)) { pm_runtime_disable(sdev->dev); pm_runtime_set_active(sdev->dev); pm_ru...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/atom.c
irqreturn_t atom_irq_handler(int irq, void *context) { struct snd_sof_dev *sdev = context; u64 ipcx, ipcd; int ret = IRQ_NONE; ipcx = snd_sof_dsp_read64(sdev, DSP_BAR, SHIM_IPCX); ipcd = snd_sof_dsp_read64(sdev, DSP_BAR, SHIM_IPCD); if (ipcx & SHIM_BYT_IPCX_DONE) { snd_sof_dsp_update_bits64_unlocked(...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/atom.c
irqreturn_t atom_irq_thread(int irq, void *context) { struct snd_sof_dev *sdev = context; u64 ipcx, ipcd; ipcx = snd_sof_dsp_read64(sdev, DSP_BAR, SHIM_IPCX); ipcd = snd_sof_dsp_read64(sdev, DSP_BAR, SHIM_IPCD); if (ipcx & SHIM_BYT_IPCX_DONE) { spin_lock_irq(&sdev->ipc_lock); /* * handle imme...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/atom.c
static void atom_host_done(struct snd_sof_dev *sdev) { snd_sof_dsp_update_bits64_unlocked(sdev, DSP_BAR, SHIM_IPCD, SHIM_BYT_IPCD_BUSY | SHIM_BYT_IPCD_DONE, SHIM_BYT_IPCD_DONE); /* unmask and prepare to receive next new message */ snd_sof...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/bdw.c
static void bdw_get_registers(struct snd_sof_dev *sdev, struct sof_ipc_dsp_oops_xtensa *xoops, struct sof_ipc_panic_info *panic_info, u32 *stack, size_t stack_words) { u32 offset = sdev->dsp_oops_offset; sof_mailbox_read(sdev...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/intel/bdw.c
static irqreturn_t bdw_irq_handler(int irq, void *context) { struct snd_sof_dev *sdev = context; u32 isr; int ret = IRQ_NONE; isr = snd_sof_dsp_read(sdev, BDW_DSP_BAR, SHIM_ISRX); if (isr & (SHIM_ISRX_DONE | SHIM_ISRX_BUSY)) ret = IRQ_WAKE_THREAD; return ret; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/bdw.c
static int bdw_send_msg(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg) { sof_mailbox_write(sdev, sdev->host_box.offset, msg->msg_data, msg->msg_size); snd_sof_dsp_write(sdev, BDW_DSP_BAR, SHIM_IPCX, SHIM_IPCX_BUSY); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/bdw.c
static void bdw_set_mach_params(struct snd_soc_acpi_mach *mach, struct snd_sof_dev *sdev) { struct snd_sof_pdata *pdata = sdev->pdata; const struct sof_dev_desc *desc = pdata->desc; struct snd_soc_acpi_mach_params *mach_params; mach_params = &mach->mach_params; mach_params->p...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/bdw.c
static int sof_broadwell_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; const struct acpi_device_id *id; const struct sof_dev_desc *desc; int ret; id = acpi_match_device(dev->driver->acpi_match_table, dev); if (!id) return -ENODEV; ret = snd_intel_acpi_dsp_driver_probe(dev, ...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/intel/byt.c
static void byt_reset_dsp_disable_int(struct snd_sof_dev *sdev) { snd_sof_dsp_update_bits64(sdev, DSP_BAR, SHIM_IMRX, 0x3, 0x3); snd_sof_dsp_update_bits64(sdev, DSP_BAR, SHIM_IMRD, 0x3, 0x3); /* Put DSP into reset, set reset vector */ snd_sof_dsp_update_bits64(sdev, DSP_BAR, SHIM_CSR, ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/byt.c
static int byt_suspend(struct snd_sof_dev *sdev, u32 target_state) { byt_reset_dsp_disable_int(sdev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/cnl.c
static void cnl_ipc_dsp_done(struct snd_sof_dev *sdev) { snd_sof_dsp_update_bits_forced(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCIDA, CNL_DSP_REG_HIPCIDA_DONE, CNL_DSP_REG_HIPCIDA_DONE); /* unmask Done interrupt */ snd_sof_dsp_update_bits(sdev, HDA_DSP...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/cnl.c
static bool cnl_compact_ipc_compress(struct snd_sof_ipc_msg *msg, u32 *dr, u32 *dd) { struct sof_ipc_pm_gate *pm_gate = msg->msg_data; if (pm_gate->hdr.cmd == (SOF_IPC_GLB_PM_MSG | SOF_IPC_PM_GATE)) { *dr = HDA_IPC_MSG_COMPACT | HDA_IPC_PM_GATE; /* send payload via th...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/cnl.c
int cnl_ipc4_send_msg(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg) { struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata; struct sof_ipc4_msg *msg_data = msg->msg_data; if (hda_ipc4_tx_is_busy(sdev)) { hdev->delayed_ipc_tx_msg = msg; return 0; } hdev->delayed_ipc_tx_msg = NULL; if (m...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/intel/cnl.c
int cnl_ipc_send_msg(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg) { struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata; struct sof_ipc_cmd_hdr *hdr; u32 dr = 0; u32 dd = 0; if (cnl_compact_ipc_compress(msg, &dr, &dd)) { /* send the message via IPC registers */ snd_sof_dsp_write(sdev, HD...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/intel/cnl.c
void cnl_ipc_dump(struct snd_sof_dev *sdev) { u32 hipcctl; u32 hipcida; u32 hipctdr; hda_ipc_irq_dump(sdev); hipcida = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCIDA); hipcctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCCTL); hipctdr = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_H...
[ 0, 1 ]
Linux Kernel
sound/soc/sof/intel/cnl.c
int sof_cnl_ops_init(struct snd_sof_dev *sdev) { memcpy(&sof_cnl_ops, &sof_hda_common_ops, sizeof(struct snd_sof_dsp_ops)); /* probe/remove/shutdown */ sof_cnl_ops.shutdown = hda_dsp_shutdown; /* ipc */ if (sdev->pdata->ipc_type == SOF_IPC) { /* doorbell */ sof_cnl_ops.irq_thread = cnl_ipc_irq_thre...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-bus.c
static void update_codec_wake_enable(struct hdac_bus *bus, unsigned int addr, bool link_power) { unsigned int mask = snd_hdac_chip_readw(bus, WAKEEN); if (link_power) mask &= ~BIT(addr); else mask |= BIT(addr); snd_hdac_chip_updatew(bus, WAKEEN, STATESTS_INT_MASK,...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-bus.c
static void sof_hda_bus_link_power(struct hdac_device *codec, bool enable) { struct hdac_bus *bus = codec->bus; bool oldstate = test_bit(codec->addr, &bus->codec_powered); snd_hdac_ext_bus_link_power(codec, enable); if (enable == oldstate) return; if (codec->addr == HDA_IDISP_ADDR && !enable) snd_h...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-codec.c
static struct hda_codec *hda_codec_device_init(struct hdac_bus *bus, int addr, int type) { struct hda_codec *codec; int ret; codec = snd_hda_codec_device_init(to_hda_bus(bus), addr, "ehdaudio%dD%d", bus->idx, addr); if (IS_ERR(...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-codec.c
void hda_codec_probe_bus(struct snd_sof_dev *sdev) { struct hdac_bus *bus = sof_to_bus(sdev); int i, ret; if (IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC_DEBUG_SUPPORT) && sof_debug_check_flag(SOF_DBG_FORCE_NOCODEC)) return; for (i = 0; i < HDA_MAX_CODECS; i++) { if (!(bus->codec_mask & (1 << i))) ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-codec.c
void hda_codec_stop_cmd_io(struct snd_sof_dev *sdev) { struct hdac_bus *bus = sof_to_bus(sdev); if (IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC_DEBUG_SUPPORT) && sof_debug_check_flag(SOF_DBG_FORCE_NOCODEC)) return; snd_hdac_bus_stop_cmd_io(bus); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-codec.c
void hda_codec_rirb_status_clear(struct snd_sof_dev *sdev) { struct hdac_bus *bus = sof_to_bus(sdev); if (IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC_DEBUG_SUPPORT) && sof_debug_check_flag(SOF_DBG_FORCE_NOCODEC)) return; snd_hdac_chip_writeb(bus, RIRBSTS, RIRB_INT_MASK); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-codec.c
void hda_codec_device_remove(struct snd_sof_dev *sdev) { struct hdac_bus *bus = sof_to_bus(sdev); if (IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC_DEBUG_SUPPORT) && sof_debug_check_flag(SOF_DBG_FORCE_NOCODEC)) return; snd_hdac_ext_bus_device_remove(bus); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-codec.c
int hda_codec_i915_init(struct snd_sof_dev *sdev) { struct hdac_bus *bus = sof_to_bus(sdev); int ret; if (IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC_DEBUG_SUPPORT) && sof_debug_check_flag(SOF_DBG_FORCE_NOCODEC)) return 0; ret = snd_hdac_i915_init(bus); if (ret < 0) return ret; /* codec_mask not ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-codec.c
int hda_codec_i915_exit(struct snd_sof_dev *sdev) { struct hdac_bus *bus = sof_to_bus(sdev); if (IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC_DEBUG_SUPPORT) && sof_debug_check_flag(SOF_DBG_FORCE_NOCODEC)) return 0; if (!bus->audio_component) return 0; snd_hdac_display_power(bus, HDA_CODEC_IDX_CONTROLL...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-ctrl.c
int hda_dsp_ctrl_clock_power_gating(struct snd_sof_dev *sdev, bool enable) { u32 val; val = enable ? PCI_CGCTL_ADSPDCGE : 0; snd_sof_pci_update_bits(sdev, PCI_CGCTL, PCI_CGCTL_ADSPDCGE, val); /* enable/disable DMI Link L1 support */ val = enable ? HDA_VS_INTEL_EM2_L1SEN : 0; snd_sof_dsp_update_bits(sdev, ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dai.c
static int hda_link_dma_params(struct hdac_ext_stream *hext_stream, struct hda_pipe_params *params) { struct hdac_stream *hstream = &hext_stream->hstream; unsigned char stream_tag = hstream->stream_tag; struct hdac_bus *bus = hstream->bus; struct hdac_ext_link *hlink; unsigned ...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dai.c
static int hda_link_dma_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dai.c
static int hda_link_dma_hw_free(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); struct hdac_ext_stream *hext_stream; hext_stream = snd_...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dai.c
static int hda_dai_widget_update(struct snd_soc_dapm_widget *w, int channel, bool widget_setup) { struct snd_sof_dai_config_data data; data.dai_data = channel; if (widget_setup) return hda_ctrl_dai_widget_setup(w, SOF_DAI_CONFIG_FLAGS_2_STEP_STOP, ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dai.c
static int hda_dai_hw_params_update(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct hdac_ext_stream *hext_stream; struct snd_soc_dapm_widget *w; int stream_tag; hext_stream = snd_soc...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dai.c
static int hda_dai_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct hdac_ext_stream *hext_stream = snd_soc_dai_get_dma_data(dai, substream); int ret; if (hext_stream && hext_stream->...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dai.c
static int hda_dai_config_pause_push_ipc(struct snd_soc_dapm_widget *w) { struct snd_sof_widget *swidget = w->dobj.private; struct snd_soc_component *component = swidget->scomp; struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); const struct sof_ipc_tplg_ops *tplg_ops = sdev->ipc->ops->tplg;...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dai.c
static int hda_dai_hw_free_ipc(int stream, struct snd_soc_dai *dai) { struct snd_soc_dapm_widget *w; w = snd_soc_dai_get_widget(dai, stream); return hda_dai_widget_update(w, DMA_CHAN_INVALID, false); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dai.c
static int ssp_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct ssp_dai_dma_data *dma_data; dma_data = kzalloc(sizeof(*dma_data), GFP_KERNEL); if (!dma_data) return -ENOMEM; snd_soc_dai_set_dma_data(dai, substream, dma_data); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dai.c
static int ssp_dai_setup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai, bool setup) { struct ssp_dai_dma_data *dma_data; int ret = 0; dma_data = snd_soc_dai_get_dma_data(dai, substream); if (!dma_data) { dev_err(dai->dev, "%s: failed to get dma_data\n", __func__); ...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dai.c
static int ssp_dai_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { return ssp_dai_setup(substream, dai, true); }
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dsp.c
static int hda_dsp_core_reset_leave(struct snd_sof_dev *sdev, unsigned int core_mask) { unsigned int crst; u32 adspcs; int ret; snd_sof_dsp_update_bits_unlocked(sdev, HDA_DSP_BAR, HDA_DSP_REG_ADSPCS, HDA_DSP_ADSPCS_CRST_MASK(core_mask), 0);...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dsp.c
int hda_dsp_core_run(struct snd_sof_dev *sdev, unsigned int core_mask) { int ret; ret = hda_dsp_core_reset_leave(sdev, core_mask); if (ret < 0) return ret; /* run core */ dev_dbg(sdev->dev, "unstall/run core: core_mask = %x\n", core_mask); snd_sof_dsp_update_bits_unlocked(sdev, HDA_DSP_BAR, HDA_DSP_RE...
[ 0, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dsp.c
int hda_dsp_core_reset_power_down(struct snd_sof_dev *sdev, unsigned int core_mask) { struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata; const struct sof_intel_dsp_desc *chip = hda->desc; int ret; core_mask &= chip->host_managed_cores_mask; /* return if core_mask is not...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dsp.c
void hda_dsp_ipc_int_disable(struct snd_sof_dev *sdev) { struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata; const struct sof_intel_dsp_desc *chip = hda->desc; snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, HDA_DSP_REG_ADSPIC, HDA_DSP_ADSPIC_IPC, 0); /* disable IPC BUSY and DONE inter...
[ 1, 0 ]
Linux Kernel
sound/soc/sof/intel/hda-dsp.c
static int hda_suspend(struct snd_sof_dev *sdev, bool runtime_suspend) { struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata; const struct sof_intel_dsp_desc *chip = hda->desc; struct hdac_bus *bus = sof_to_bus(sdev); int ret, j; if (sdev->system_suspend_target > SOF_SUSPEND_S3 || sdev->fw_state == S...
[ 1, 0 ]