Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | sound/ppc/pmac.c | static irqreturn_t snd_pmac_tx_intr(int irq, void *devid) {
struct snd_pmac *chip = devid;
snd_pmac_pcm_update(chip, &chip->playback);
return IRQ_HANDLED;
} | [
0,
0
] |
Linux Kernel | sound/ppc/pmac.c | void snd_pmac_suspend(struct snd_pmac *chip) {
unsigned long flags;
snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot);
if (chip->suspend)
chip->suspend(chip);
spin_lock_irqsave(&chip->reg_lock, flags);
snd_pmac_beep_stop(chip);
spin_unlock_irqrestore(&chip->reg_lock, flags);
if (chip->irq >= ... | [
0,
0
] |
Linux Kernel | sound/ppc/powermac.c |
static int snd_pmac_driver_resume(struct device *dev) {
struct snd_card *card = dev_get_drvdata(dev);
snd_pmac_resume(card->private_data);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/ppc/snd_ps3.c | static inline void update_reg(unsigned int reg, u32 or_val) {
u32 newval = read_reg(reg) | or_val;
write_reg(reg, newval);
} | [
0,
0
] |
Linux Kernel | sound/ppc/snd_ps3.c | static inline void update_mask_reg(unsigned int reg, u32 mask, u32 or_val) {
u32 newval = (read_reg(reg) & mask) | or_val;
write_reg(reg, newval);
} | [
0,
0
] |
Linux Kernel | sound/ppc/snd_ps3.c | static void snd_ps3_wait_for_dma_stop(struct snd_ps3_card_info *card) {
int stop_forced;
/*
* expected maximum DMA done time is 5.7ms + something (DMA itself).
* 5.7ms is from 16bit/sample 2ch 44.1Khz; the time next
* DMA kick event would occur.
*/
stop_forced = snd_ps3_verify_dma_stop(card, 700, 1);... | [
0,
0
] |
Linux Kernel | sound/ppc/snd_ps3.c | static int snd_ps3_pcm_prepare(struct snd_pcm_substream *substream) {
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_ps3_card_info *card = snd_pcm_substream_chip(substream);
unsigned long irqsave;
if (!snd_ps3_set_avsetting(substream)) {
write_reg(PS3_AUDIO_AX_IE,
PS3_AUDIO... | [
0,
0
] |
Linux Kernel | sound/ppc/snd_ps3.c | static int snd_ps3_spdif_cmask_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
memset(ucontrol->value.iec958.status, 0xff, 8);
return 0;
} | [
1,
1
] |
Linux Kernel | sound/ppc/snd_ps3.c |
static int snd_ps3_spdif_default_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
memcpy(ucontrol->value.iec958.status, ps3av_mode_cs_info, 8);
return 0;
} | [
1,
0
] |
Linux Kernel | sound/ppc/snd_ps3.c |
static int snd_ps3_spdif_default_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
if (memcmp(ps3av_mode_cs_info, ucontrol->value.iec958.status, 8)) {
memcpy(ps3av_mode_cs_info, ucontrol->value.iec958.status, 8);
return 1;
}
return 0;
} | [
1,
0
] |
Linux Kernel | sound/ppc/snd_ps3.c |
static void snd_ps3_unmap_mmio(void) {
iounmap(the_card.mapped_mmio_vaddr);
the_card.mapped_mmio_vaddr = NULL;
} | [
0,
0
] |
Linux Kernel | sound/ppc/snd_ps3.c |
static void snd_ps3_free_irq(void) {
free_irq(the_card.irq_no, &the_card);
ps3_irq_plug_destroy(the_card.irq_no);
} | [
0,
0
] |
Linux Kernel | sound/ppc/snd_ps3.c | static void snd_ps3_driver_remove(struct ps3_system_bus_device *dev) {
int ret;
pr_info("%s:start id=%d\n", __func__, dev->match_id);
ret = snd_card_free(the_card.card);
if (ret)
pr_info("%s: ctl freecard=%d\n", __func__, ret);
dma_free_coherent(&dev->core, PAGE_SIZE, the_card.null_buffer_start_vaddr,
... | [
0,
0
] |
Linux Kernel | sound/ppc/tumbler.c |
static int read_audio_gpio(struct pmac_gpio *gp) {
int ret;
if (!gp->addr)
return 0;
ret = do_gpio_read(gp);
ret = (ret & 0x02) != 0;
return ret == gp->active_state;
} | [
1,
0
] |
Linux Kernel | sound/ppc/tumbler.c | static int tumbler_set_master_volume(struct pmac_tumbler *mix) {
unsigned char block[6];
unsigned int left_vol, right_vol;
if (!mix->i2c.client)
return -ENODEV;
if (!mix->master_switch[0])
left_vol = 0;
else {
left_vol = mix->master_vol[0];
if (left_vol >= ARRAY_SIZE(master_volume_table))
... | [
1,
0
] |
Linux Kernel | sound/ppc/tumbler.c |
static int tumbler_put_master_volume(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_pmac *chip = snd_kcontrol_chip(kcontrol);
struct pmac_tumbler *mix = chip->mixer_data;
unsigned int vol[2];
int change;
vol[0] = ucontrol->value.integer.... | [
1,
0
] |
Linux Kernel | sound/ppc/tumbler.c | static int snapper_set_drc(struct pmac_tumbler *mix) {
unsigned char val[6];
if (!mix->i2c.client)
return -ENODEV;
if (mix->drc_enable)
val[0] = 0x50;
else
val[0] = 0x51; /* disabled */
val[1] = 0x02; /* 1:1 below threshold */
if (mix->drc_range > 0xef)
val[2] = 0xef;
else if (mix->drc... | [
1,
0
] |
Linux Kernel | sound/ppc/tumbler.c |
static int tumbler_get_drc_value(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_pmac *chip = snd_kcontrol_chip(kcontrol);
struct pmac_tumbler *mix;
mix = chip->mixer_data;
if (!mix)
return -ENODEV;
ucontrol->value.integer.value[0] = mix->... | [
0,
0
] |
Linux Kernel | sound/ppc/tumbler.c |
static int tumbler_put_drc_switch(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_pmac *chip = snd_kcontrol_chip(kcontrol);
struct pmac_tumbler *mix;
int change;
mix = chip->mixer_data;
if (!mix)
return -ENODEV;
change = mix->drc_enabl... | [
0,
0
] |
Linux Kernel | sound/ppc/tumbler.c |
static int tumbler_put_mono(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct tumbler_mono_vol *info =
(struct tumbler_mono_vol *)kcontrol->private_value;
struct snd_pmac *chip = snd_kcontrol_chip(kcontrol);
struct pmac_tumbler *mix;
unsigned int vol... | [
1,
0
] |
Linux Kernel | sound/ppc/tumbler.c |
static int snapper_set_mix_vol(struct pmac_tumbler *mix, int idx) {
if (!mix->i2c.client)
return -ENODEV;
if (snapper_set_mix_vol1(mix, idx, 0, TAS_REG_LMIX) < 0 ||
snapper_set_mix_vol1(mix, idx, 1, TAS_REG_RMIX) < 0)
return -EINVAL;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/ppc/tumbler.c |
static int snapper_get_mix(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
int idx = (int)kcontrol->private_value;
struct snd_pmac *chip = snd_kcontrol_chip(kcontrol);
struct pmac_tumbler *mix;
mix = chip->mixer_data;
if (!mix)
return -ENODEV;
ucontrol->... | [
0,
0
] |
Linux Kernel | sound/ppc/tumbler.c |
static int tumbler_detect_lineout(struct snd_pmac *chip) {
struct pmac_tumbler *mix = chip->mixer_data;
int detect = 0;
if (mix->line_detect.addr)
detect |= read_audio_gpio(&mix->line_detect);
return detect;
} | [
0,
0
] |
Linux Kernel | sound/ppc/tumbler.c | static irqreturn_t headphone_intr(int irq, void *devid) {
struct snd_pmac *chip = devid;
if (chip->update_automute && chip->initialized) {
chip->update_automute(chip, 1);
return IRQ_HANDLED;
}
return IRQ_NONE;
} | [
1,
0
] |
Linux Kernel | sound/ppc/tumbler.c | static void tumbler_resume(struct snd_pmac *chip) {
struct pmac_tumbler *mix = chip->mixer_data;
mix->acs &= ~1;
mix->master_switch[0] = mix->save_master_switch[0];
mix->master_switch[1] = mix->save_master_switch[1];
mix->master_vol[0] = mix->save_master_vol[0];
mix->master_vol[1] = mix->save_master_vol[1]... | [
1,
0
] |
Linux Kernel | sound/sh/aica.c | static void spu_enable(void) {
unsigned long flags;
u32 regval = readl(ARM_RESET_REGISTER);
regval &= ~1;
spu_write_wait();
local_irq_save(flags);
writel(regval, ARM_RESET_REGISTER);
local_irq_restore(flags);
} | [
0,
0
] |
Linux Kernel | sound/sh/aica.c | static void spu_reset(void) {
unsigned long flags;
spu_disable();
spu_memset(0, 0, 0x200000 / 4);
local_irq_save(flags);
__raw_writel(0xea000002, SPU_MEMORY_BASE);
local_irq_restore(flags);
spu_enable();
} | [
0,
0
] |
Linux Kernel | sound/sh/aica.c |
static int snd_aicapcm_pcm_close(struct snd_pcm_substream *substream) {
struct snd_card_aica *dreamcastcard = substream->pcm->private_data;
flush_work(&(dreamcastcard->spu_dma_work));
del_timer(&dreamcastcard->timer);
dreamcastcard->substream = NULL;
kfree(dreamcastcard->channel);
spu_disable();
return 0... | [
1,
0
] |
Linux Kernel | sound/sh/aica.c |
static int snd_aicapcm_pcm_prepare(struct snd_pcm_substream *substream) {
struct snd_card_aica *dreamcastcard = substream->pcm->private_data;
if ((substream->runtime)->format == SNDRV_PCM_FORMAT_S16_LE)
dreamcastcard->channel->sfmt = SM_16BIT;
dreamcastcard->channel->freq = substream->runtime->rate;
dreamc... | [
1,
0
] |
Linux Kernel | sound/sh/sh_dac_audio.c |
static int snd_sh_dac_pcm_open(struct snd_pcm_substream *substream) {
struct snd_sh_dac *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
runtime->hw = snd_sh_dac_pcm_hw;
chip->substream = substream;
chip->buffer_begin = chip->buffer_end = chip->data_buffer;
... | [
0,
0
] |
Linux Kernel | sound/sh/sh_dac_audio.c |
static int snd_sh_dac_pcm_prepare(struct snd_pcm_substream *substream) {
struct snd_sh_dac *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = chip->substream->runtime;
chip->buffer_size = runtime->buffer_size;
memset(chip->data_buffer, 0, chip->pdata->buffer_size);
return 0;
} | [
1,
0
] |
Linux Kernel | sound/sh/sh_dac_audio.c | static int snd_sh_dac_pcm_copy_kernel(struct snd_pcm_substream *substream,
int channel, unsigned long pos, void *src,
unsigned long count) {
struct snd_sh_dac *chip = snd_pcm_substream_chip(substream);
memcpy_toio(chip->data_buffer + pos,... | [
1,
0
] |
Linux Kernel | sound/sh/sh_dac_audio.c |
static snd_pcm_uframes_t
snd_sh_dac_pcm_pointer(struct snd_pcm_substream *substream) {
struct snd_sh_dac *chip = snd_pcm_substream_chip(substream);
int pointer = chip->buffer_begin - chip->data_buffer;
return pointer;
} | [
0,
0
] |
Linux Kernel | sound/sh/sh_dac_audio.c | static int snd_sh_dac_pcm(struct snd_sh_dac *chip, int device) {
int err;
struct snd_pcm *pcm;
err = snd_pcm_new(chip->card, "SH_DAC PCM", device, 1, 0, &pcm);
if (err < 0)
return err;
pcm->private_data = chip;
strcpy(pcm->name, "SH_DAC PCM");
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_sh_... | [
1,
0
] |
Linux Kernel | sound/sh/sh_dac_audio.c | static int snd_sh_dac_probe(struct platform_device *devptr) {
struct snd_sh_dac *chip;
struct snd_card *card;
int err;
err = snd_card_new(&devptr->dev, index, id, THIS_MODULE, 0, &card);
if (err < 0) {
snd_printk(KERN_ERR "cannot allocate the card\n");
return err;
}
err = snd_sh_dac_create(card,... | [
1,
0
] |
Linux Kernel | sound/soc/adi/axi-i2s.c |
static int axi_i2s_dev_remove(struct platform_device *pdev) {
struct axi_i2s *i2s = platform_get_drvdata(pdev);
clk_disable_unprepare(i2s->clk);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/adi/axi-spdif.c |
static int axi_spdif_dev_remove(struct platform_device *pdev) {
struct axi_spdif *spdif = platform_get_drvdata(pdev);
clk_disable_unprepare(spdif->clk);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp/acp-mach-common.c |
static int acp_nau8825_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);
int ret;
ret = snd_soc_dai_set_sysclk(codec_... | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp/acp-pdm.c | static int acp_dmic_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct acp_stream *stream = substream->runtime->private_data;
struct device *dev = dai->component->dev;
struct acp_dev_data *adata = dev_get_drvdata(dev);
u32 physical_addr, size_dmic, period_... | [
1,
0
] |
Linux Kernel | sound/soc/amd/acp/acp-platform.c | static int acp_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params) {
struct acp_dev_data *adata = snd_soc_component_get_drvdata(component);
struct acp_stream *stream = substream->runtime->... | [
1,
0
] |
Linux Kernel | sound/soc/amd/acp/acp-rembrandt.c |
static int acp6x_reset(void __iomem *base) {
u32 val;
int timeout;
writel(1, base + ACP_SOFT_RESET);
timeout = 0;
while (++timeout < 500) {
val = readl(base + ACP_SOFT_RESET);
if (val & ACP_SOFT_RESET_SOFTRESET_AUDDONE_MASK)
break;
cpu_relax();
}
writel(0, base + ACP_SOFT_RESET);
tim... | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp/acp-rembrandt.c |
static void acp6x_disable_interrupts(struct acp_dev_data *adata) {
struct acp_resource *rsrc = adata->rsrc;
writel(ACP_EXT_INTR_STAT_CLEAR_MASK,
ACP_EXTERNAL_INTR_STAT(adata, rsrc->irqp_used));
writel(0x00, ACP_EXTERNAL_INTR_ENB(adata));
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp/acp-rembrandt.c | static int rmb_acp_init(void __iomem *base) {
int ret;
ret = acp6x_power_on(base);
if (ret) {
pr_err("ACP power on failed\n");
return ret;
}
writel(0x01, base + ACP_CONTROL);
/* Reset */
ret = acp6x_reset(base);
if (ret) {
pr_err("ACP reset failed\n");
return ret;
}
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp/acp-rembrandt.c |
static int rembrandt_audio_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct acp_chip_info *chip;
struct acp_dev_data *adata;
struct resource *res;
chip = dev_get_platdata(&pdev->dev);
if (!chip || !chip->base) {
dev_err(&pdev->dev, "ACP chip data is NULL\n");
return -E... | [
1,
0
] |
Linux Kernel | sound/soc/amd/acp/acp-renoir.c |
static int acp3x_power_off(void __iomem *base) {
u32 val;
writel(ACP_PWR_OFF_MASK, base + ACP_PGFSM_CONTROL);
return readl_poll_timeout(base + ACP_PGFSM_STATUS, val,
(val & ACP_PGFSM_STAT_MASK) == ACP_POWERED_OFF,
DELAY_US, ACP_TIMEOUT);
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp/acp-renoir.c |
static void acp3x_enable_interrupts(struct acp_dev_data *adata) {
struct acp_resource *rsrc = adata->rsrc;
u32 ext_intr_ctrl;
writel(0x01, ACP_EXTERNAL_INTR_ENB(adata));
ext_intr_ctrl = readl(ACP_EXTERNAL_INTR_CNTL(adata, rsrc->irqp_used));
ext_intr_ctrl |= ACP_ERROR_MASK;
writel(ext_intr_ctrl, ACP_EXTERN... | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp/acp-renoir.c | static int rn_acp_init(void __iomem *base) {
int ret;
ret = acp3x_power_on(base);
if (ret)
return ret;
writel(0x01, base + ACP_CONTROL);
/* Reset */
ret = acp3x_reset(base);
if (ret)
return ret;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp-da7219-max98357a.c | static int da7219_clk_enable(struct snd_pcm_substream *substream) {
int ret = 0;
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
clk_set_rate(da7219_dai_wclk, 48000);
clk_set_rate(da7219_dai_bclk, 48000 * 64);
ret = clk_prepare_enable(da7219_dai_bclk);
if (ret < 0) {
dev_err(rtd->de... | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp-da7219-max98357a.c |
static void rt5682_clk_disable(void) { clk_disable_unprepare(rt5682_dai_wclk); } | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp-da7219-max98357a.c | static int cz_dmic1_startup(struct snd_pcm_substream *substream) {
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct snd_soc_card *card = rtd->card;
struct acp_platform_info *machine = snd_soc_card_get_drvdata(card);
runtime->hw.c... | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp-da7219-max98357a.c | static int cz_rt5682_cap_startup(struct snd_pcm_substream *substream) {
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct snd_soc_card *card = rtd->card;
struct acp_platform_info *machine = snd_soc_card_get_drvdata(card);
runtime-... | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp-da7219-max98357a.c | static int cz_rt5682_dmic1_startup(struct snd_pcm_substream *substream) {
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct snd_soc_card *card = rtd->card;
struct acp_platform_info *machine = snd_soc_card_get_drvdata(card);
runtim... | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp-da7219-max98357a.c |
static void cz_rt5682_shutdown(struct snd_pcm_substream *substream) {
rt5682_clk_disable();
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp-es8336.c |
static int st_es8336_probe(struct platform_device *pdev) {
int ret;
struct snd_soc_card *card;
struct acp_platform_info *machine;
machine =
devm_kzalloc(&pdev->dev, sizeof(struct acp_platform_info), GFP_KERNEL);
if (!machine)
return -ENOMEM;
dmi_check_system(st_es8336_quirk_table);
switch (ac... | [
1,
0
] |
Linux Kernel | sound/soc/amd/acp-pcm-dma.c |
static u32 acp_reg_read(void __iomem *acp_mmio, u32 reg) {
return readl(acp_mmio + (reg * 4));
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp-pcm-dma.c | static void set_acp_to_i2s_dma_descriptors(void __iomem *acp_mmio, u32 size,
int direction, u32 sram_bank,
u16 destination, u16 ch,
u16 dma_dscr_idx, u32 asic_type) {
u16 i;
acp_dma_dscr_... | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp-pcm-dma.c |
static u64 acp_get_byte_count(struct audio_substream_data *rtd) {
union acp_dma_count byte_count;
byte_count.bcount.high =
acp_reg_read(rtd->acp_mmio, rtd->byte_cnt_high_reg_offset);
byte_count.bcount.low =
acp_reg_read(rtd->acp_mmio, rtd->byte_cnt_low_reg_offset);
return byte_count.bytescount;
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp-pcm-dma.c |
static snd_pcm_sframes_t acp_dma_delay(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
struct audio_drv_data *adata = dev_get_drvdata(component->dev);
snd_pcm_sframes_t delay = adata->delay;
adata->delay = 0;
return delay;
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp-pcm-dma.c |
static int acp_dma_trigger(struct snd_soc_component *component,
struct snd_pcm_substream *substream, int cmd) {
int ret;
struct snd_pcm_runtime *runtime = substream->runtime;
struct audio_substream_data *rtd = runtime->private_data;
if (!rtd)
return -EINVAL;
switch (cmd) {
... | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp-pcm-dma.c |
static int acp_dma_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd) {
struct audio_drv_data *adata = dev_get_drvdata(component->dev);
struct device *parent = component->dev->parent;
switch (adata->asic_type) {
case CHIP_STONEY:
snd_pcm_set_managed_buffer_all... | [
1,
0
] |
Linux Kernel | sound/soc/amd/acp-pcm-dma.c | static int acp_audio_probe(struct platform_device *pdev) {
int status, irq;
struct audio_drv_data *audio_drv_data;
const u32 *pdata = pdev->dev.platform_data;
if (!pdata) {
dev_err(&pdev->dev, "Missing platform data\n");
return -ENODEV;
}
audio_drv_data =
devm_kzalloc(&pdev->dev, sizeof(stru... | [
1,
0
] |
Linux Kernel | sound/soc/amd/acp-pcm-dma.c |
static int acp_pcm_runtime_resume(struct device *dev) {
int status;
struct audio_drv_data *adata = dev_get_drvdata(dev);
status = acp_init(adata->acp_mmio, adata->asic_type);
if (status) {
dev_err(dev, "ACP Init failed status:%d\n", status);
return status;
}
acp_reg_write(1, adata->acp_mmio, mmACP... | [
0,
0
] |
Linux Kernel | sound/soc/amd/acp3x-rt5682-max9836.c |
static int dmic_set(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
if (dmic_sel) {
dmic_switch = ucontrol->value.integer.value[0];
gpiod_set_value(dmic_sel, dmic_switch);
}
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/ps/acp63.h |
static inline u32 acp63_readl(void __iomem *base_addr) {
return readl(base_addr);
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/ps/ps-pdm-dma.c |
static void acp63_disable_pdm_interrupts(void __iomem *acp_base) {
u32 ext_int_ctrl;
ext_int_ctrl = acp63_readl(acp_base + ACP_EXTERNAL_INTR_CNTL);
ext_int_ctrl &= ~PDM_DMA_INTR_MASK;
acp63_writel(ext_int_ctrl, acp_base + ACP_EXTERNAL_INTR_CNTL);
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/ps/ps-pdm-dma.c |
static int acp63_pdm_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params) {
struct pdm_stream_instance *rtd;
size_t size, period_bytes;
rtd = substream->runtime->private_dat... | [
0,
0
] |
Linux Kernel | sound/soc/amd/ps/ps-pdm-dma.c |
static u64 acp63_pdm_get_byte_count(struct pdm_stream_instance *rtd,
int direction) {
u32 high, low;
u64 byte_count;
high = acp63_readl(rtd->acp63_base + ACP_WOV_RX_LINEARPOSITIONCNTR_HIGH);
byte_count = high;
low = acp63_readl(rtd->acp63_base + ACP_WOV_RX_LINEARPOSITIONC... | [
0,
0
] |
Linux Kernel | sound/soc/amd/ps/ps-pdm-dma.c |
static snd_pcm_uframes_t
acp63_pdm_dma_pointer(struct snd_soc_component *comp,
struct snd_pcm_substream *stream) {
struct pdm_stream_instance *rtd;
u32 pos, buffersize;
u64 bytescount;
rtd = stream->runtime->private_data;
buffersize = frames_to_bytes(stream->runtime, stream->runtime->b... | [
0,
0
] |
Linux Kernel | sound/soc/amd/ps/ps-pdm-dma.c |
static int acp63_pdm_dai_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai) {
struct pdm_stream_instance *rtd;
int ret;
bool pdm_status;
unsigned int ch_mask;
rtd = substream->runtime->private_data;
ret = 0;
switch (substream->runtime->channel... | [
1,
0
] |
Linux Kernel | sound/soc/amd/raven/acp3x-i2s.c | static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
u32 rx_mask, int slots, int slot_width) {
struct i2s_dev_data *adata;
u32 frm_len;
u16 slot_len;
adata = snd_soc_dai_get_drvdata(cpu_dai);
switch (slot_width) {
case SLOT_WIDTH_8:
slot_len = 8... | [
0,
0
] |
Linux Kernel | sound/soc/amd/raven/acp3x-i2s.c | static int acp3x_dai_remove(struct platform_device *pdev) { return 0; } | [
0,
0
] |
Linux Kernel | sound/soc/amd/raven/acp3x-pcm-dma.c |
static irqreturn_t i2s_irq_handler(int irq, void *dev_id) {
struct i2s_dev_data *rv_i2s_data;
u16 play_flag, cap_flag;
u32 val;
rv_i2s_data = dev_id;
if (!rv_i2s_data)
return IRQ_NONE;
play_flag = 0;
cap_flag = 0;
val = rv_readl(rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
if ((val & BI... | [
0,
0
] |
Linux Kernel | sound/soc/amd/raven/acp3x-pcm-dma.c |
static int acp3x_dma_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
struct snd_pcm_runtime *runtime;
struct snd_soc_pcm_runtime *prtd;
struct i2s_dev_data *adata;
struct i2s_stream_instance *i2s_data;
int ret;
runtime = substream->runtime;
prtd... | [
0,
0
] |
Linux Kernel | sound/soc/amd/raven/acp3x-pcm-dma.c |
static snd_pcm_uframes_t
acp3x_dma_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
struct i2s_stream_instance *rtd;
u32 pos;
u32 buffersize;
u64 bytescount;
rtd = substream->runtime->private_data;
buffersize =
frames_to_bytes(substream->runtime,... | [
0,
0
] |
Linux Kernel | sound/soc/amd/raven/acp3x-pcm-dma.c |
static int acp3x_dma_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
struct snd_soc_pcm_runtime *prtd;
struct i2s_dev_data *adata;
struct i2s_stream_instance *ins;
prtd = asoc_substream_to_rtd(substream);
component = snd_soc_rtdcom_lookup(prtd, DR... | [
0,
0
] |
Linux Kernel | sound/soc/amd/raven/acp3x.h |
static inline u32 rv_readl(void __iomem *base_addr) {
return readl(base_addr - ACP3x_PHY_BASE_ADDRESS);
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/raven/acp3x.h |
static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
int direction) {
u64 byte_count;
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
switch (rtd->i2s_instance) {
case I2S_BT_INSTANCE:
byte_count =
rv_readl(rtd->acp3x_base + mmACP_BT_TX_L... | [
0,
0
] |
Linux Kernel | sound/soc/amd/raven/pci-acp3x.c |
static int acp3x_reset(void __iomem *acp3x_base) {
u32 val;
int timeout;
rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
timeout = 0;
while (++timeout < 500) {
val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
break;
cpu_relax();
}
rv_writel... | [
0,
0
] |
Linux Kernel | sound/soc/amd/raven/pci-acp3x.c | static int acp3x_deinit(void __iomem *acp3x_base) {
int ret;
acp3x_disable_interrupts(acp3x_base);
ret = acp3x_reset(acp3x_base);
if (ret) {
pr_err("ACP3x reset failed\n");
return ret;
}
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/raven/pci-acp3x.c |
static int snd_acp3x_suspend(struct device *dev) {
int ret;
struct acp3x_dev_data *adata;
adata = dev_get_drvdata(dev);
ret = acp3x_deinit(adata->acp3x_base);
if (ret)
dev_err(dev, "ACP de-init failed\n");
else
dev_dbg(dev, "ACP de-initialized\n");
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/renoir/acp3x-pdm-dma.c |
static void init_pdm_ring_buffer(u32 physical_addr, u32 buffer_size,
u32 watermark_size, void __iomem *acp_base) {
rn_writel(physical_addr, acp_base + ACP_WOV_RX_RINGBUFADDR);
rn_writel(buffer_size, acp_base + ACP_WOV_RX_RINGBUFSIZE);
rn_writel(watermark_size, acp_base + ACP_WOV_... | [
0,
0
] |
Linux Kernel | sound/soc/amd/renoir/acp3x-pdm-dma.c |
static void enable_pdm_interrupts(void __iomem *acp_base) {
u32 ext_int_ctrl;
ext_int_ctrl = rn_readl(acp_base + ACP_EXTERNAL_INTR_CNTL);
ext_int_ctrl |= PDM_DMA_INTR_MASK;
rn_writel(ext_int_ctrl, acp_base + ACP_EXTERNAL_INTR_CNTL);
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/renoir/acp3x-pdm-dma.c |
static int stop_pdm_dma(void __iomem *acp_base) {
u32 pdm_enable, pdm_dma_enable;
int timeout;
pdm_enable = rn_readl(acp_base + ACP_WOV_PDM_ENABLE);
pdm_dma_enable = rn_readl(acp_base + ACP_WOV_PDM_DMA_ENABLE);
if (pdm_dma_enable & 0x01) {
pdm_dma_enable = 0x02;
rn_writel(pdm_dma_enable, acp_base + ... | [
1,
0
] |
Linux Kernel | sound/soc/amd/renoir/acp3x-pdm-dma.c |
static int acp_pdm_dma_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd) {
struct device *parent = component->dev->parent;
snd_pcm_set_managed_buffer_all(rtd->pcm, SNDRV_DMA_TYPE_DEV, parent,
MIN_BUFFER, MAX_BUFFER);
return 0;
} | [
1,
0
] |
Linux Kernel | sound/soc/amd/renoir/acp3x-pdm-dma.c |
static int acp_pdm_dma_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
struct pdm_dev_data *adata = dev_get_drvdata(component->dev);
disable_pdm_interrupts(adata->acp_base);
adata->capture_stream = NULL;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/renoir/acp3x-pdm-dma.c |
static int acp_pdm_audio_probe(struct platform_device *pdev) {
struct resource *res;
struct pdm_dev_data *adata;
unsigned int irqflags;
int status;
if (!pdev->dev.platform_data) {
dev_err(&pdev->dev, "platform_data not retrieved\n");
return -ENODEV;
}
irqflags = *((unsigned int *)(pdev->dev.plat... | [
1,
0
] |
Linux Kernel | sound/soc/amd/renoir/acp3x-rn.c |
static int acp_probe(struct platform_device *pdev) {
int ret;
struct acp_pdm *machine = NULL;
struct snd_soc_card *card;
card = &acp_card;
acp_card.dev = &pdev->dev;
platform_set_drvdata(pdev, card);
snd_soc_card_set_drvdata(card, machine);
ret = devm_snd_soc_register_card(&pdev->dev, card);
if (re... | [
0,
0
] |
Linux Kernel | sound/soc/amd/renoir/rn-pci-acp3x.c |
static int rn_acp_power_off(void __iomem *acp_base) {
u32 val;
int timeout;
rn_writel(ACP_PGFSM_CNTL_POWER_OFF_MASK, acp_base + ACP_PGFSM_CONTROL);
timeout = 0;
while (++timeout < 500) {
val = rn_readl(acp_base + ACP_PGFSM_STATUS);
if ((val & ACP_PGFSM_STATUS_MASK) == ACP_POWERED_OFF)
return 0... | [
0,
0
] |
Linux Kernel | sound/soc/amd/rpl/rpl-pci-acp6x.c | static int rpl_deinit(void __iomem *acp_base) {
int ret;
ret = rpl_reset(acp_base);
if (ret) {
pr_err("ACP reset failed\n");
return ret;
}
rpl_acp_writel(0x00, acp_base + ACP_CLKMUX_SEL);
rpl_acp_writel(0x00, acp_base + ACP_CONTROL);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/rpl/rpl-pci-acp6x.c | static int snd_rpl_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id) {
struct rpl_dev_data *adata;
u32 addr;
int ret;
switch (pci->revision) {
case 0x62:
break;
default:
dev_dbg(&pci->dev, "acp6x pci device not found\n");
return -ENODEV;
}
if (pci_enabl... | [
1,
0
] |
Linux Kernel | sound/soc/amd/rpl/rpl-pci-acp6x.c |
static int __maybe_unused snd_rpl_suspend(struct device *dev) {
struct rpl_dev_data *adata;
int ret;
adata = dev_get_drvdata(dev);
ret = rpl_deinit(adata->acp6x_base);
if (ret)
dev_err(dev, "ACP de-init failed\n");
return ret;
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/rpl/rpl_acp6x.h |
static inline u32 rpl_acp_readl(void __iomem *base_addr) {
return readl(base_addr - ACP6x_PHY_BASE_ADDRESS);
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/vangogh/acp5x-i2s.c |
static int acp5x_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) {
struct i2s_dev_data *adata;
int mode;
adata = snd_soc_dai_get_drvdata(cpu_dai);
mode = fmt & SND_SOC_DAIFMT_FORMAT_MASK;
switch (mode) {
case SND_SOC_DAIFMT_I2S:
adata->tdm_mode = TDM_DISABLE;
break;
case SND_SOC_DAIFM... | [
1,
0
] |
Linux Kernel | sound/soc/amd/vangogh/acp5x-pcm-dma.c |
static int acp5x_dma_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd) {
struct device *parent = component->dev->parent;
snd_pcm_set_managed_buffer_all(rtd->pcm, SNDRV_DMA_TYPE_DEV, parent,
MIN_BUFFER, MAX_BUFFER);
return 0;
} | [
1,
0
] |
Linux Kernel | sound/soc/amd/vangogh/acp5x.h |
static inline void acp_writel(u32 val, void __iomem *base_addr) {
writel(val, base_addr - ACP5x_PHY_BASE_ADDRESS);
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/vangogh/pci-acp5x.c | static int acp5x_init(void __iomem *acp5x_base) {
int ret;
ret = acp5x_power_on(acp5x_base);
if (ret) {
pr_err("ACP5x power on failed\n");
return ret;
}
acp_writel(0x01, acp5x_base + ACP_CONTROL);
/* Reset */
ret = acp5x_reset(acp5x_base);
if (ret) {
pr_err("ACP5x reset failed\n");
retu... | [
0,
0
] |
Linux Kernel | sound/soc/amd/vangogh/pci-acp5x.c |
static int __maybe_unused snd_acp5x_resume(struct device *dev) {
int ret;
struct acp5x_dev_data *adata;
adata = dev_get_drvdata(dev);
ret = acp5x_init(adata->acp5x_base);
if (ret) {
dev_err(dev, "ACP init failed\n");
return ret;
}
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/yc/acp6x-pdm-dma.c |
static void acp6x_disable_pdm_interrupts(void __iomem *acp_base) {
u32 ext_int_ctrl;
ext_int_ctrl = acp6x_readl(acp_base + ACP_EXTERNAL_INTR_CNTL);
ext_int_ctrl &= ~PDM_DMA_INTR_MASK;
acp6x_writel(ext_int_ctrl, acp_base + ACP_EXTERNAL_INTR_CNTL);
} | [
0,
0
] |
Linux Kernel | sound/soc/amd/yc/acp6x-pdm-dma.c |
static int acp6x_start_pdm_dma(void __iomem *acp_base) {
u32 pdm_enable;
u32 pdm_dma_enable;
int timeout;
pdm_enable = 0x01;
pdm_dma_enable = 0x01;
acp6x_enable_pdm_clock(acp_base);
acp6x_writel(pdm_enable, acp_base + ACP_WOV_PDM_ENABLE);
acp6x_writel(pdm_dma_enable, acp_base + ACP_WOV_PDM_DMA_ENABLE... | [
1,
0
] |
Linux Kernel | sound/soc/amd/yc/acp6x-pdm-dma.c |
static int acp6x_pdm_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params) {
struct pdm_stream_instance *rtd;
size_t size, period_bytes;
rtd = substream->runtime->private_dat... | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.