Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/soc/intel/common/soc-acpi-intel-bxt-match.c
static struct snd_soc_acpi_mach *apl_quirk(void *arg) { struct snd_soc_acpi_mach *mach = arg; const struct dmi_system_id *dmi_id; unsigned long apl_machine_id; dmi_id = dmi_first_match(apl_table); if (dmi_id) { apl_machine_id = (unsigned long)dmi_id->driver_data; if (apl_machine_id == APL_RVP) ...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/common/soc-acpi-intel-byt-match.c
static int byt_rt5672_quirk_cb(const struct dmi_system_id *id) { byt_machine_id = BYT_RT5672; return 1; }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/common/sst-dsp.c
u32 sst_shim32_read(void __iomem *addr, u32 offset) { return readl(addr + offset); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/common/sst-dsp.c
u64 sst_shim32_read64(void __iomem *addr, u32 offset) { return readq(addr + offset); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/common/sst-dsp.c
void sst_dsp_shim_write_unlocked(struct sst_dsp *sst, u32 offset, u32 value) { sst->ops->write(sst->addr.shim, offset, value); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/common/sst-dsp.c
int sst_dsp_shim_update_bits_unlocked(struct sst_dsp *sst, u32 offset, u32 mask, u32 value) { bool change; unsigned int old, new; u32 ret; ret = sst_dsp_shim_read_unlocked(sst, offset); old = ret; new = (old & (~mask)) | (value & mask); change = (old != new); if...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/common/sst-dsp.c
int sst_dsp_shim_update_bits(struct sst_dsp *sst, u32 offset, u32 mask, u32 value) { unsigned long flags; bool change; spin_lock_irqsave(&sst->spinlock, flags); change = sst_dsp_shim_update_bits_unlocked(sst, offset, mask, value); spin_unlock_irqrestore(&sst->spinlock, flags); ...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/common/sst-dsp.c
int sst_dsp_mailbox_init(struct sst_dsp *sst, u32 inbox_offset, size_t inbox_size, u32 outbox_offset, size_t outbox_size) { sst->mailbox.in_base = sst->addr.lpe + inbox_offset; sst->mailbox.out_base = sst->addr.lpe + outbox_offset; sst->mailbox.in_size = inbox_si...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/common/sst-dsp.c
void sst_dsp_outbox_read(struct sst_dsp *sst, void *message, size_t bytes) { u32 i; trace_sst_ipc_outbox_read(bytes); memcpy_fromio(message, sst->mailbox.out_base, bytes); for (i = 0; i < bytes; i += 4) trace_sst_ipc_outbox_rdata(i, *(u32 *)(message + i)); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/common/sst-ipc.c
static struct ipc_message *msg_get_empty(struct sst_generic_ipc *ipc) { struct ipc_message *msg = NULL; if (!list_empty(&ipc->empty_list)) { msg = list_first_entry(&ipc->empty_list, struct ipc_message, list); list_del(&msg->list); } return msg; }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/common/sst-ipc.c
static int tx_wait_done(struct sst_generic_ipc *ipc, struct ipc_message *msg, struct sst_ipc_message *reply) { unsigned long flags; int ret; ret = wait_event_timeout(msg->waitq, msg->complete, msecs_to_jiffies(IPC_TIMEOUT_MSECS)); spin_lock_irqsave(&ipc->dsp-...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/common/sst-ipc.c
static int ipc_tx_message(struct sst_generic_ipc *ipc, struct sst_ipc_message request, struct sst_ipc_message *reply, int wait) { struct ipc_message *msg; unsigned long flags; spin_lock_irqsave(&ipc->dsp->spinlock, flags); msg = msg_get_empty(ipc); if (ms...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/common/sst-ipc.c
static void ipc_tx_msgs(struct work_struct *work) { struct sst_generic_ipc *ipc = container_of(work, struct sst_generic_ipc, kwork); struct ipc_message *msg; spin_lock_irq(&ipc->dsp->spinlock); while (!list_empty(&ipc->tx_list) && !ipc->pending) { if (ipc->ops.is_dsp_busy && ipc->ops.is_dsp_busy(ip...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/keembay/kmb_platform.c
static void hdmi_reformat_iec958(struct snd_pcm_runtime *runtime, struct kmb_i2s_info *kmb_i2s, unsigned int tx_ptr) { u32(*buf)[2] = (void *)runtime->dma_area; unsigned long temp; u32 i, j, sample; for (i = 0; i < kmb_i2s->fifo_th; i++) { j...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/keembay/kmb_platform.c
static void kmb_pcm_operation(struct kmb_i2s_info *kmb_i2s, bool playback) { struct snd_pcm_substream *substream; bool period_elapsed; unsigned int new_ptr; unsigned int ptr; if (playback) substream = kmb_i2s->tx_substream; else substream = kmb_i2s->rx_substream; if (!substream || !snd_pcm_runn...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/keembay/kmb_platform.c
static int kmb_pcm_trigger(struct snd_soc_component *component, struct snd_pcm_substream *substream, int cmd) { struct snd_pcm_runtime *runtime = substream->runtime; struct kmb_i2s_info *kmb_i2s = runtime->private_data; switch (cmd) { case SNDRV_PCM_TRIGGER_START: if (substream-...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/keembay/kmb_platform.c
static int kmb_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) { struct kmb_i2s_info *kmb_i2s = snd_soc_dai_get_drvdata(cpu_dai); int ret; switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { case SND_SOC_DAIFMT_BC_FC: kmb_i2s->clock_provider = false; ret = 0; break; case SND_SOC_DAIFM...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/keembay/kmb_platform.c
static int kmb_dai_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *cpu_dai) { struct kmb_i2s_info *kmb_i2s = snd_soc_dai_get_drvdata(cpu_dai); switch (cmd) { case SNDRV_PCM_TRIGGER_START: kmb_i2s->active++; kmb_i2s_start(kmb_i2s, substream); break...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/keembay/kmb_platform.c
static void kmb_i2s_config(struct kmb_i2s_info *kmb_i2s, int stream) { struct i2s_clk_config_data *config = &kmb_i2s->config; u32 ch_reg; kmb_i2s_disable_channels(kmb_i2s, stream); for (ch_reg = 0; ch_reg < config->chan_nr / 2; ch_reg++) { if (stream == SNDRV_PCM_STREAM_PLAYBACK) { writel(kmb_i2s->...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/bxt-sst.c
static int bxt_set_dsp_D3(struct sst_dsp *ctx, unsigned int core_id) { int ret; struct skl_ipc_dxstate_info dx; struct skl_dev *skl = ctx->thread_context; unsigned int core_mask = SKL_DSP_CORE_MASK(core_id); dx.core_mask = core_mask; dx.dx_mask = SKL_IPC_D3_MASK; dev_dbg(ctx->dev, "core mask=%x dx_mask=...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/bxt-sst.c
int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq, const char *fw_name, struct skl_dsp_loader_ops dsp_ops, struct skl_dev **dsp) { struct skl_dev *skl; struct sst_dsp *sst; int ret; ret = skl_sst_ctx_init(dev, irq, fw_name, dsp_ops, dsp, &skl_de...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/bxt-sst.c
void bxt_sst_dsp_cleanup(struct device *dev, struct skl_dev *skl) { skl_release_library(skl->lib_info, skl->lib_count); if (skl->dsp->fw) release_firmware(skl->dsp->fw); skl_freeup_uuid_list(skl); skl_ipc_free(&skl->ipc); skl->dsp->ops->free(skl->dsp); }
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/cnl-sst-dsp.c
void cnl_ipc_int_enable(struct sst_dsp *ctx) { sst_dsp_shim_update_bits(ctx, CNL_ADSP_REG_ADSPIC, CNL_ADSPIC_IPC, CNL_ADSPIC_IPC); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/cnl-sst-dsp.c
void cnl_ipc_int_disable(struct sst_dsp *ctx) { sst_dsp_shim_update_bits_unlocked(ctx, CNL_ADSP_REG_ADSPIC, CNL_ADSPIC_IPC, 0); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/cnl-sst.c
static int cnl_set_dsp_D0(struct sst_dsp *ctx, unsigned int core_id) { struct skl_dev *cnl = ctx->thread_context; unsigned int core_mask = SKL_DSP_CORE_MASK(core_id); struct skl_ipc_dxstate_info dx; int ret; if (!cnl->fw_loaded) { cnl->boot_complete = false; ret = cnl_load_base_firmware(ctx); if ...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/cnl-sst.c
static int cnl_set_dsp_D3(struct sst_dsp *ctx, unsigned int core_id) { struct skl_dev *cnl = ctx->thread_context; unsigned int core_mask = SKL_DSP_CORE_MASK(core_id); struct skl_ipc_dxstate_info dx; int ret; dx.core_mask = core_mask; dx.dx_mask = SKL_IPC_D3_MASK; ret = skl_ipc_set_dx(&cnl->ipc, CNL_INST...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/cnl-sst.c
static void cnl_ipc_tx_msg(struct sst_generic_ipc *ipc, struct ipc_message *msg) { struct skl_ipc_header *header = (struct skl_ipc_header *)(&msg->tx.header); if (msg->tx.size) sst_dsp_outbox_write(ipc->dsp, msg->tx.data, msg->tx.size); sst_dsp_shim_write_unlocked(ipc->dsp, CNL_AD...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/cnl-sst.c
void cnl_sst_dsp_cleanup(struct device *dev, struct skl_dev *skl) { if (skl->dsp->fw) release_firmware(skl->dsp->fw); skl_freeup_uuid_list(skl); cnl_ipc_free(&skl->ipc); skl->dsp->ops->free(skl->dsp); }
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-debug.c
void skl_debug_init_module(struct skl_debug *d, struct snd_soc_dapm_widget *w, struct skl_module_cfg *mconfig) { debugfs_create_file(w->name, 0444, d->modules, mconfig, &mcfg_fops); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-debug.c
static ssize_t fw_softreg_read(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) { struct skl_debug *d = file->private_data; struct sst_dsp *sst = d->skl->dsp; size_t w0_stat_sz = sst->addr.w0_stat_sz; void __iomem *in_base = sst->mailbox.in_base; void __iome...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
static int skl_free_dma_buf(struct device *dev, struct snd_dma_buffer *dmab) { snd_dma_free_pages(dmab); return 0; } #define SKL_ASTATE_PARAM_ID 4
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
void skl_dsp_set_astate_cfg(struct skl_dev *skl, u32 cnt, void *data) { struct skl_ipc_large_config_msg msg = {0}; msg.large_param_id = SKL_ASTATE_PARAM_ID; msg.param_data_size = (cnt * sizeof(struct skl_astate_param) + sizeof(cnt)); skl_ipc_set_large_config(&skl->ipc, &msg, data); }
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
static int skl_dsp_prepare(struct device *dev, unsigned int format, unsigned int size, struct snd_dma_buffer *dmab) { struct hdac_bus *bus = dev_get_drvdata(dev); struct hdac_ext_stream *estream; struct hdac_stream *stream; struct snd_pcm_substream substream; int ret; if (!bus) ...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
static int skl_dsp_trigger(struct device *dev, bool start, int stream_tag) { struct hdac_bus *bus = dev_get_drvdata(dev); struct hdac_stream *stream; if (!bus) return -ENODEV; stream = snd_hdac_get_stream(bus, SNDRV_PCM_STREAM_PLAYBACK, stream_tag); if (!stream) return -EINVAL; snd_hdac_dsp_trig...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
int skl_suspend_late_dsp(struct skl_dev *skl) { struct delayed_work *dwork; if (!skl) return 0; dwork = &skl->d0i3.work; if (dwork->work.func) { if (skl->supend_active) flush_delayed_work(dwork); else cancel_delayed_work_sync(dwork); } return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
int skl_resume_dsp(struct skl_dev *skl) { struct hdac_bus *bus = skl_to_bus(skl); int ret; if (!bus->ppcap) return 0; /* enable ppcap interrupt */ snd_hdac_ext_bus_ppcap_enable(bus, true); snd_hdac_ext_bus_ppcap_int_enable(bus, true); /* check if DSP 1st boot is done */ if (skl->is_first_boot) ...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
static void skl_set_base_module_format(struct skl_dev *skl, struct skl_module_cfg *mconfig, struct skl_base_cfg *base_cfg) { struct skl_module *module = mconfig->module; struct skl_module_res *res = &module->resources[mconfig->res_idx]; ...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
static void fill_pin_params(struct skl_audio_data_format *pin_fmt, struct skl_module_fmt *format) { pin_fmt->number_of_channels = format->channels; pin_fmt->s_freq = format->s_freq; pin_fmt->bit_depth = format->bit_depth; pin_fmt->valid_bit_depth = format->valid_bit_depth; pin_fmt...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
static u32 skl_get_node_id(struct skl_dev *skl, struct skl_module_cfg *mconfig) { union skl_connector_node_id node_id = {0}; union skl_ssp_dma_node ssp_node = {0}; struct skl_pipe_params *params = mconfig->pipe->p_params; switch (mconfig->dev_type) { case SKL_DEVICE_BT: node_id...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
static void skl_set_src_format(struct skl_dev *skl, struct skl_module_cfg *mconfig, struct skl_src_module_cfg *src_mconfig) { struct skl_module *module = mconfig->module; struct skl_module_iface *iface = &module->formats[mconfig->fmt_idx]; struct skl_m...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
static void skl_set_base_outfmt_format(struct skl_dev *skl, struct skl_module_cfg *mconfig, struct skl_base_outfmt_cfg *base_outfmt_mcfg) { struct skl_audio_data_format *out_fmt = &base_outfmt_mcfg->out_fmt; struct skl_base_cfg *base_cfg = (struct skl_base_cfg *)base_outfmt_mcfg; skl_s...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
static u16 skl_get_module_param_size(struct skl_dev *skl, struct skl_module_cfg *mconfig) { struct skl_module_res *res; struct skl_module *module = mconfig->module; u16 param_size; switch (mconfig->m_type) { case SKL_MODULE_TYPE_COPIER: param_size = sizeof(struct skl...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
static int skl_alloc_queue(struct skl_module_pin *mpin, struct skl_module_cfg *tgt_cfg, int max) { int i; struct skl_module_inst_id id = tgt_cfg->id; for (i = 0; i < max; i++) { if (mpin[i].is_dynamic) { if (!mpin[i].in_use && mpin[i].pin_state == SKL_PIN_UNBIND) { m...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
static void skl_free_queue(struct skl_module_pin *mpin, int q_index) { if (mpin[q_index].is_dynamic) { mpin[q_index].in_use = false; mpin[q_index].id.module_id = 0; mpin[q_index].id.instance_id = 0; mpin[q_index].id.pvt_id = 0; } mpin[q_index].pin_state = SKL_PIN_UNBIND; mpin[q_index].tgt_mcfg ...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
static void skl_clear_module_state(struct skl_module_pin *mpin, int max, struct skl_module_cfg *mcfg) { int i; bool found = false; for (i = 0; i < max; i++) { if (mpin[i].pin_state == SKL_PIN_UNBIND) continue; found = true; break; } if (!found) mcfg->...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
static int skl_set_pipe_state(struct skl_dev *skl, struct skl_pipe *pipe, enum skl_ipc_pipeline_state state) { dev_dbg(skl->dev, "%s: pipe_state = %d\n", __func__, state); return skl_ipc_set_pipeline_state(&skl->ipc, pipe->ppl_id, state); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
int skl_run_pipe(struct skl_dev *skl, struct skl_pipe *pipe) { int ret; dev_dbg(skl->dev, "%s: pipe = %d\n", __func__, pipe->ppl_id); if (pipe->state < SKL_PIPE_CREATED) return 0; /* Pipe has to be paused before it is started */ ret = skl_set_pipe_state(skl, pipe, PPL_PAUSED); if (ret < 0) { dev_...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-messages.c
int skl_set_module_params(struct skl_dev *skl, u32 *params, int size, u32 param_id, struct skl_module_cfg *mcfg) { struct skl_ipc_large_config_msg msg; msg.module_id = mcfg->id.module_id; msg.instance_id = mcfg->id.pvt_id; msg.param_data_size = size; msg.large_param_id = param_id; ...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-nhlt.c
int skl_nhlt_update_topology_bin(struct skl_dev *skl) { struct nhlt_acpi_table *nhlt = (struct nhlt_acpi_table *)skl->nhlt; struct hdac_bus *bus = skl_to_bus(skl); struct device *dev = bus->dev; dev_dbg(dev, "oem_id %.6s, oem_table_id %.8s oem_revision %d\n", nhlt->header.oem_id, nhlt->header.oem_ta...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-nhlt.c
int skl_nhlt_create_sysfs(struct skl_dev *skl) { struct device *dev = &skl->pci->dev; if (sysfs_create_file(&dev->kobj, &dev_attr_platform_id.attr)) dev_warn(dev, "Error creating sysfs entry\n"); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-nhlt.c
void skl_nhlt_remove_sysfs(struct skl_dev *skl) { struct device *dev = &skl->pci->dev; if (skl->nhlt) sysfs_remove_file(&dev->kobj, &dev_attr_platform_id.attr); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-pcm.c
static struct hdac_bus *get_bus_ctx(struct snd_pcm_substream *substream) { struct hdac_ext_stream *stream = get_hdac_ext_stream(substream); struct hdac_stream *hstream = hdac_stream(stream); struct hdac_bus *bus = hstream->bus; return bus; }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-pcm.c
int skl_pcm_host_dma_prepare(struct device *dev, struct skl_pipe_params *params) { struct hdac_bus *bus = dev_get_drvdata(dev); struct skl_dev *skl = bus_to_skl(bus); unsigned int format_val; struct hdac_stream *hstream; struct hdac_ext_stream *stream; int err; hstream = snd_...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-pcm.c
static int skl_pcm_open(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct hdac_bus *bus = dev_get_drvdata(dai->dev); struct hdac_ext_stream *stream; struct snd_pcm_runtime *runtime = substream->runtime; struct skl_dma_params *dma_params; struct skl_dev *skl = get_s...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-pcm.c
static int skl_be_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct skl_pipe_params p_params = {0}; p_params.s_fmt = snd_pcm_format_width(params_format(params)); p_params.s_cont = snd_pcm_for...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-pcm.c
static int skl_platform_soc_probe(struct snd_soc_component *component) { struct hdac_bus *bus = dev_get_drvdata(component->dev); struct skl_dev *skl = bus_to_skl(bus); const struct skl_dsp_ops *ops; int ret; ret = pm_runtime_resume_and_get(component->dev); if (ret < 0 && ret != -EACCES) return ret; ...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-pcm.c
static void skl_platform_soc_remove(struct snd_soc_component *component) { struct hdac_bus *bus = dev_get_drvdata(component->dev); struct skl_dev *skl = bus_to_skl(bus); skl_tplg_exit(component, bus); skl_debugfs_exit(skl); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-pcm.c
int skl_platform_register(struct device *dev) { int ret; struct snd_soc_dai_driver *dais; int num_dais = ARRAY_SIZE(skl_platform_dai); struct hdac_bus *bus = dev_get_drvdata(dev); struct skl_dev *skl = bus_to_skl(bus); skl->dais = kmemdup(skl_platform_dai, sizeof(skl_platform_dai), GFP_KERNEL); if (!skl...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-ssp-clk.c
static int skl_send_clk_dma_control(struct skl_dev *skl, struct skl_clk_rate_cfg_table *rcfg, u32 vbus_id, u8 clk_type, bool enable) { struct nhlt_specific_cfg *sp_cfg; u32 i2s_config_size, node_id = 0; struct nhlt_fmt_cfg *fmt_cfg; union s...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-ssp-clk.c
static int skl_clk_dev_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device *parent_dev = dev->parent; struct skl_clk_parent_src *parent_clks; struct skl_clk_pdata *clk_pdata; struct skl_clk_data *data; struct skl_ssp_clk *clks; int ret, i; clk_pdata = dev_get_platdata(&...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-cldma.c
static void skl_cldma_stream_run(struct sst_dsp *ctx, bool enable) { unsigned char val; int timeout; sst_dsp_shim_update_bits_unlocked(ctx, SKL_ADSP_REG_CL_SD_CTL, CL_SD_CTL_RUN_MASK, CL_SD_CTL_RUN(enable)); udelay(3); timeout = 300; do { val = sst_dsp_shim_read(ct...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-cldma.c
static void skl_cldma_setup_controller(struct sst_dsp *ctx, struct snd_dma_buffer *dmab_bdl, unsigned int max_size, u32 count) { skl_cldma_stream_clear(ctx); sst_dsp_shim_write(ctx, SKL_ADSP_REG_CL_SD_BDLPL, CL_SD_BDL...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-cldma.c
int skl_cldma_wait_interruptible(struct sst_dsp *ctx) { int ret = 0; if (!wait_event_timeout(ctx->cl_dev.wait_queue, ctx->cl_dev.wait_condition, msecs_to_jiffies(SKL_WAIT_TIMEOUT))) { dev_err(ctx->dev, "%s: Wait timeout\n", __func__); ret = -EIO; goto cleanup; } dev_dbg(...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-dsp.c
unsigned int skl_dsp_get_enabled_cores(struct sst_dsp *ctx) { struct skl_dev *skl = ctx->thread_context; unsigned int core_mask, en_cores_mask; u32 val; core_mask = SKL_DSP_CORES_MASK(skl->cores.count); val = sst_dsp_shim_read_unlocked(ctx, SKL_ADSP_REG_ADSPCS); en_cores_mask = (val & SKL_ADSPCS_CP...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-dsp.c
int skl_dsp_start_core(struct sst_dsp *ctx, unsigned int core_mask) { int ret; ret = skl_dsp_core_unset_reset_state(ctx, core_mask); if (ret < 0) return ret; /* run core */ dev_dbg(ctx->dev, "unstall/run core: core_mask = %x\n", core_mask); sst_dsp_shim_update_bits_unlocked(ctx, SKL_ADSP_REG_ADSPCS, ...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-dsp.c
int skl_dsp_disable_core(struct sst_dsp *ctx, unsigned int core_mask) { int ret; ret = skl_dsp_reset_core(ctx, core_mask); if (ret < 0) { dev_err(ctx->dev, "dsp core reset failed: core_mask %x\n", core_mask); return ret; } ret = skl_dsp_core_power_down(ctx, core_mask); if (ret < 0) { dev_err(c...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-dsp.c
int skl_dsp_wake(struct sst_dsp *ctx) { return skl_dsp_get_core(ctx, SKL_DSP_CORE0_ID); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-dsp.c
int skl_dsp_sleep(struct sst_dsp *ctx) { return skl_dsp_put_core(ctx, SKL_DSP_CORE0_ID); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-dsp.c
bool is_skl_dsp_running(struct sst_dsp *ctx) { return (ctx->sst_state == SKL_DSP_RUNNING); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-ipc.c
static bool skl_ipc_is_dsp_busy(struct sst_dsp *dsp) { u32 hipci; hipci = sst_dsp_shim_read_unlocked(dsp, SKL_ADSP_REG_HIPCI); return (hipci & SKL_ADSP_REG_HIPCI_BUSY); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-ipc.c
static struct ipc_message *skl_ipc_reply_get_msg(struct sst_generic_ipc *ipc, u64 ipc_header) { struct ipc_message *msg = NULL; struct skl_ipc_header *header = (struct skl_ipc_header *)(&ipc_header); if (list_empty(&ipc->rx_list)) { dev_err(ipc->dev, "ipc: rx...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-ipc.c
int skl_ipc_delete_pipeline(struct sst_generic_ipc *ipc, u8 instance_id) { struct skl_ipc_header header = {0}; struct sst_ipc_message request = {0}; int ret; header.primary = IPC_MSG_TARGET(IPC_FW_GEN_MSG); header.primary |= IPC_MSG_DIR(IPC_MSG_REQUEST); header.primary |= IPC_GLB_TYPE(IPC_GLB_DELETE_PPL);...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-ipc.c
int skl_ipc_set_pipeline_state(struct sst_generic_ipc *ipc, u8 instance_id, enum skl_ipc_pipeline_state state) { struct skl_ipc_header header = {0}; struct sst_ipc_message request = {0}; int ret; header.primary = IPC_MSG_TARGET(IPC_FW_GEN_MSG); header.primary |= IPC_MSG_DIR(IP...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-ipc.c
int skl_ipc_load_modules(struct sst_generic_ipc *ipc, u8 module_cnt, void *data) { struct skl_ipc_header header = {0}; struct sst_ipc_message request; int ret; header.primary = IPC_MSG_TARGET(IPC_FW_GEN_MSG); header.primary |= IPC_MSG_DIR(IPC_MSG_REQUEST); header.primary |= IPC_GLB...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-utils.c
static int skl_get_pvtid_map(struct uuid_module *module, int instance_id) { int pvt_id; for (pvt_id = 0; pvt_id < module->max_instance; pvt_id++) { if (module->instance_id[pvt_id] == instance_id) return pvt_id; } return -EINVAL; }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-utils.c
static inline int skl_getid_32(struct uuid_module *module, u64 *val, int word1_mask, int word2_mask) { int index, max_inst, pvt_id; u32 mask_val; max_inst = module->max_instance; mask_val = (u32)(*val >> word1_mask); if (mask_val != 0xffffffff) { index = ffz(mask_val); ...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-utils.c
static inline int skl_pvtid_128(struct uuid_module *module) { int j, i, word1_mask, word2_mask = 0, pvt_id; for (j = 0; j < MAX_INSTANCE_BUFF; j++) { word1_mask = 0; for (i = 0; i < 2; i++) { pvt_id = skl_getid_32(module, &module->pvt_id[j], word1_mask, word2_mask); if (pvt_id >= 0) r...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-utils.c
int skl_put_pvt_id(struct skl_dev *skl, guid_t *uuid_mod, int *pvt_id) { int i; struct uuid_module *module; list_for_each_entry(module, &skl->uuid_list, list) { if (guid_equal(uuid_mod, &module->uuid)) { if (*pvt_id != 0) i = (*pvt_id) / 64; else i = 0; module->pvt_id[i] &...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-utils.c
void skl_freeup_uuid_list(struct skl_dev *skl) { struct uuid_module *uuid, *_uuid; list_for_each_entry_safe(uuid, _uuid, &skl->uuid_list, list) { list_del(&uuid->list); kfree(uuid); } }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-utils.c
int skl_sst_ctx_init(struct device *dev, int irq, const char *fw_name, struct skl_dsp_loader_ops dsp_ops, struct skl_dev **dsp, struct sst_dsp_device *skl_dev) { struct skl_dev *skl = *dsp; struct sst_dsp *sst; skl->dev = dev; skl_dev->thread_context = skl; INIT_LIS...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst-utils.c
void skl_release_library(struct skl_lib_info *linfo, int lib_count) { int i; for (i = 1; i < lib_count; i++) { if (linfo[i].fw) { release_firmware(linfo[i].fw); linfo[i].fw = NULL; } } }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst.c
static int skl_set_dsp_D0(struct sst_dsp *ctx, unsigned int core_id) { int ret; struct skl_ipc_dxstate_info dx; struct skl_dev *skl = ctx->thread_context; unsigned int core_mask = SKL_DSP_CORE_MASK(core_id); if (core_id == SKL_DSP_CORE0_ID) { ret = skl_load_base_firmware(ctx); if (ret < 0) { de...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst.c
static int skl_set_dsp_D3(struct sst_dsp *ctx, unsigned int core_id) { int ret; struct skl_ipc_dxstate_info dx; struct skl_dev *skl = ctx->thread_context; unsigned int core_mask = SKL_DSP_CORE_MASK(core_id); dx.core_mask = core_mask; dx.dx_mask = SKL_IPC_D3_MASK; ret = skl_ipc_set_dx(&skl->ipc, SKL_INST...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst.c
static void skl_clear_module_table(struct sst_dsp *ctx) { struct skl_module_table *module, *tmp; if (list_empty(&ctx->module_list)) return; list_for_each_entry_safe(module, tmp, &ctx->module_list, list) { list_del(&module->list); release_firmware(module->mod_info->fw); } }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-sst.c
int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq, const char *fw_name, struct skl_dsp_loader_ops dsp_ops, struct skl_dev **dsp) { struct skl_dev *skl; struct sst_dsp *sst; int ret; ret = skl_sst_ctx_init(dev, irq, fw_name, dsp_ops, dsp, &skl_d...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-topology.c
static int is_skl_dsp_widget_type(struct snd_soc_dapm_widget *w, struct device *dev) { if (w->dapm->dev != dev) return false; switch (w->id) { case snd_soc_dapm_dai_link: case snd_soc_dapm_dai_in: case snd_soc_dapm_aif_in: case snd_soc_dapm_aif_out: case snd_soc_dapm...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-topology.c
static void skl_tplg_update_params_fixup(struct skl_module_cfg *m_cfg, struct skl_pipe_params *params, bool is_fe) { int in_fixup, out_fixup; struct skl_module_fmt *in_fmt, *out_fmt; in_fmt = &m_cfg->module->formats[m_cfg->fmt_idx]...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-topology.c
static u8 skl_tplg_be_dev_type(int dev_type) { int ret; switch (dev_type) { case SKL_DEVICE_BT: ret = NHLT_DEVICE_BT; break; case SKL_DEVICE_DMIC: ret = NHLT_DEVICE_DMIC; break; case SKL_DEVICE_I2S: ret = NHLT_DEVICE_I2S; break; default: ret = NHLT_DEVICE_INVALID; break;...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-topology.c
static int skl_tplg_set_module_init_data(struct snd_soc_dapm_widget *w) { const struct snd_kcontrol_new *k; struct soc_bytes_ext *sb; struct skl_algo_data *bc; struct skl_module_cfg *mconfig = w->priv; int i; for (i = 0; i < w->num_kcontrols; i++) { k = &w->kcontrol_news[i]; if (k->access & SNDRV_C...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-topology.c
static int skl_get_module_id(struct skl_dev *skl, guid_t *uuid) { struct uuid_module *module; list_for_each_entry(module, &skl->uuid_list, list) { if (guid_equal(uuid, &module->uuid)) return module->id; } return -EINVAL; }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-topology.c
static int skl_tplg_mixer_dapm_post_pmu_event(struct snd_soc_dapm_widget *w, struct skl_dev *skl) { int ret = 0; struct snd_soc_dapm_widget *source, *sink; struct skl_module_cfg *src_mconfig, *sink_mconfig; int src_pipe_started = 0; sink = w; sink_mconfig = sin...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-topology.c
static int skl_tplg_mixer_dapm_post_pmd_event(struct snd_soc_dapm_widget *w, struct skl_dev *skl) { struct skl_module_cfg *mconfig = w->priv; struct skl_pipe_module *w_module; struct skl_module_cfg *src_module = NULL, *dst_module; struct skl_pipe *s_pipe = mconfig->...
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-topology.c
static int skl_tplg_pga_dapm_post_pmd_event(struct snd_soc_dapm_widget *w, struct skl_dev *skl) { struct skl_module_cfg *src_mconfig, *sink_mconfig; int ret = 0, i; src_mconfig = w->priv; ret = skl_stop_pipe(skl, src_mconfig->pipe); if (ret) return ret; for...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-topology.c
static int skl_tplg_multi_config_set_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol, bool is_set) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct hdac_bus *bus = snd_soc_co...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-topology.c
static int skl_tplg_multi_config_get_dmic(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { return skl_tplg_multi_config_set_get(kcontrol, ucontrol, false); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-topology.c
static int skl_tplg_multi_config_set_dmic(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { return skl_tplg_multi_config_set_get(kcontrol, ucontrol, true); }
[ 0, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-topology.c
static int skl_tplg_tlv_control_get(struct snd_kcontrol *kcontrol, unsigned int __user *data, unsigned int size) { struct soc_bytes_ext *sb = (struct soc_bytes_ext *)kcontrol->private_value; struct skl_algo_data *bc = (struct skl_algo_data *)sb...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-topology.c
static void skl_tplg_fill_dma_id(struct skl_module_cfg *mcfg, struct skl_pipe_params *params) { struct skl_pipe *pipe = mcfg->pipe; if (pipe->passthru) { switch (mcfg->dev_type) { case SKL_DEVICE_HDALINK: pipe->p_params->link_dma_id = params->link_dma_id; pipe->...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-topology.c
struct skl_module_cfg *skl_tplg_fe_get_cpr_module(struct snd_soc_dai *dai, int stream) { struct snd_soc_dapm_widget *w; struct snd_soc_dapm_path *p = NULL; if (stream == SNDRV_PCM_STREAM_PLAYBACK) { w = dai->playback_widget; snd_soc_dapm_widget_for_each_s...
[ 1, 0 ]
Linux Kernel
sound/soc/intel/skylake/skl-topology.c
static int skl_tplg_add_pipe(struct device *dev, struct skl_module_cfg *mconfig, struct skl_dev *skl, struct snd_soc_tplg_vendor_value_elem *tkn_elem) { struct skl_pipeline *ppl; struct skl_pipe *pipe; struct skl_pipe_params *params; list_for_each_entry...
[ 1, 0 ]