Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | sound/soc/codecs/wm9705.c | static int wm9705_soc_suspend(struct snd_soc_component *component) {
regcache_cache_bypass(component->regmap, true);
snd_soc_component_write(component, AC97_POWERDOWN, 0xffff);
regcache_cache_bypass(component->regmap, false);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm9705.c |
static int wm9705_probe(struct platform_device *pdev) {
struct wm9705_priv *wm9705;
wm9705 = devm_kzalloc(&pdev->dev, sizeof(*wm9705), GFP_KERNEL);
if (wm9705 == NULL)
return -ENOMEM;
wm9705->mfd_pdata = dev_get_platdata(&pdev->dev);
platform_set_drvdata(pdev, wm9705);
return devm_snd_soc_register_c... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wm9712.c | static int wm9712_hp_mixer_put(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 *component = snd_soc_dapm_to_component(dapm);
struct wm9712_priv *wm9712 = snd_soc_... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wm9712.c | static int wm9712_soc_probe(struct snd_soc_component *component) {
struct wm9712_priv *wm9712 = snd_soc_component_get_drvdata(component);
struct regmap *regmap;
if (wm9712->mfd_pdata) {
wm9712->ac97 = wm9712->mfd_pdata->ac97;
regmap = wm9712->mfd_pdata->regmap;
} else if (IS_ENABLED(CONFIG_SND_SOC_AC97... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm9712.c |
static int wm9712_probe(struct platform_device *pdev) {
struct wm9712_priv *wm9712;
wm9712 = devm_kzalloc(&pdev->dev, sizeof(*wm9712), GFP_KERNEL);
if (wm9712 == NULL)
return -ENOMEM;
mutex_init(&wm9712->lock);
wm9712->mfd_pdata = dev_get_platdata(&pdev->dev);
platform_set_drvdata(pdev, wm9712);
... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wm9713.c | static int wm9713_voice_shutdown(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event) {
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
if (WARN_ON(event != SND_SOC_DAPM_PRE_PMD))
return -EINVAL;
snd_soc_component_update_bits(com... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm9713.c |
static int wm9713_hp_mixer_get(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 *component = snd_soc_dapm_to_component(dapm);
struct wm9713_priv *wm9713 = snd_soc... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wm9713.c |
static bool wm9713_readable_reg(struct device *dev, unsigned int reg) {
switch (reg) {
case AC97_RESET ... AC97_PCM_SURR_DAC_RATE:
case AC97_PCM_LR_ADC_RATE:
case AC97_CENTER_LFE_MASTER:
case AC97_SPDIF ... AC97_LINE1_LEVEL:
case AC97_GPIO_CFG ... 0x5c:
case AC97_CODEC_CLASS_REV ... AC97_PCI_SID:
case ... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm9713.c | static void pll_factors(struct snd_soc_component *component,
struct _pll_div *pll_div, unsigned int source) {
u64 Kpart;
unsigned int K, Ndiv, Nmod, target;
target = 98304000;
/* If the input frequency is over 14.4MHz then scale it down. */
if (source > 14400000) {
source >>= 1;
... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wm9713.c | static int wm9713_set_dai_tristate(struct snd_soc_dai *codec_dai,
int tristate) {
struct snd_soc_component *component = codec_dai->component;
if (tristate)
snd_soc_component_update_bits(component, AC97_CENTER_LFE_MASTER, 0x6000,
0x0000);
r... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c |
static int wm_coeff_tlv_put(struct snd_kcontrol *kctl,
const unsigned int __user *bytes,
unsigned int size) {
struct soc_bytes_ext *bytes_ext = (struct soc_bytes_ext *)kctl->private_value;
struct wm_coeff_ctl *ctl = bytes_ext_to_ctl(bytes_ext);
struct cs_ds... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c | static int wm_coeff_put_acked(struct snd_kcontrol *kctl,
struct snd_ctl_elem_value *ucontrol) {
struct soc_bytes_ext *bytes_ext = (struct soc_bytes_ext *)kctl->private_value;
struct wm_coeff_ctl *ctl = bytes_ext_to_ctl(bytes_ext);
struct cs_dsp_coeff_ctl *cs_ctl = ctl->cs_ctl;
unsi... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c |
static void wm_adsp_control_remove(struct cs_dsp_coeff_ctl *cs_ctl) {
struct wm_coeff_ctl *ctl = cs_ctl->priv;
cancel_work_sync(&ctl->work);
kfree(ctl->name);
kfree(ctl);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c |
int wm_adsp1_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol,
int event) {
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
struct wm_adsp *dsps = snd_soc_component_get_drvdata(component);
struct wm_adsp *dsp = &dsps[w->shift];
int ret = 0;
char ... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c |
int wm_adsp2_set_dspclk(struct snd_soc_dapm_widget *w, unsigned int freq) {
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
struct wm_adsp *dsps = snd_soc_component_get_drvdata(component);
struct wm_adsp *dsp = &dsps[w->shift];
return cs_dsp_set_dspclk(&dsp->cs_dsp, freq);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c |
static void wm_adsp_boot_work(struct work_struct *work) {
struct wm_adsp *dsp = container_of(work, struct wm_adsp, boot_work);
int ret = 0;
char *wmfw_filename = NULL;
const struct firmware *wmfw_firmware = NULL;
char *coeff_filename = NULL;
const struct firmware *coeff_firmware = NULL;
ret = wm_adsp_re... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c |
static int wm_adsp_pre_run(struct cs_dsp *cs_dsp) {
struct wm_adsp *dsp = container_of(cs_dsp, struct wm_adsp, cs_dsp);
if (!dsp->pre_run)
return 0;
return (*dsp->pre_run)(dsp);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c |
static int wm_adsp_event_post_run(struct cs_dsp *cs_dsp) {
struct wm_adsp *dsp = container_of(cs_dsp, struct wm_adsp, cs_dsp);
if (wm_adsp_fw[dsp->fw].num_caps != 0)
return wm_adsp_buffer_init(dsp);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c |
int wm_halo_init(struct wm_adsp *dsp) {
int ret;
INIT_WORK(&dsp->boot_work, wm_adsp_boot_work);
dsp->sys_config_size = sizeof(struct wm_halo_system_config_xm_hdr);
dsp->cs_dsp.client_ops = &wm_adsp2_client_ops;
ret = cs_dsp_halo_init(&dsp->cs_dsp);
if (ret)
return ret;
return wm_adsp_common_init(... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c |
static inline int wm_adsp_compr_attached(struct wm_adsp_compr *compr) {
return compr->buf != NULL;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c |
static inline int wm_adsp_buffer_write(struct wm_adsp_compr_buf *buf,
unsigned int field_offset, u32 data) {
return cs_dsp_write_data_word(&buf->dsp->cs_dsp, buf->host_buf_mem_type,
buf->host_buf_ptr + field_offset, data);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c |
static int wm_adsp_buffer_populate(struct wm_adsp_compr_buf *buf) {
const struct wm_adsp_fw_caps *caps = wm_adsp_fw[buf->dsp->fw].caps;
struct wm_adsp_buffer_region *region;
u32 offset = 0;
int i, ret;
buf->regions = kcalloc(caps->num_regions, sizeof(*buf->regions), GFP_KERNEL);
if (!buf->regions)
ret... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c |
static void wm_adsp_buffer_clear(struct wm_adsp_compr_buf *buf) {
buf->irq_count = 0xFFFFFFFF;
buf->read_index = -1;
buf->avail = 0;
} | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c |
static int wm_adsp_buffer_parse_legacy(struct wm_adsp *dsp) {
struct cs_dsp_alg_region *alg_region;
struct wm_adsp_compr_buf *buf;
u32 xmalg, addr, magic;
int i, ret;
alg_region =
cs_dsp_find_alg_region(&dsp->cs_dsp, WMFW_ADSP2_XM, dsp->cs_dsp.fw_id);
if (!alg_region) {
adsp_err(dsp, "No algorit... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c | static int wm_adsp_buffer_parse_coeff(struct cs_dsp_coeff_ctl *cs_ctl) {
struct wm_adsp_host_buf_coeff_v1 coeff_v1;
struct wm_adsp_compr_buf *buf;
struct wm_adsp *dsp = container_of(cs_ctl->dsp, struct wm_adsp, cs_dsp);
unsigned int version = 0;
int ret, i;
for (i = 0; i < 5; ++i) {
ret = cs_dsp_coeff_... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wm_adsp.c |
static int wm_adsp_compr_read(struct wm_adsp_compr *compr, char __user *buf,
size_t count) {
struct wm_adsp *dsp = compr->dsp;
int ntotal = 0;
int nwords, nbytes;
compr_dbg(compr, "Requested read of %zu bytes\n", count);
if (dsp->fatal_error || !compr->buf || compr->buf->error... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wm_hubs.c |
irqreturn_t wm_hubs_dcs_done(int irq, void *data) {
struct wm_hubs_data *hubs = data;
complete(&hubs->dcs_done);
return IRQ_HANDLED;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm_hubs.c |
static void wm_hubs_dcs_cache_set(struct snd_soc_component *component,
u16 dcs_cfg) {
struct wm_hubs_data *hubs = snd_soc_component_get_drvdata(component);
struct wm_hubs_dcs_cache *cache;
if (hubs->no_cache_dac_hp_direct)
return;
cache = devm_kzalloc(component->dev, siz... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wm_hubs.c | static int wm8993_put_dc_servo(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
struct wm_hubs_data *hubs = snd_soc_component_get_drvdata(component);
int ret;
ret = snd_soc_put_volsw(... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wm_hubs.c |
static int micbias_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event) {
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
struct wm_hubs_data *hubs = snd_soc_component_get_drvdata(component);
switch (w->shift) {
case WM8993_MICB1_ENA... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm_hubs.c |
void wm_hubs_update_class_w(struct snd_soc_component *component) {
struct wm_hubs_data *hubs = snd_soc_component_get_drvdata(component);
int enable = WM8993_CP_DYN_V | WM8993_CP_DYN_FREQ;
if (!wm_hubs_dac_hp_direct(component))
enable = false;
if (hubs->check_class_w_digital && !hubs->check_class_w_digita... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm_hubs.c |
static int class_w_put_volsw(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *component =
snd_soc_dapm_kcontrol_component(kcontrol);
int ret;
ret = snd_soc_dapm_put_volsw(kcontrol, ucontrol);
wm_hubs_update_class_w(component);
... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wm_hubs.c |
int wm_hubs_add_analogue_routes(struct snd_soc_component *component,
int lineout1_diff, int lineout2_diff) {
struct wm_hubs_data *hubs = snd_soc_component_get_drvdata(component);
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
hubs->component = componen... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wsa881x.c |
static bool wsa881x_volatile_register(struct device *dev, unsigned int reg) {
switch (reg) {
case WSA881X_CHIP_ID0:
case WSA881X_CHIP_ID1:
case WSA881X_CHIP_ID2:
case WSA881X_CHIP_ID3:
case WSA881X_BUS_ID:
case WSA881X_TEMP_MSB:
case WSA881X_TEMP_LSB:
case WSA881X_SDM_PDM9_LSB:
case WSA881X_SDM_PDM... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wsa881x.c |
static int wsa881x_get_port(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol);
struct wsa881x_priv *data = snd_soc_component_get_drvdata(comp);
struct soc_mixer_control *mixer =
(struct soc... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wsa881x.c | static int wsa881x_set_port(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol);
struct wsa881x_priv *data = snd_soc_component_get_drvdata(comp);
struct soc_mixer_control *mixer =
(struct soc_... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wsa881x.c |
static int wsa881x_spkr_pa_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event) {
struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm);
struct wsa881x_priv *wsa881x = snd_soc_component_get_drvdata(comp);
switch (event) {
case SND_SOC_DA... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wsa881x.c |
static int wsa881x_bus_config(struct sdw_slave *slave,
struct sdw_bus_params *params) {
sdw_write(slave, SWRS_SCP_HOST_CLK_DIV2_CTL_BANK(params->next_bank), 0x01);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wsa883x.c |
static int wsa883x_port_prep(struct sdw_slave *slave,
struct sdw_prepare_ch *prepare_ch,
enum sdw_port_prep_ops state) {
struct wsa883x_priv *wsa883x = dev_get_drvdata(&slave->dev);
if (state == SDW_OPS_PORT_POST_PREP)
wsa883x->port_prepared[prepare_ch... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/wsa883x.c |
static int wsa_dev_mode_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
struct wsa883x_priv *wsa883x = snd_soc_component_get_drvdata(component);
ucontrol->value.enumerated.item[0] = ... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wsa883x.c |
static int wsa_dev_mode_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
struct wsa883x_priv *wsa883x = snd_soc_component_get_drvdata(component);
if (wsa883x->dev_mode == ucontrol->va... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wsa883x.c |
static int wsa883x_hw_free(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct wsa883x_priv *wsa883x = dev_get_drvdata(dai->dev);
sdw_stream_remove_slave(wsa883x->slave, wsa883x->sruntime);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/wsa883x.c |
static int wsa883x_set_sdw_stream(struct snd_soc_dai *dai, void *stream,
int direction) {
struct wsa883x_priv *wsa883x = dev_get_drvdata(dai->dev);
wsa883x->sruntime = stream;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/zl38060.c |
static int chip_direction_output(struct gpio_chip *c, unsigned int offset,
int val) {
struct regmap *regmap = gpiochip_get_data(c);
unsigned int mask = BIT(offset);
chip_gpio_set(c, offset, val);
return regmap_update_bits(regmap, REG_GPIO_DIR, mask, mask);
} | [
1,
0
] |
Linux Kernel | sound/soc/codecs/zl38060.c |
static int zl38_bus_read(void *context, const void *reg_buf, size_t reg_size,
void *val_buf, size_t val_size) {
struct spi_device *spi = context;
const u8 *reg_buf8 = reg_buf;
size_t len = 0;
u8 offs, page;
u8 txbuf[4];
if (reg_size != 2 || val_size > ZL38_MAX_RAW_XFER)
return... | [
1,
0
] |
Linux Kernel | sound/soc/dwc/dwc-i2s.c |
static inline void i2s_disable_channels(struct dw_i2s_dev *dev, u32 stream) {
u32 i = 0;
if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
for (i = 0; i < 4; i++)
i2s_write_reg(dev->i2s_base, TER(i), 0);
} else {
for (i = 0; i < 4; i++)
i2s_write_reg(dev->i2s_base, RER(i), 0);
}
} | [
0,
0
] |
Linux Kernel | sound/soc/dwc/dwc-i2s.c | static irqreturn_t i2s_irq_handler(int irq, void *dev_id) {
struct dw_i2s_dev *dev = dev_id;
bool irq_valid = false;
u32 isr[4];
int i;
for (i = 0; i < 4; i++)
isr[i] = i2s_read_reg(dev->i2s_base, ISR(i));
i2s_clear_irqs(dev, SNDRV_PCM_STREAM_PLAYBACK);
i2s_clear_irqs(dev, SNDRV_PCM_STREAM_CAPTURE);... | [
0,
0
] |
Linux Kernel | sound/soc/dwc/dwc-i2s.c |
static int dw_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) {
struct dw_i2s_dev *dev = snd_soc_dai_get_drvdata(cpu_dai);
int ret = 0;
switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
case SND_SOC_DAIFMT_BC_FC:
if (dev->capability & DW_I2S_SLAVE)
ret = 0;
else
ret = -EINVAL;... | [
0,
0
] |
Linux Kernel | sound/soc/dwc/dwc-i2s.c | static int dw_i2s_runtime_suspend(struct device *dev) {
struct dw_i2s_dev *dw_dev = dev_get_drvdata(dev);
if (dw_dev->capability & DW_I2S_MASTER)
clk_disable(dw_dev->clk);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/dwc/dwc-pcm.c |
void dw_pcm_pop_rx(struct dw_i2s_dev *dev) { dw_pcm_transfer(dev, false); } | [
0,
0
] |
Linux Kernel | sound/soc/dwc/dwc-pcm.c |
static int dw_pcm_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
synchronize_rcu();
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/dwc/dwc-pcm.c |
static int dw_pcm_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd) {
size_t size = dw_pcm_hardware.buffer_bytes_max;
snd_pcm_set_managed_buffer_all(rtd->pcm, SNDRV_DMA_TYPE_CONTINUOUS, NULL,
size, size);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/dwc/dwc-pcm.c |
int dw_pcm_register(struct platform_device *pdev) {
return devm_snd_soc_register_component(&pdev->dev, &dw_pcm_component, NULL,
0);
} | [
0,
0
] |
Linux Kernel | sound/soc/fsl/efika-audio-fabric.c |
static __init int efika_fabric_init(void) {
struct platform_device *pdev;
int rc;
if (!of_machine_is_compatible("bplan,efika"))
return -ENODEV;
pdev = platform_device_alloc("soc-audio", 1);
if (!pdev) {
pr_err("efika_fabric_init: platform_device_alloc() failed\n");
return -ENODEV;
}
platfo... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_asrc.c | static int fsl_asrc_request_pair(int channels, struct fsl_asrc_pair *pair) {
enum asrc_pair_index index = ASRC_INVALID_PAIR;
struct fsl_asrc *asrc = pair->asrc;
struct device *dev = &asrc->pdev->dev;
unsigned long lock_flags;
int i, ret = 0;
spin_lock_irqsave(&asrc->lock, lock_flags);
for (i = ASRC_PAIR... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_asrc.c | static void fsl_asrc_set_watermarks(struct fsl_asrc_pair *pair, u32 in,
u32 out) {
struct fsl_asrc *asrc = pair->asrc;
enum asrc_pair_index index = pair->index;
regmap_update_bits(asrc->regmap, REG_ASRMCR(index),
ASRMCRi_EXTTHRSHi_MASK | ASRMCRi_INFIFO_THR... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_asrc.c | static struct dma_chan *fsl_asrc_get_dma_channel(struct fsl_asrc_pair *pair,
bool dir) {
struct fsl_asrc *asrc = pair->asrc;
enum asrc_pair_index index = pair->index;
char name[4];
sprintf(name, "%cx%c", dir == IN ? 'r' : 't', index + 'a');
return dma_request... | [
1,
0
] |
Linux Kernel | sound/soc/fsl/fsl_asrc.c | static int fsl_asrc_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct fsl_asrc *asrc = snd_soc_dai_get_drvdata(dai);
struct fsl_asrc_priv *asrc_priv = asrc->private;
if (asrc_priv->soc->channel_bits == 3)
snd_pcm_hw_constraint_step(substream->r... | [
1,
0
] |
Linux Kernel | sound/soc/fsl/fsl_asrc.c |
static int fsl_asrc_dai_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai) {
struct fsl_asrc *asrc = snd_soc_dai_get_drvdata(dai);
struct fsl_asrc_priv *asrc_priv = asrc->private;
struct snd... | [
1,
0
] |
Linux Kernel | sound/soc/fsl/fsl_asrc.c |
static int fsl_asrc_dai_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai) {
struct snd_pcm_runtime *runtime = substream->runtime;
struct fsl_asrc_pair *pair = runtime->private_data;
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGG... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_asrc.c |
static bool fsl_asrc_volatile_reg(struct device *dev, unsigned int reg) {
switch (reg) {
case REG_ASRSTR:
case REG_ASRDIA:
case REG_ASRDIB:
case REG_ASRDIC:
case REG_ASRDOA:
case REG_ASRDOB:
case REG_ASRDOC:
case REG_ASRFSTA:
case REG_ASRFSTB:
case REG_ASRFSTC:
case REG_ASRCFG:
return true;... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_asrc.c |
static bool fsl_asrc_writeable_reg(struct device *dev, unsigned int reg) {
switch (reg) {
case REG_ASRCTR:
case REG_ASRIER:
case REG_ASRCNCR:
case REG_ASRCFG:
case REG_ASRCSR:
case REG_ASRCDR1:
case REG_ASRCDR2:
case REG_ASRSTR:
case REG_ASRPM1:
case REG_ASRPM2:
case REG_ASRPM3:
case REG_ASRP... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_asrc.c | static int fsl_asrc_init(struct fsl_asrc *asrc) {
unsigned long ipg_rate;
regmap_write(asrc->regmap, REG_ASRCTR, ASRCTR_ASRCEN);
/* Disable interrupt by default */
regmap_write(asrc->regmap, REG_ASRIER, 0x0);
/* Apply recommended settings for parameters from Reference Manual */
regmap_write(asrc->regmap,... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_asrc.c |
static int fsl_asrc_remove(struct platform_device *pdev) {
pm_runtime_disable(&pdev->dev);
if (!pm_runtime_status_suspended(&pdev->dev))
fsl_asrc_runtime_suspend(&pdev->dev);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_asrc.c |
static int fsl_asrc_runtime_suspend(struct device *dev) {
struct fsl_asrc *asrc = dev_get_drvdata(dev);
struct fsl_asrc_priv *asrc_priv = asrc->private;
int i;
regmap_read(asrc->regmap, REG_ASRCFG, &asrc_priv->regcache_cfg);
regcache_cache_only(asrc->regmap, true);
for (i = 0; i < ASRC_CLK_MAX_NUM; i++)... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_asrc_dma.c |
static void fsl_asrc_dma_complete(void *arg) {
struct snd_pcm_substream *substream = arg;
struct snd_pcm_runtime *runtime = substream->runtime;
struct fsl_asrc_pair *pair = runtime->private_data;
pair->pos += snd_pcm_lib_period_bytes(substream);
if (pair->pos >= snd_pcm_lib_buffer_bytes(substream))
pair... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_asrc_dma.c | static int fsl_asrc_dma_hw_free(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
struct snd_pcm_runtime *runtime = substream->runtime;
struct fsl_asrc_pair *pair = runtime->private_data;
u8 dir =... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_aud2htx.c |
static int fsl_aud2htx_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai) {
struct fsl_aud2htx *aud2htx = snd_soc_dai_get_drvdata(dai);
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_aud2htx.c | static int fsl_aud2htx_dai_probe(struct snd_soc_dai *cpu_dai) {
struct fsl_aud2htx *aud2htx = dev_get_drvdata(cpu_dai->dev);
regmap_update_bits(aud2htx->regmap, AUD2HTX_CTRL_EXT, AUD2HTX_CTRE_DT_MASK,
0);
/* Disable interrupts*/
regmap_update_bits(
aud2htx->regmap, AUD2HTX_IRQ_MASK,... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_aud2htx.c |
static int fsl_aud2htx_remove(struct platform_device *pdev) {
pm_runtime_disable(&pdev->dev);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_aud2htx.c |
static int __maybe_unused fsl_aud2htx_runtime_suspend(struct device *dev) {
struct fsl_aud2htx *aud2htx = dev_get_drvdata(dev);
regcache_cache_only(aud2htx->regmap, true);
clk_disable_unprepare(aud2htx->bus_clk);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_aud2htx.c |
static int __maybe_unused fsl_aud2htx_runtime_resume(struct device *dev) {
struct fsl_aud2htx *aud2htx = dev_get_drvdata(dev);
int ret;
ret = clk_prepare_enable(aud2htx->bus_clk);
if (ret)
return ret;
regcache_cache_only(aud2htx->regmap, false);
regcache_mark_dirty(aud2htx->regmap);
regcache_sync(a... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_audmix.c | static int fsl_audmix_state_trans(struct snd_soc_component *comp,
unsigned int *mask, unsigned int *ctr,
const struct fsl_audmix_state prm) {
struct fsl_audmix *priv = snd_soc_component_get_drvdata(comp);
if ((priv->tdms & prm.tdms) != prm.tdms) {... | [
1,
0
] |
Linux Kernel | sound/soc/fsl/fsl_audmix.c | static int fsl_audmix_runtime_resume(struct device *dev) {
struct fsl_audmix *priv = dev_get_drvdata(dev);
int ret;
ret = clk_prepare_enable(priv->ipg_clk);
if (ret) {
dev_err(dev, "Failed to enable IPG clock: %d\n", ret);
return ret;
}
regcache_cache_only(priv->regmap, false);
regcache_mark_dir... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_dma.c | static int fsl_dma_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
struct snd_pcm_runtime *runtime = substream->runtime;
struct fsl_dma_private *dma_private = runtime->private_data;
struct device *dev = component->dev;
struct dma_object *dma =
con... | [
1,
0
] |
Linux Kernel | sound/soc/fsl/fsl_dma.c | static struct device_node *find_ssi_node(struct device_node *dma_channel_np) {
struct device_node *ssi_np, *np;
for_each_compatible_node(ssi_np, NULL, "fsl,mpc8610-ssi") {
np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0);
of_node_put(np);
if (np == dma_channel_np)
return ssi_np;
np = of... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_dma.h | static inline u32 CCSR_DMA_ECLNDAR_ADDR(u64 x) { return (x >> 32) & 0xf; }
#define CCSR_DMA_CLNDAR_ADDR(x) ((x) & 0xFFFFFFFE)
#define CCSR_DMA_CLNDAR_EOSIE 0x00000008
#define CCSR_DMA_ATR_PBATMU 0x20000000
#define CCSR_DMA_ATR_TFLOWLVL_0 0x00000000
#define CCSR_DMA_ATR_TFLOWLVL_1 0x06000000
#define CCSR_DMA_ATR_TFLOW... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_easrc.c |
static int fsl_easrc_iec958_get_bits(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
struct fsl_asrc *easrc = snd_soc_component_get_drvdata(comp);
struct fsl_easrc_priv *easrc_priv = easrc->pr... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_easrc.c |
static int fsl_easrc_get_reg(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct soc_mreg_control *mc =
(struct soc_mreg_control *)kcontrol->private_value;
unsigned int regval;
regval... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_easrc.c |
static int fsl_easrc_set_reg(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct soc_mreg_control *mc =
(struct soc_mreg_control *)kcontrol->private_value;
unsigned int regval = ucontrol... | [
1,
0
] |
Linux Kernel | sound/soc/fsl/fsl_easrc.c | static int fsl_easrc_normalize_filter(struct fsl_asrc *easrc, u64 *infilter,
u64 *outfilter, int shift) {
struct device *dev = &easrc->pdev->dev;
u64 coef = *infilter;
s64 exp = (coef & 0x7ff0000000000000ll) >> 52;
u64 outcoef;
if (exp == 0 || exp == 0x7ff) {
*outfil... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_easrc.c | static int fsl_easrc_request_context(int channels, struct fsl_asrc_pair *ctx) {
enum asrc_pair_index index = ASRC_INVALID_PAIR;
struct fsl_asrc *easrc = ctx->asrc;
struct device *dev;
unsigned long lock_flags;
int ret = 0;
int i;
dev = &easrc->pdev->dev;
spin_lock_irqsave(&easrc->lock, lock_flags);
... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_easrc.c |
static int fsl_easrc_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
return snd_pcm_hw_constraint_list(
substream->runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &easrc_rate_constraints);
} | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_easrc.c |
static int fsl_easrc_get_fifo_addr(u8 dir, enum asrc_pair_index index) {
return REG_EASRC_FIFO(dir, index);
} | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_esai.c |
static int fsl_esai_set_dai_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask,
u32 rx_mask, int slots, int slot_width) {
struct fsl_esai *esai_priv = snd_soc_dai_get_drvdata(dai);
regmap_update_bits(esai_priv->regmap, REG_ESAI_TCCR, ESAI_xCCR_xDC_MASK,
ESAI_xC... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_esai.c | static int fsl_esai_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct fsl_esai *esai_priv = snd_soc_dai_get_drvdata(dai);
if (!snd_soc_dai_active(dai)) {
regmap_update_bits(esai_priv->regmap, REG_ESAI_SAICR, ESAI_SAICR_SYNC,
esai_... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_esai.c | static int fsl_esai_hw_init(struct fsl_esai *esai_priv) {
struct platform_device *pdev = esai_priv->pdev;
int ret;
ret = regmap_update_bits(esai_priv->regmap, REG_ESAI_ECR,
ESAI_ECR_ESAIEN_MASK | ESAI_ECR_ERST_MASK,
ESAI_ECR_ESAIEN | ESAI_ECR_ERST);
if (ret... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_esai.c | static void fsl_esai_trigger_start(struct fsl_esai *esai_priv, bool tx) {
u8 i, channels = esai_priv->channels[tx];
u32 pins = DIV_ROUND_UP(channels, esai_priv->slots);
u32 mask;
regmap_update_bits(esai_priv->regmap, REG_ESAI_xFCR(tx), ESAI_xFCR_xFEN_MASK,
ESAI_xFCR_xFEN);
for (i = 0; t... | [
1,
0
] |
Linux Kernel | sound/soc/fsl/fsl_micfil.c | static int micfil_put_dc_remover_state(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
struct fsl_micfil *micfil = snd_soc_com... | [
1,
0
] |
Linux Kernel | sound/soc/fsl/fsl_micfil.c |
static int hwvad_put_enable(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
unsigned int *item = ucontrol->value.enumerated.item;
stru... | [
1,
0
] |
Linux Kernel | sound/soc/fsl/fsl_micfil.c |
static int fsl_micfil_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct fsl_micfil *micfil = snd_soc_dai_get_drvdata(dai);
if (!micfil) {
dev_err(dai->dev, "micfil dai priv_data not set\n");
return -EINVAL;
}
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_micfil.c | static int fsl_micfil_hwvad_disable(struct fsl_micfil *micfil) {
struct device *dev = &micfil->pdev->dev;
int ret = 0;
regmap_clear_bits(micfil->regmap, REG_MICFIL_VAD0_CTRL1,
MICFIL_VAD0_CTRL1_EN);
/* Disable hwvad interrupts */
ret = fsl_micfil_configure_hwvad_interrupts(micfil, 0);
... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_micfil.c | static bool fsl_micfil_writeable_reg(struct device *dev, unsigned int reg) {
switch (reg) {
case REG_MICFIL_CTRL1:
case REG_MICFIL_CTRL2:
case REG_MICFIL_STAT:
case REG_MICFIL_FIFO_CTRL:
case REG_MICFIL_FIFO_STAT:
case REG_MICFIL_DC_CTRL:
case REG_MICFIL_OUT_CTRL:
case REG_MICFIL_OUT_STAT:
case REG_... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_micfil.c |
static irqreturn_t hwvad_err_isr(int irq, void *devid) {
struct fsl_micfil *micfil = (struct fsl_micfil *)devid;
struct device *dev = &micfil->pdev->dev;
u32 vad0_reg;
regmap_read(micfil->regmap, REG_MICFIL_VAD0_STAT, &vad0_reg);
if (vad0_reg & MICFIL_VAD0_STAT_INSATF)
dev_dbg(dev, "voice activity inpu... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_mqs.c | static int fsl_mqs_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) {
switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_LEFT_J:
break;
default:
return -EINVAL;
}
switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
case SND_SOC_DAIFMT_NB_NF:
break;
default:
return -EINVAL;
}
... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_mqs.c |
static int fsl_mqs_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct snd_soc_component *component = dai->component;
struct fsl_mqs *mqs_priv = snd_soc_component_get_drvdata(component);
regmap_update_bits(mqs_priv->regmap, mqs_priv->soc->ctrl_off,
... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_mqs.c |
static int fsl_mqs_remove(struct platform_device *pdev) {
pm_runtime_disable(&pdev->dev);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_rpmsg.c | static int fsl_rpmsg_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai) {
struct fsl_rpmsg *rpmsg = snd_soc_dai_get_drvdata(dai);
struct clk *p = rpmsg->mclk, *pll = NULL, *npll = NULL;
u64 rate = ... | [
1,
0
] |
Linux Kernel | sound/soc/fsl/fsl_rpmsg.c |
static int fsl_rpmsg_hw_free(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct fsl_rpmsg *rpmsg = snd_soc_dai_get_drvdata(dai);
if (rpmsg->mclk_streams & BIT(substream->stream)) {
clk_disable_unprepare(rpmsg->mclk);
rpmsg->mclk_streams &= ~BIT(substream->s... | [
0,
0
] |
Linux Kernel | sound/soc/fsl/fsl_rpmsg.c |
static int fsl_rpmsg_runtime_suspend(struct device *dev) {
struct fsl_rpmsg *rpmsg = dev_get_drvdata(dev);
clk_disable_unprepare(rpmsg->dma);
clk_disable_unprepare(rpmsg->ipg);
return 0;
} | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.