Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | sound/soc/pxa/pxa2xx-ac97.c |
static int pxa2xx_ac97_write_actrl(struct ac97_controller *adrv, int slot,
unsigned short reg, unsigned short val) {
return pxa2xx_ac97_write(slot, reg, val);
} | [
0,
0
] |
Linux Kernel | sound/soc/pxa/pxa2xx-ac97.c |
static int pxa2xx_ac97_hifi_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai) {
struct snd_dmaengine_dai_dma_data *dma_data;
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
dma_data = &pxa2xx_ac97_pcm_stereo_out;
else
dma_data = &pxa2xx_ac9... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/pxa2xx-ac97.c | static int pxa2xx_ac97_dev_probe(struct platform_device *pdev) {
int ret;
struct ac97_controller *ctrl;
pxa2xx_audio_ops_t *pdata = pdev->dev.platform_data;
struct resource *regs;
void **codecs_pdata;
if (pdev->id != -1) {
dev_err(&pdev->dev, "PXA2xx has only one AC97 port.\n");
return -ENXIO;
}
... | [
1,
0
] |
Linux Kernel | sound/soc/pxa/pxa2xx-i2s.c |
static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
if (IS_ERR(clk_i2s))
return PTR_ERR(clk_i2s);
if (!snd_soc... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/pxa2xx-i2s.c |
static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
writel(readl(i2s_reg_base + SACR1) | (SACR1_DRPL), i2s_reg_base + SACR1);
writel(readl(i2s_reg_base + SAIMR) & (~SAIMR_TFS), i2... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/pxa2xx-i2s.c |
static int __init pxa2xx_i2s_init(void) {
clk_i2s = ERR_PTR(-ENOENT);
return platform_driver_register(&pxa2xx_i2s_driver);
} | [
0,
0
] |
Linux Kernel | sound/soc/pxa/pxa2xx-i2s.c |
static void __exit pxa2xx_i2s_exit(void) {
platform_driver_unregister(&pxa2xx_i2s_driver);
} | [
0,
0
] |
Linux Kernel | sound/soc/pxa/spitz.c | static int spitz_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 *codec_dai = asoc_rtd_to_codec(rtd, 0);
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
uns... | [
1,
0
] |
Linux Kernel | sound/soc/pxa/spitz.c |
static int spitz_mic_bias(struct snd_soc_dapm_widget *w, struct snd_kcontrol *k,
int event) {
gpiod_set_value_cansleep(gpiod_mic, SND_SOC_DAPM_EVENT_ON(event));
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/pxa/spitz.c |
static int spitz_probe(struct platform_device *pdev) {
struct snd_soc_card *card = &snd_soc_spitz;
int ret;
gpiod_mic = devm_gpiod_get(&pdev->dev, "mic", GPIOD_OUT_LOW);
if (IS_ERR(gpiod_mic))
return PTR_ERR(gpiod_mic);
gpiod_mute_l = devm_gpiod_get(&pdev->dev, "mute-l", GPIOD_OUT_LOW);
if (IS_ERR(gpi... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/tosa.c |
static int tosa_set_jack(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
if (tosa_jack_func == ucontrol->value.enumerated.item[0])
return 0;
tosa_jack_func = ucontrol->value.enumerated.item[0];
tosa_ex... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/tosa.c |
static int tosa_get_spk(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
ucontrol->value.enumerated.item[0] = tosa_spk_func;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/pxa/tosa.c |
static int tosa_probe(struct platform_device *pdev) {
struct snd_soc_card *card = ⤩
int ret;
tosa_mute = devm_gpiod_get(&pdev->dev, NULL, GPIOD_OUT_LOW);
if (IS_ERR(tosa_mute))
return dev_err_probe(&pdev->dev, PTR_ERR(tosa_mute),
"failed to get L_MUTE GPIO\n");
gpiod_set_co... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/ttc-dkb.c | static int ttc_pm860x_init(struct snd_soc_pcm_runtime *rtd) {
struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
snd_soc_card_jack_new_pins(rtd->card, "Headphone Jack",
SND_JACK_HEADPHONE | SND_JACK_BTN_0 |
SND_JACK_BTN_1 | SND_... | [
0,
0
] |
Linux Kernel | sound/soc/pxa/ttc-dkb.c |
static int ttc_dkb_probe(struct platform_device *pdev) {
struct snd_soc_card *card = &ttc_dkb_card;
int ret;
card->dev = &pdev->dev;
ret = devm_snd_soc_register_card(&pdev->dev, card);
if (ret)
dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret);
return ret;
} | [
0,
0
] |
Linux Kernel | sound/soc/pxa/z2.c |
static void __exit z2_exit(void) { platform_device_unregister(z2_snd_device); } | [
0,
0
] |
Linux Kernel | sound/soc/qcom/apq8016_sbc.c |
static void apq8016_sbc_add_ops(struct snd_soc_card *card) {
struct snd_soc_dai_link *link;
int i;
for_each_card_prelinks(card, i, link) link->init = apq8016_sbc_dai_init;
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/apq8016_sbc.c |
static int qdsp6_dai_get_lpass_id(struct snd_soc_dai *cpu_dai) {
switch (cpu_dai->id) {
case PRIMARY_MI2S_RX:
case PRIMARY_MI2S_TX:
return MI2S_PRIMARY;
case SECONDARY_MI2S_RX:
case SECONDARY_MI2S_TX:
return MI2S_SECONDARY;
case TERTIARY_MI2S_RX:
case TERTIARY_MI2S_TX:
return MI2S_TERTIARY;
... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/apq8016_sbc.c |
static int msm8916_qdsp6_startup(struct snd_pcm_substream *substream) {
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_card *card = rtd->card;
struct apq8016_sbc_data *data = snd_soc_card_get_drvdata(card);
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
int mi2s, ret;
mi... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/apq8016_sbc.c |
static int msm8916_qdsp6_be_hw_params_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_PC... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/apq8096.c | static int apq8096_init(struct snd_soc_pcm_runtime *rtd) {
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
unsigned int rx_ch[SLIM_MAX_RX_PORTS] = {144, 145, 146, 147, 148, 149, 150,
151, 152, 153, 154, 155, 156};
unsigned int tx_ch[SLIM_MAX_TX_PORTS] = {128,... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/apq8096.c |
static int apq8096_platform_probe(struct platform_device *pdev) {
struct snd_soc_card *card;
struct device *dev = &pdev->dev;
int ret;
card = devm_kzalloc(dev, sizeof(*card), GFP_KERNEL);
if (!card)
return -ENOMEM;
card->dev = dev;
card->owner = THIS_MODULE;
dev_set_drvdata(dev, card);
ret = qc... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/common.c | int qcom_snd_sdw_prepare(struct snd_pcm_substream *substream,
struct sdw_stream_runtime *sruntime,
bool *stream_prepared) {
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
int ret;
if (!sruntime)... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/lpass-apq8016.c |
static int apq8016_lpass_exit(struct platform_device *pdev) {
struct lpass_data *drvdata = platform_get_drvdata(pdev);
clk_bulk_disable_unprepare(drvdata->num_clks, drvdata->clks);
clk_disable_unprepare(drvdata->ahbix_clk);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/lpass-cpu.c | static int lpass_cpu_init_i2sctl_bitfields(struct device *dev,
struct lpaif_i2sctl *i2sctl,
struct regmap *map) {
struct lpass_data *drvdata = dev_get_drvdata(dev);
struct lpass_variant *v = drvdata->variant;
i2sctl->loopback =... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/lpass-cpu.c |
static int lpass_cpu_daiops_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai);
int ret;
ret = clk_prepare_enable(drvdata->mi2s_osr_clk[dai->driver->id]);
if (ret) {
dev_err(dai->dev, "error ... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/lpass-cpu.c |
static bool lpass_hdmi_regmap_writeable(struct device *dev, unsigned int reg) {
struct lpass_data *drvdata = dev_get_drvdata(dev);
struct lpass_variant *v = drvdata->variant;
int i;
if (reg == LPASS_HDMI_TX_CTL_ADDR(v))
return true;
if (reg == LPASS_HDMI_TX_LEGACY_ADDR(v))
return true;
if (reg == ... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/lpass-cpu.c |
static bool lpass_hdmi_regmap_readable(struct device *dev, unsigned int reg) {
struct lpass_data *drvdata = dev_get_drvdata(dev);
struct lpass_variant *v = drvdata->variant;
int i;
if (reg == LPASS_HDMI_TX_CTL_ADDR(v))
return true;
if (reg == LPASS_HDMI_TX_LEGACY_ADDR(v))
return true;
if (reg == L... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/lpass-cpu.c |
static bool lpass_hdmi_regmap_volatile(struct device *dev, unsigned int reg) {
struct lpass_data *drvdata = dev_get_drvdata(dev);
struct lpass_variant *v = drvdata->variant;
int i;
if (reg == LPASS_HDMITX_APP_IRQSTAT_REG(v))
return true;
if (reg == LPASS_HDMI_TX_LEGACY_ADDR(v))
return true;
if (re... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/lpass-cpu.c |
static bool lpass_rxtx_regmap_writeable(struct device *dev, unsigned int reg) {
return __lpass_rxtx_regmap_accessible(dev, reg, LPASS_REG_WRITE);
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/lpass-cpu.c |
static bool lpass_va_regmap_volatile(struct device *dev, unsigned int reg) {
struct lpass_data *drvdata = dev_get_drvdata(dev);
struct lpass_variant *v = drvdata->variant;
int i;
for (i = 0; i < v->va_irq_ports; ++i) {
if (reg == LPAIF_VA_IRQCLEAR_REG(v, i))
return true;
if (reg == LPAIF_VA_IRQS... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/lpass-cpu.c |
static unsigned int of_lpass_cpu_parse_sd_lines(struct device *dev,
struct device_node *node,
const char *name) {
unsigned int lines[LPASS_CPU_MAX_MI2S_LINES];
unsigned int sd_line_mask = 0;
int num_lines, i;
num_l... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/lpass-cpu.c | static void of_lpass_cpu_parse_dai_data(struct device *dev,
struct lpass_data *data) {
struct device_node *node;
int ret, id;
for (id = 0; id < data->variant->num_dai; id++) {
data->mi2s_playback_sd_mode[id] = LPAIF_I2SCTL_MODE_8CH;
data->mi2s_capture_sd_mode[id] =... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/lpass-cpu.c |
int asoc_qcom_lpass_cpu_platform_remove(struct platform_device *pdev) {
struct lpass_data *drvdata = platform_get_drvdata(pdev);
if (drvdata->variant->exit)
drvdata->variant->exit(pdev);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/lpass-platform.c |
static int lpass_platform_alloc_hdmidmactl_fields(struct device *dev,
struct regmap *map) {
struct lpass_data *drvdata = dev_get_drvdata(dev);
struct lpass_variant *v = drvdata->variant;
struct lpaif_dmactl *rd_dmactl;
rd_dmactl = devm_kzalloc(dev, sizeof(stru... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/lpass-platform.c |
static int lpass_platform_pcmops_mmap(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct vm_area_struct *vma) {
struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream);
struct snd_soc_dai *c... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/lpass-platform.c | static irqreturn_t lpass_platform_rxtxif_irq(int irq, void *data) {
struct lpass_data *drvdata = data;
struct lpass_variant *v = drvdata->variant;
unsigned int irqs;
irqreturn_t rv;
int chan;
rv = regmap_read(drvdata->rxtx_lpaif_map,
LPAIF_RXTX_IRQSTAT_REG(v, LPAIF_IRQ_PORT_HOST), &irqs)... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/lpass-platform.c | static int lpass_platform_pcm_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *soc_runtime) {
struct snd_pcm *pcm = soc_runtime->pcm;
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0);
unsigned int dai_id = cpu_dai->driver->id;
size_t size = lpa... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/audioreach.c |
void *audioreach_alloc_apm_cmd_pkt(int pkt_size, uint32_t opcode,
uint32_t token) {
return __audioreach_alloc_pkt(pkt_size, opcode, token, GPR_APM_MODULE_IID,
APM_MODULE_INSTANCE_ID, true);
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/audioreach.c | static void apm_populate_container_config(struct apm_container_obj *cfg,
struct audioreach_container *cont) {
cfg->container_cfg.container_id = cont->container_id;
cfg->container_cfg.num_prop = 4;
/* Capability list */
cfg->cap_data.prop_id = APM_CONTAINER_PROP_ID_CAP... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/audioreach.c | static void apm_populate_sub_graph_config(struct apm_sub_graph_data *cfg,
struct audioreach_sub_graph *sg) {
cfg->sub_graph_cfg.sub_graph_id = sg->sub_graph_id;
cfg->sub_graph_cfg.num_sub_graph_prop = APM_SUB_GRAPH_CFG_NPROP;
cfg->perf_data.prop_id = APM_SUB_GRAPH_PROP_I... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/audioreach.c |
static int
audioreach_sal_set_media_format(struct q6apm_graph *graph,
struct audioreach_module *module,
struct audioreach_module_config *cfg) {
struct apm_module_param_data *param_data;
struct param_id_sal_output_config *media_format;
int payload_si... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/audioreach.c |
static int
audioreach_mfc_set_media_format(struct q6apm_graph *graph,
struct audioreach_module *module,
struct audioreach_module_config *cfg) {
struct apm_module_param_data *param_data;
struct param_id_mfc_media_format *media_format;
uint32_t num_ch... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/audioreach.c |
int audioreach_gain_set_vol_ctrl(struct q6apm *apm,
struct audioreach_module *module, int vol) {
struct param_id_vol_ctrl_master_gain *cfg;
struct apm_module_param_data *param_data;
int rc, payload_size;
struct gpr_pkt *pkt;
void *p;
payload_size = sizeof(*cfg) + APM_MODUL... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/audioreach.c | int audioreach_map_memory_regions(struct q6apm_graph *graph, unsigned int dir,
size_t period_sz, unsigned int periods,
bool is_contiguous) {
struct apm_shared_map_region_payload *mregions;
struct apm_cmd_shared_mem_map_regions *cmd;
uint32_t num_... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6adm.c |
static struct q6copp *q6adm_alloc_copp(struct q6adm *adm, int port_idx) {
struct q6copp *c;
int idx;
idx = find_first_zero_bit(&adm->copp_bitmap[port_idx], MAX_COPPS_PER_PORT);
if (idx >= MAX_COPPS_PER_PORT)
return ERR_PTR(-EBUSY);
c = kzalloc(sizeof(*c), GFP_ATOMIC);
if (!c)
return ERR_PTR(-ENO... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6adm.c |
static int q6adm_device_open(struct q6adm *adm, struct q6copp *copp,
int port_id, int path, int topology,
int channel_mode, int bit_width, int rate) {
struct q6adm_cmd_device_open_v5 *open;
int afe_port = q6afe_get_port_id(port_id);
struct apr_pkt *pkt;
... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6adm.c | int q6adm_close(struct device *dev, struct q6copp *copp) {
struct q6adm *adm = dev_get_drvdata(dev->parent);
int ret = 0;
ret = q6adm_device_close(adm, copp, copp->afe_port, copp->copp_idx);
if (ret < 0) {
dev_err(adm->dev, "Failed to close copp %d\n", ret);
return ret;
}
kref_put(&copp->refcount,... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6adm.c |
static int q6adm_probe(struct apr_device *adev) {
struct device *dev = &adev->dev;
struct q6adm *adm;
adm = devm_kzalloc(dev, sizeof(*adm), GFP_KERNEL);
if (!adm)
return -ENOMEM;
adm->apr = adev;
dev_set_drvdata(dev, adm);
adm->dev = dev;
q6core_get_svc_api_info(adev->svc_id, &adm->ainfo);
mute... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6afe-dai.c | static int q6tdm_set_channel_map(struct snd_soc_dai *dai, unsigned int tx_num,
unsigned int *tx_slot, unsigned int rx_num,
unsigned int *rx_slot) {
struct q6afe_dai_data *dai_data = dev_get_drvdata(dai->dev);
struct q6afe_tdm_cfg *tdm = &dai_data->p... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6afe-dai.c | static void q6afe_dai_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct q6afe_dai_data *dai_data = dev_get_drvdata(dai->dev);
int rc;
if (!dai_data->is_port_started[dai->id])
return;
rc = q6afe_port_stop(dai_data->port[dai->id]);
if (rc < 0)
... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6afe-dai.c |
static int msm_dai_q6_dai_remove(struct snd_soc_dai *dai) {
struct q6afe_dai_data *dai_data = dev_get_drvdata(dai->dev);
q6afe_port_put(dai_data->port[dai->id]);
dai_data->port[dai->id] = NULL;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6afe.c |
static int afe_apr_send_pkt(struct q6afe *afe, struct apr_pkt *pkt,
struct q6afe_port *port, uint32_t rsp_opcode) {
wait_queue_head_t *wait;
struct aprv2_ibasic_rsp_result_t *result;
int ret;
mutex_lock(&afe->lock);
if (port) {
wait = &port->wait;
result = &port->result;
... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6afe.c |
static int q6afe_set_param(struct q6afe *afe, struct q6afe_port *port,
void *data, int param_id, int module_id, int psize,
int token) {
struct afe_svc_cmd_set_param *param;
struct afe_port_param_data_v2 *pdata;
struct apr_pkt *pkt;
int ret, pkt_size;
void... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6afe.c |
static int q6afe_port_set_lpass_clock(struct q6afe_port *port,
struct afe_clk_cfg *cfg) {
return q6afe_port_set_param_v2(port, cfg, AFE_PARAM_ID_LPAIF_CLK_CONFIG,
AFE_MODULE_AUDIO_DEV_INTERFACE, sizeof(*cfg));
} | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6afe.c |
static int q6afe_set_lpass_clock_v2(struct q6afe_port *port,
struct afe_clk_set *cfg) {
return q6afe_port_set_param(port, cfg, AFE_PARAM_ID_CLOCK_SET,
AFE_MODULE_CLOCK_SET, sizeof(*cfg));
} | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6afe.c |
static int q6afe_set_digital_codec_core_clock(struct q6afe_port *port,
struct afe_digital_clk_cfg *cfg) {
return q6afe_port_set_param_v2(port, cfg,
AFE_PARAM_ID_INT_DIGITAL_CDC_CLK_CONFIG,
AFE_MODULE_AUDIO... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6afe.c | int q6afe_port_start(struct q6afe_port *port) {
struct afe_port_cmd_device_start *start;
struct q6afe *afe = port->afe;
int port_id = port->id;
int ret, param_id = port->cfg_type;
struct apr_pkt *pkt;
int pkt_size;
void *p;
ret = q6afe_port_set_param_v2(port, &port->port_cfg, param_id,
... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6afe.c |
int q6afe_unvote_lpass_core_hw(struct device *dev, uint32_t hw_block_id,
uint32_t client_handle) {
struct q6afe *afe = dev_get_drvdata(dev->parent);
struct afe_cmd_remote_lpass_core_hw_devote_request *vote_cfg;
struct apr_pkt *pkt;
int ret = 0;
int pkt_size;
void *p;
pkt_s... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6apm-dai.c | static int q6apm_dai_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
struct snd_pcm_runtime *runtime = substream->runtime;
struct q6apm_dai_rtd *prtd = runtime->private_data;
if (prtd->state) {
q6apm_graph_stop(prtd->graph);
q6apm_unmap_memory_... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6apm-dai.c |
static int q6apm_dai_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct device_node *node = dev->of_node;
struct q6apm_dai_data *pdata;
struct of_phandle_args args;
int rc;
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata)
return -ENOMEM;
rc = of_parse_... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6apm-lpass-dais.c |
static int q6apm_lpass_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev);
struct q6apm_graph *graph;
int graph_id = dai->id;
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
g... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6apm.c |
static struct audioreach_graph *q6apm_get_audioreach_graph(struct q6apm *apm,
uint32_t graph_id) {
struct audioreach_graph_info *info;
struct audioreach_graph *graph;
int id;
mutex_lock(&apm->lock);
graph = idr_find(&apm->graph_idr, graph_id);
mut... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6apm.c |
int q6apm_map_memory_regions(struct q6apm_graph *graph, unsigned int dir,
phys_addr_t phys, size_t period_sz,
unsigned int periods) {
struct audioreach_graph_data *data;
struct audio_buffer *buf;
int cnt;
int rc;
if (dir == SNDRV_PCM_STREAM_PLAYBACK)... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6apm.c |
int q6apm_write_async(struct q6apm_graph *graph, uint32_t len, uint32_t msw_ts,
uint32_t lsw_ts, uint32_t wflags) {
struct apm_data_cmd_wr_sh_mem_ep_data_buffer_v2 *write_buffer;
struct audio_buffer *ab;
struct gpr_pkt *pkt;
int rc, iid;
iid = q6apm_graph_get_rx_shmem_module_iid(graph)... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6apm.c |
int q6apm_graph_start(struct q6apm_graph *graph) {
struct audioreach_graph *ar_graph = graph->ar_graph;
int ret = 0;
if (ar_graph->start_count == 0)
ret = audioreach_graph_mgmt_cmd(ar_graph, APM_CMD_GRAPH_START);
ar_graph->start_count++;
return ret;
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6apm.c |
int q6apm_graph_flush(struct q6apm_graph *graph) {
return audioreach_graph_mgmt_cmd(graph->ar_graph, APM_CMD_GRAPH_FLUSH);
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6apm.c |
static int apm_probe(gpr_device_t *gdev) {
struct device *dev = &gdev->dev;
struct q6apm *apm;
int ret;
apm = devm_kzalloc(dev, sizeof(*apm), GFP_KERNEL);
if (!apm)
return -ENOMEM;
dev_set_drvdata(dev, apm);
mutex_init(&apm->lock);
apm->dev = dev;
apm->gdev = gdev;
init_waitqueue_head(&apm->... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm-dai.c |
static void event_handler(uint32_t opcode, uint32_t token, void *payload,
void *priv) {
struct q6asm_dai_rtd *prtd = priv;
struct snd_pcm_substream *substream = prtd->substream;
switch (opcode) {
case ASM_CLIENT_EVENT_CMD_RUN_DONE:
if (substream->stream == SNDRV_PCM_STREAM_PLAYBA... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm-dai.c |
static int q6asm_dai_compr_free(struct snd_soc_component *component,
struct snd_compr_stream *stream) {
struct snd_compr_runtime *runtime = stream->runtime;
struct q6asm_dai_rtd *prtd = runtime->private_data;
struct snd_soc_pcm_runtime *rtd = stream->private_data;
if (prtd->aud... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm-dai.c |
static int q6asm_dai_compr_get_codec_caps(struct snd_soc_component *component,
struct snd_compr_stream *stream,
struct snd_compr_codec_caps *codec) {
switch (codec->codec) {
case SND_AUDIOCODEC_MP3:
*codec = q6asm_compr_caps;
... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm-dai.c |
static int q6asm_dai_pcm_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd) {
struct snd_pcm *pcm = rtd->pcm;
size_t size = q6asm_dai_hardware_playback.buffer_bytes_max;
return snd_pcm_set_fixed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, component->dev,
... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm.c |
static inline void q6asm_add_hdr(struct audio_client *ac, struct apr_hdr *hdr,
uint32_t pkt_size, bool cmd_flg,
uint32_t stream_id) {
hdr->hdr_field = APR_SEQ_CMD_HDR_FIELD;
hdr->src_port = ((ac->session << 8) & 0xFF00) | (stream_id);
hdr->dest_po... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm.c |
static int q6asm_apr_send_session_pkt(struct q6asm *a, struct audio_client *ac,
struct apr_pkt *pkt,
uint32_t rsp_opcode) {
struct apr_hdr *hdr = &pkt->hdr;
int rc;
mutex_lock(&ac->cmd_lock);
ac->result.opcode = 0;
ac->result.status... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm.c | int q6asm_map_memory_regions(unsigned int dir, struct audio_client *ac,
phys_addr_t phys, size_t period_sz,
unsigned int periods) {
struct audio_buffer *buf;
unsigned long flags;
int cnt;
int rc;
spin_lock_irqsave(&ac->lock, flags);
if (ac->port[dir... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm.c |
static void q6asm_audio_client_release(struct kref *ref) {
struct audio_client *ac;
struct q6asm *a;
unsigned long flags;
ac = container_of(ref, struct audio_client, refcount);
a = ac->q6asm;
spin_lock_irqsave(&a->slock, flags);
a->session[ac->session] = NULL;
spin_unlock_irqrestore(&a->slock, flags)... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm.c | int q6asm_run(struct audio_client *ac, uint32_t stream_id, uint32_t flags,
uint32_t msw_ts, uint32_t lsw_ts) {
return __q6asm_run(ac, stream_id, flags, msw_ts, lsw_ts, true);
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm.c |
int q6asm_stream_remove_initial_silence(struct audio_client *ac,
uint32_t stream_id,
uint32_t initial_samples) {
return q6asm_stream_remove_silence(
ac, stream_id, ASM_DATA_CMD_REMOVE_INITIAL_SILENCE, initial_samples);
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm.c | int q6asm_enc_cfg_blk_pcm_format_support(struct audio_client *ac,
uint32_t stream_id, uint32_t rate,
uint32_t channels,
uint16_t bits_per_sample) {
struct asm_multi_channel_pcm_enc_cfg_v2 *enc_cf... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm.c | int q6asm_open_read(struct audio_client *ac, uint32_t stream_id,
uint32_t format, uint16_t bits_per_sample) {
return __q6asm_open_read(ac, stream_id, format, bits_per_sample);
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm.c | int q6asm_write_async(struct audio_client *ac, uint32_t stream_id, uint32_t len,
uint32_t msw_ts, uint32_t lsw_ts, uint32_t wflags) {
struct asm_data_cmd_write_v2 *write;
struct audio_port_data *port;
struct audio_buffer *ab;
unsigned long flags;
struct apr_pkt *pkt;
int pkt_size;
in... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm.c | int q6asm_cmd(struct audio_client *ac, uint32_t stream_id, int cmd) {
return __q6asm_cmd(ac, stream_id, cmd, true);
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm.c | int q6asm_cmd_nowait(struct audio_client *ac, uint32_t stream_id, int cmd) {
return __q6asm_cmd(ac, stream_id, cmd, false);
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6asm.c |
static int q6asm_probe(struct apr_device *adev) {
struct device *dev = &adev->dev;
struct q6asm *q6asm;
q6asm = devm_kzalloc(dev, sizeof(*q6asm), GFP_KERNEL);
if (!q6asm)
return -ENOMEM;
q6core_get_svc_api_info(adev->svc_id, &q6asm->ainfo);
q6asm->dev = dev;
q6asm->adev = adev;
init_waitqueue_he... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6core.c | static bool __q6core_is_adsp_ready(struct q6core *core) {
struct apr_device *adev = core->adev;
struct apr_pkt pkt;
int rc;
core->get_state_supported = false;
pkt.hdr.hdr_field = APR_HDR_FIELD(APR_MSG_TYPE_SEQ_CMD,
APR_HDR_LEN(APR_HDR_SIZE), APR_PKT_VER);
pkt.hdr.pkt_si... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6core.c |
static int q6core_exit(struct apr_device *adev) {
struct q6core *core = dev_get_drvdata(&adev->dev);
if (core->fwk_version_supported)
kfree(core->fwk_version);
if (core->get_version_supported)
kfree(core->svc_version);
g_core = NULL;
kfree(core);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6dsp-common.c |
int q6dsp_map_channels(u8 ch_map[PCM_MAX_NUM_CHANNEL], int ch) {
memset(ch_map, 0, PCM_MAX_NUM_CHANNEL);
switch (ch) {
case 1:
ch_map[0] = PCM_CHANNEL_FC;
break;
case 2:
ch_map[0] = PCM_CHANNEL_FL;
ch_map[1] = PCM_CHANNEL_FR;
break;
case 3:
ch_map[0] = PCM_CHANNEL_FL;
ch_map[1] =... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c |
static int clk_q6dsp_prepare(struct clk_hw *hw) {
struct q6dsp_clk *clk = to_q6dsp_clk(hw);
struct q6dsp_cc *cc = dev_get_drvdata(clk->dev);
return cc->desc->lpass_set_clk(clk->dev, clk->q6dsp_clk_id, clk->attributes,
Q6DSP_LPASS_CLK_ROOT_DEFAULT, clk->rate);
} | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c |
static int clk_q6dsp_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate) {
struct q6dsp_clk *clk = to_q6dsp_clk(hw);
clk->rate = rate;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c |
static int clk_vote_q6dsp_block(struct clk_hw *hw) {
struct q6dsp_clk *clk = to_q6dsp_clk(hw);
struct q6dsp_cc *cc = dev_get_drvdata(clk->dev);
return cc->desc->lpass_vote_clk(clk->dev, clk->q6dsp_clk_id,
clk_hw_get_name(&clk->hw), &clk->handle);
} | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c |
int q6dsp_clock_dev_probe(struct platform_device *pdev) {
struct q6dsp_cc *cc;
struct device *dev = &pdev->dev;
const struct q6dsp_clk_init *q6dsp_clks;
const struct q6dsp_clk_desc *desc;
int i, ret;
cc = devm_kzalloc(dev, sizeof(*cc), GFP_KERNEL);
if (!cc)
return -ENOMEM;
desc = of_device_get_ma... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c |
int q6dsp_audio_ports_of_xlate_dai_name(struct snd_soc_component *component,
const struct of_phandle_args *args,
const char **dai_name) {
int id = args->args[0];
int ret = -EINVAL;
int i;
for (i = 0; i < ARRAY_SIZE(q6dsp_audio_fe_... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6prm.c |
static int q6prm_send_cmd_sync(struct q6prm *prm, struct gpr_pkt *pkt,
uint32_t rsp_opcode) {
return audioreach_send_cmd_sync(prm->dev, prm->gdev, &prm->result, &prm->lock,
NULL, &prm->wait, pkt, rsp_opcode);
} | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6prm.c |
static int prm_probe(gpr_device_t *gdev) {
struct device *dev = &gdev->dev;
struct q6prm *cc;
cc = devm_kzalloc(dev, sizeof(*cc), GFP_KERNEL);
if (!cc)
return -ENOMEM;
cc->dev = dev;
cc->gdev = gdev;
mutex_init(&cc->lock);
init_waitqueue_head(&cc->wait);
dev_set_drvdata(dev, cc);
return devm... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6routing.c | void q6routing_stream_close(int fedai_id, int stream_type) {
struct session_data *session;
int idx;
session = get_session_from_id(routing_data, fedai_id);
if (!session)
return;
for_each_set_bit(idx, &session->copp_map, MAX_COPPS_PER_PORT) {
if (session->copps[idx]) {
q6adm_close(routing_data->... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6routing.c |
static int msm_routing_put_audio_mixer(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
struct snd_soc_component *c = snd_soc_dapm_to_component(dapm);
struct msm_routing_data *dat... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/q6routing.c |
static int q6pcm_routing_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
routing_data = kzalloc(sizeof(*routing_data), GFP_KERNEL);
if (!routing_data)
return -ENOMEM;
routing_data->dev = dev;
mutex_init(&routing_data->lock);
dev_set_drvdata(dev, routing_data);
return devm_s... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/topology.c |
static int
audioreach_widget_dma_module_load(struct audioreach_module *mod,
struct snd_soc_tplg_vendor_array *mod_array) {
struct snd_soc_tplg_vendor_value_elem *mod_elem;
int tkn_count = 0;
mod_elem = mod_array->value;
while (tkn_count <= (le32_to_cpu(mod_array->num_elems) ... | [
0,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/topology.c | static int audioreach_route_load(struct snd_soc_component *scomp, int index,
struct snd_soc_dapm_route *route) {
struct audioreach_module *src_module, *sink_module;
struct snd_ar_control *control;
struct snd_soc_dapm_widget *w;
int i;
src_module = audioreach_find_module(scomp... | [
1,
0
] |
Linux Kernel | sound/soc/qcom/qdsp6/topology.c |
static int audioreach_put_audio_mixer(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
str... | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.