Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/soc/uniphier/aio-core.c
void aio_srcch_set_enable(struct uniphier_aio_sub *sub, int enable) { struct regmap *r = sub->aio->chip->regmap; u32 v; if (enable) v = CDA2D_STRT0_STOP_START; else v = CDA2D_STRT0_STOP_STOP; regmap_write(r, CDA2D_STRT0, v | BIT(sub->swm->och.map)); }
[ 1, 0 ]
Linux Kernel
sound/soc/uniphier/aio-core.c
void aiodma_rb_sync(struct uniphier_aio_sub *sub, u64 start, u64 size, int period) { if (sub->swm->dir == PORT_DIR_OUTPUT) { sub->rd_offs = aiodma_rb_get_rp(sub) - start; if (sub->use_mmap) { sub->threshold = 2 * period; aiodma_rb_set_threshold(sub, size, 2 * period); ...
[ 1, 0 ]
Linux Kernel
sound/soc/uniphier/aio-core.c
bool aiodma_rb_is_irq(struct uniphier_aio_sub *sub) { struct regmap *r = sub->aio->chip->regmap; u32 ir; regmap_read(r, CDA2D_RBMXIR(sub->swm->rb.map), &ir); if (sub->swm->dir == PORT_DIR_OUTPUT) return !!(ir & CDA2D_RBMXIX_SPACE); else return !!(ir & CDA2D_RBMXIX_REMAIN); }
[ 1, 0 ]
Linux Kernel
sound/soc/uniphier/aio-core.c
void aiodma_rb_clear_irq(struct uniphier_aio_sub *sub) { struct regmap *r = sub->aio->chip->regmap; if (sub->swm->dir == PORT_DIR_OUTPUT) regmap_write(r, CDA2D_RBMXIR(sub->swm->rb.map), CDA2D_RBMXIX_SPACE); else regmap_write(r, CDA2D_RBMXIR(sub->swm->rb.map), CDA2D_RBMXIX_REMAIN); }
[ 1, 0 ]
Linux Kernel
sound/soc/uniphier/aio-cpu.c
static const struct uniphier_aio_spec * find_spec(struct uniphier_aio *aio, const char *name, int direction) { const struct uniphier_aio_chip_spec *chip_spec = aio->chip->chip_spec; int i; for (i = 0; i < chip_spec->num_specs; i++) { const struct uniphier_aio_spec *spec = &chip_spec->specs[i]; if (match...
[ 1, 0 ]
Linux Kernel
sound/soc/uniphier/aio-cpu.c
static void uniphier_aio_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct uniphier_aio *aio = uniphier_priv(dai); struct uniphier_aio_sub *sub = &aio->sub[substream->stream]; sub->substream = NULL; }
[ 0, 0 ]
Linux Kernel
sound/soc/uniphier/aio-cpu.c
static int uniphier_aio_resume(struct snd_soc_component *component) { struct snd_soc_dai *dai; int ret = 0; for_each_component_dais(component, dai) ret |= uniphier_aio_dai_resume(dai); return ret; }
[ 0, 0 ]
Linux Kernel
sound/soc/uniphier/aio-dma.c
static irqreturn_t aiodma_irq(int irq, void *p) { struct platform_device *pdev = p; struct uniphier_aio_chip *chip = platform_get_drvdata(pdev); irqreturn_t ret = IRQ_NONE; int i, j; for (i = 0; i < chip->num_aios; i++) { struct uniphier_aio *aio = &chip->aios[i]; for (j = 0; j < ARRAY_SIZE(aio->sub...
[ 0, 0 ]
Linux Kernel
sound/soc/uniphier/aio-dma.c
static int uniphier_aiodma_mmap(struct snd_soc_component *component, struct snd_pcm_substream *substream, struct vm_area_struct *vma) { vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); return remap_pfn_range(vma, vma->vm_start, ...
[ 1, 0 ]
Linux Kernel
sound/soc/uniphier/aio-pxs2.c
static int uniphier_aio_pxs2_probe(struct snd_soc_dai *dai) { int ret; ret = uniphier_aio_dai_probe(dai); if (ret < 0) return ret; ret = snd_soc_dai_set_pll(dai, AUD_PLL_A1, 0, 0, 36864000); if (ret < 0) return ret; ret = snd_soc_dai_set_pll(dai, AUD_PLL_F1, 0, 0, 36864000); if (ret < 0) re...
[ 0, 0 ]
Linux Kernel
sound/soc/uniphier/aio.h
static inline struct uniphier_aio *uniphier_priv(struct snd_soc_dai *dai) { struct uniphier_aio_chip *chip = snd_soc_dai_get_drvdata(dai); return &chip->aios[dai->id]; }
[ 1, 0 ]
Linux Kernel
sound/soc/uniphier/evea.c
static void evea_set_power_state_off(struct evea_priv *evea) { struct regmap *map = evea->regmap; regmap_update_bits(map, ADAC1ODC, ADAC1ODC_HP_DIS_RES_MASK, ADAC1ODC_HP_DIS_RES_ON); regmap_update_bits(map, ADACSEQ1(0), ADACSEQ1_MMUTE, ADACSEQ1_MMUTE); regmap_update_bits(map, ADACSEQ1(1)...
[ 0, 0 ]
Linux Kernel
sound/soc/uniphier/evea.c
static int evea_update_switch_lin(struct evea_priv *evea) { struct regmap *map = evea->regmap; if (evea->switch_lin) { regmap_update_bits(map, ALINEPOW, ALINEPOW_LIN2_POWD | ALINEPOW_LIN1_POWD, ALINEPOW_LIN2_POWD | ALINEPOW_LIN1_POWD); regmap_update_bits(map, AADCPOW(0), AADCPOW_AA...
[ 0, 0 ]
Linux Kernel
sound/soc/uniphier/evea.c
static int evea_set_switch_lin(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct evea_priv *evea = snd_soc_component_get_drvdata(component); if (evea->switch_lin == ucontrol->val...
[ 0, 0 ]
Linux Kernel
sound/soc/uniphier/evea.c
static int evea_set_switch_hp(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct evea_priv *evea = snd_soc_component_get_drvdata(component); if (evea->switch_hp == ucontrol->value....
[ 0, 0 ]
Linux Kernel
sound/soc/uniphier/evea.c
static int evea_codec_suspend(struct snd_soc_component *component) { struct evea_priv *evea = snd_soc_component_get_drvdata(component); evea_set_power_state_off(evea); reset_control_assert(evea->rst_adamv); reset_control_assert(evea->rst_exiv); reset_control_assert(evea->rst); clk_disable_unprepare(evea...
[ 0, 0 ]
Linux Kernel
sound/soc/uniphier/evea.c
static int evea_remove(struct platform_device *pdev) { struct evea_priv *evea = platform_get_drvdata(pdev); reset_control_assert(evea->rst_adamv); reset_control_assert(evea->rst_exiv); reset_control_assert(evea->rst); clk_disable_unprepare(evea->clk_exiv); clk_disable_unprepare(evea->clk); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/ux500/mop500_ab8500.c
static int mclk_input_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); struct mop500_ab8500_drvdata *drvdata = snd_soc_card_get_drvdata(card); ucontrol->value.enumerated.item[0] = drvdata->...
[ 0, 0 ]
Linux Kernel
sound/soc/ux500/mop500_ab8500.c
static int mclk_input_control_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); struct mop500_ab8500_drvdata *drvdata = snd_soc_card_get_drvdata(card); unsigned int val = ucontrol->value.enumerated....
[ 1, 0 ]
Linux Kernel
sound/soc/ux500/ux500_msp_dai.c
static int setup_frameper(struct snd_soc_dai *dai, unsigned int rate, struct msp_protdesc *prot_desc) { struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); switch (drvdata->slots) { case 1: switch (rate) { case 8000: prot_desc->frame_period = FRAME_PER_SING...
[ 1, 0 ]
Linux Kernel
sound/soc/ux500/ux500_msp_dai.c
static int setup_pcm_framing(struct snd_soc_dai *dai, unsigned int rate, struct msp_protdesc *prot_desc) { struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); u32 frame_length = MSP_FRAME_LEN_1; prot_desc->frame_width = 0; switch (drvdata->slots) { case 1: f...
[ 1, 0 ]
Linux Kernel
sound/soc/ux500/ux500_msp_dai.c
static int setup_i2s_protdesc(struct msp_protdesc *prot_desc) { prot_desc->rx_phase_mode = MSP_DUAL_PHASE; prot_desc->tx_phase_mode = MSP_DUAL_PHASE; prot_desc->rx_phase2_start_mode = MSP_PHASE2_START_MODE_FSYNC; prot_desc->tx_phase2_start_mode = MSP_PHASE2_START_MODE_FSYNC; prot_desc->rx_byte_order = MSP_BT...
[ 0, 0 ]
Linux Kernel
sound/soc/ux500/ux500_msp_dai.c
static void ux500_msp_dai_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { int ret; struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); bool is_playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); dev_dbg(dai->dev, "%s: MSP %d (%...
[ 0, 0 ]
Linux Kernel
sound/soc/ux500/ux500_msp_dai.c
static int ux500_msp_dai_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { unsigned int mask, slots_active; struct snd_pcm_runtime *runtime = substream->runtime; struct ux500_msp_i2s_dr...
[ 0, 0 ]
Linux Kernel
sound/soc/ux500/ux500_msp_dai.c
static int ux500_msp_dai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) { struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); dev_dbg(dai->dev, "%s: MSP %d: Enter.\n", __func__, dai->id); switch (fmt & (SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_D...
[ 0, 0 ]
Linux Kernel
sound/soc/ux500/ux500_msp_dai.c
static int ux500_msp_dai_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { int ret = 0; struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); dev_dbg(dai->dev, "%s: MSP %d (%s): Enter (msp->id = %d, cmd = %d).\n", __func__, d...
[ 0, 0 ]
Linux Kernel
sound/soc/ux500/ux500_msp_dai.c
static int ux500_msp_dai_probe(struct snd_soc_dai *dai) { struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); struct msp_i2s_platform_data *pdata = dai->dev->platform_data; int ret; if (!pdata) { ret = ux500_msp_dai_of_probe(dai); return ret; } drvdata->msp->playback_dma_data.data_...
[ 1, 0 ]
Linux Kernel
sound/soc/ux500/ux500_msp_i2s.c
static int configure_protocol(struct ux500_msp *msp, struct ux500_msp_config *config) { struct msp_protdesc *protdesc; enum msp_data_size data_size; u32 temp_reg = 0; data_size = config->data_size; msp->def_elem_len = config->def_elem_len; if (config->default_protdesc == 1) { ...
[ 1, 0 ]
Linux Kernel
sound/soc/ux500/ux500_msp_i2s.c
static void disable_msp_rx(struct ux500_msp *msp) { u32 reg_val_GCR, reg_val_DMACR, reg_val_IMSC; reg_val_GCR = readl(msp->registers + MSP_GCR); writel(reg_val_GCR & ~RX_ENABLE, msp->registers + MSP_GCR); reg_val_DMACR = readl(msp->registers + MSP_DMACR); writel(reg_val_DMACR & ~RX_DMA_ENABLE, msp->register...
[ 0, 0 ]
Linux Kernel
sound/soc/ux500/ux500_msp_i2s.c
static void disable_msp_tx(struct ux500_msp *msp) { u32 reg_val_GCR, reg_val_DMACR, reg_val_IMSC; reg_val_GCR = readl(msp->registers + MSP_GCR); writel(reg_val_GCR & ~TX_ENABLE, msp->registers + MSP_GCR); reg_val_DMACR = readl(msp->registers + MSP_DMACR); writel(reg_val_DMACR & ~TX_DMA_ENABLE, msp->register...
[ 0, 0 ]
Linux Kernel
sound/soc/ux500/ux500_msp_i2s.c
static int ux500_msp_i2s_of_init_msp(struct platform_device *pdev, struct ux500_msp *msp, struct msp_i2s_platform_data **platform_data) { struct msp_i2s_platform_data *pdata; *platform_data = devm_kzalloc( &pdev->dev, sizeof(struct msp_i2s_platform_data), GFP_KERNEL); pdata = *pl...
[ 1, 0 ]
Linux Kernel
sound/soc/ux500/ux500_msp_i2s.c
void ux500_msp_i2s_cleanup_msp(struct platform_device *pdev, struct ux500_msp *msp) { dev_dbg(msp->dev, "%s: Enter (id = %d).\n", __func__, msp->id); }
[ 0, 0 ]
Linux Kernel
sound/soc/ux500/ux500_pcm.c
static int ux500_pcm_prepare_slave_config(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct msp_i2s_platform_data *p...
[ 0, 0 ]
Linux Kernel
sound/soc/ux500/ux500_pcm.c
int ux500_pcm_unregister_platform(struct platform_device *pdev) { snd_dmaengine_pcm_unregister(&pdev->dev); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/xilinx/xlnx_formatter_pcm.c
static int xlnx_formatter_pcm_reset(void __iomem *mmio_base) { u32 val, retries = 0; val = readl(mmio_base + XLNX_AUD_CTRL); val |= AUD_CTRL_RESET_MASK; writel(val, mmio_base + XLNX_AUD_CTRL); val = readl(mmio_base + XLNX_AUD_CTRL); while ((val & AUD_CTRL_RESET_MASK) && (retries < 100)) { mdelay(1); ...
[ 0, 0 ]
Linux Kernel
sound/soc/xilinx/xlnx_formatter_pcm.c
static int xlnx_formatter_set_sysclk(struct snd_soc_component *component, int clk_id, int source, unsigned int freq, int dir) { struct xlnx_pcm_drv_data *adata = dev_get_drvdata(component->dev); adata->sysclk = freq; return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/xilinx/xlnx_formatter_pcm.c
static snd_pcm_uframes_t xlnx_formatter_pcm_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream) { u32 pos; struct snd_pcm_runtime *runtime = substream->runtime; struct xlnx_pcm_stream_param *stream_data = runtime->private_data; pos = readl(stream_data->...
[ 0, 0 ]
Linux Kernel
sound/soc/xilinx/xlnx_i2s.c
static int xlnx_i2s_set_sclkout_div(struct snd_soc_dai *cpu_dai, int div_id, int div) { struct xlnx_i2s_drv_data *drv_data = snd_soc_dai_get_drvdata(cpu_dai); if (!div || (div & ~I2S_I2STIM_VALID_MASK)) return -EINVAL; drv_data->sysclk = 0; writel(div, drv_data->base ...
[ 0, 0 ]
Linux Kernel
sound/soc/xilinx/xlnx_i2s.c
static int xlnx_i2s_set_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int freq, int dir) { struct xlnx_i2s_drv_data *drv_data = snd_soc_dai_get_drvdata(dai); drv_data->sysclk = freq; if (freq) { unsigned int bits_per_sample; if (drv_data->is_32bit_lrclk) bits...
[ 0, 0 ]
Linux Kernel
sound/soc/xtensa/xtfpga-i2s.c
static bool xtfpga_i2s_rd_reg(struct device *dev, unsigned int reg) { return reg < XTFPGA_I2S_CHAN0_DATA; }
[ 0, 0 ]
Linux Kernel
sound/soc/xtensa/xtfpga-i2s.c
static irqreturn_t xtfpga_i2s_threaded_irq_handler(int irq, void *dev_id) { struct xtfpga_i2s *i2s = dev_id; struct snd_pcm_substream *tx_substream; unsigned config, int_status, int_mask; regmap_read(i2s->regmap, XTFPGA_I2S_CONFIG, &config); regmap_read(i2s->regmap, XTFPGA_I2S_INT_MASK, &int_mask); regmap_...
[ 0, 0 ]
Linux Kernel
sound/soc/xtensa/xtfpga-i2s.c
static int xtfpga_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) { if ((fmt & SND_SOC_DAIFMT_INV_MASK) != SND_SOC_DAIFMT_NB_NF) return -EINVAL; if ((fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) != SND_SOC_DAIFMT_BP_FP) return -EINVAL; if ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) != SND_SOC_DAIFMT_I2S)...
[ 1, 0 ]
Linux Kernel
sound/soc/xtensa/xtfpga-i2s.c
static int xtfpga_pcm_hw_params(struct snd_soc_component *component, struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { struct snd_pcm_runtime *runtime = substream->runtime; struct xtfpga_i2s *i2s = runtime->private_data; un...
[ 1, 0 ]
Linux Kernel
sound/soc/xtensa/xtfpga-i2s.c
static int xtfpga_i2s_runtime_resume(struct device *dev) { struct xtfpga_i2s *i2s = dev_get_drvdata(dev); int ret; ret = clk_prepare_enable(i2s->clk); if (ret) { dev_err(dev, "clk_prepare_enable failed: %d\n", ret); return ret; } return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/xtensa/xtfpga-i2s.c
static int xtfpga_i2s_remove(struct platform_device *pdev) { struct xtfpga_i2s *i2s = dev_get_drvdata(&pdev->dev); if (i2s->regmap && !IS_ERR(i2s->regmap)) { regmap_write(i2s->regmap, XTFPGA_I2S_CONFIG, 0); regmap_write(i2s->regmap, XTFPGA_I2S_INT_MASK, 0); regmap_write(i2s->regmap, XTFPGA_I2S_INT_STA...
[ 0, 0 ]
Linux Kernel
sound/sound_core.c
static inline void cleanup_oss_soundcore(void) {} #endif
[ 0, 0 ]
Linux Kernel
sound/sound_core.c
static char *sound_devnode(struct device *dev, umode_t *mode) { if (MAJOR(dev->devt) == SOUND_MAJOR) return NULL; return kasprintf(GFP_KERNEL, "snd/%s", dev_name(dev)); }
[ 0, 0 ]
Linux Kernel
sound/sound_core.c
static void __exit cleanup_soundcore(void) { cleanup_oss_soundcore(); class_destroy(sound_class); }
[ 0, 0 ]
Linux Kernel
sound/sound_core.c
static struct sound_unit *__sound_remove_unit(struct sound_unit **list, int unit) { while (*list) { struct sound_unit *p = *list; if (p->unit_minor == unit) { *list = p->next; return p; } list = &(p->next); } printk(KERN_ERR "Sound device %...
[ 0, 0 ]
Linux Kernel
sound/sound_core.c
static int sound_insert_unit(struct sound_unit **list, const struct file_operations *fops, int index, int low, int top, const char *name, umode_t mode, struct device *dev) { struct sound_unit *s = kmalloc(sizeof(*s), GFP_KERNEL); ...
[ 1, 0 ]
Linux Kernel
sound/sound_core.c
static void sound_remove_unit(struct sound_unit **list, int unit) { struct sound_unit *p; spin_lock(&sound_loader_lock); p = __sound_remove_unit(list, unit); spin_unlock(&sound_loader_lock); if (p) { if (!preclaim_oss) __unregister_chrdev(SOUND_MAJOR, p->unit_minor, 1, p->name); device_destroy(...
[ 0, 0 ]
Linux Kernel
sound/sound_core.c
int register_sound_special_device(const struct file_operations *fops, int unit, struct device *dev) { const int chain = unit % SOUND_STEP; int max_unit = 256; const char *name; char _name[16]; switch (chain) { case 0: name = "mixer"; break; case 1: name = "se...
[ 1, 0 ]
Linux Kernel
sound/sound_core.c
int register_sound_mixer(const struct file_operations *fops, int dev) { return sound_insert_unit(&chains[0], fops, dev, 0, 128, "mixer", 0600, NULL); }
[ 0, 0 ]
Linux Kernel
sound/sound_core.c
void unregister_sound_special(int unit) { sound_remove_unit(&chains[unit % SOUND_STEP], unit); }
[ 0, 0 ]
Linux Kernel
sound/sparc/amd7930.c
static __inline__ void amd7930_disable_ints(struct snd_amd7930 *amd) { unsigned long flags; spin_lock_irqsave(&amd->lock, flags); sbus_writeb(AMR_INIT, amd->regs + AMD7930_CR); sbus_writeb(AM_INIT_ACTIVE | AM_INIT_DISABLE_INTS, amd->regs + AMD7930_DR); spin_unlock_irqrestore(&amd->lock, flags); }
[ 0, 0 ]
Linux Kernel
sound/sparc/amd7930.c
static void __amd7930_update_map(struct snd_amd7930 *amd) { struct amd7930_map *map = &amd->map; int level; map->gx = gx_coeff[amd->rgain]; map->stgr = gx_coeff[amd->mgain]; level = (amd->pgain * (256 + ARRAY_SIZE(ger_coeff))) >> 8; if (level >= 256) { map->ger = ger_coeff[level - 256]; map->gr = g...
[ 0, 0 ]
Linux Kernel
sound/sparc/amd7930.c
static int snd_amd7930_playback_prepare(struct snd_pcm_substream *substream) { struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; unsigned int size = snd_pcm_lib_buffer_bytes(substream); unsigned long flags; u8 new_mmr1; spin_lock_irqsave(&amd...
[ 1, 0 ]
Linux Kernel
sound/sparc/amd7930.c
static snd_pcm_uframes_t snd_amd7930_capture_pointer(struct snd_pcm_substream *substream) { struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); size_t ptr; if (!(amd->flags & AMD7930_FLAG_CAPTURE)) return 0; ptr = amd->c_cur - amd->c_orig; return bytes_to_frames(substream->runtime, ptr); }
[ 0, 0 ]
Linux Kernel
sound/sparc/amd7930.c
static int snd_amd7930_playback_close(struct snd_pcm_substream *substream) { struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); amd->playback_substream = NULL; return 0; }
[ 0, 0 ]
Linux Kernel
sound/sparc/amd7930.c
static int snd_amd7930_capture_close(struct snd_pcm_substream *substream) { struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); amd->capture_substream = NULL; return 0; }
[ 0, 0 ]
Linux Kernel
sound/sparc/amd7930.c
static int snd_amd7930_dev_free(struct snd_device *device) { struct snd_amd7930 *amd = device->device_data; return snd_amd7930_free(amd); }
[ 0, 0 ]
Linux Kernel
sound/sparc/amd7930.c
static int amd7930_sbus_probe(struct platform_device *op) { struct resource *rp = &op->resource[0]; static int dev_num; struct snd_card *card; struct snd_amd7930 *amd; int err, irq; irq = op->archdata.irqs[0]; if (dev_num >= SNDRV_CARDS) return -ENODEV; if (!enable[dev_num]) { dev_num++; ...
[ 1, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static void __cs4231_writeb(struct snd_cs4231 *cp, u8 val, void __iomem *reg_addr) { if (cp->flags & CS4231_FLAG_EBUS) return writeb(val, reg_addr); else return sbus_writeb(val, reg_addr); }
[ 0, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static void snd_cs4231_mce_up(struct snd_cs4231 *chip) { unsigned long flags; int timeout; spin_lock_irqsave(&chip->lock, flags); snd_cs4231_ready(chip); #ifdef CONFIG_SND_DEBUG if (__cs4231_readb(chip, CS4231U(chip, REGSEL)) & CS4231_INIT) snd_printdd("mce_up - auto calibration time out (0)\n"); #endif...
[ 0, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static void cs4231_dma_trigger(struct snd_pcm_substream *substream, unsigned int what, int on) { struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); struct cs4231_dma_control *dma_cont; if (what & CS4231_PLAYBACK_ENABLE) { dma_cont = &chip->p_dma; if (on) { ...
[ 0, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static void snd_cs4231_playback_format(struct snd_cs4231 *chip, struct snd_pcm_hw_params *params, unsigned char pdfr) { unsigned long flags; mutex_lock(&chip->mce_mutex); snd_cs4231_calibrate_mute(chip, 1); snd_cs4231_mce_up(chip);...
[ 0, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static unsigned long snd_cs4231_timer_resolution(struct snd_timer *timer) { struct snd_cs4231 *chip = snd_timer_chip(timer); return chip->image[CS4231_PLAYBK_FORMAT] & 1 ? 9969 : 9920; }
[ 0, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static int snd_cs4231_timer_start(struct snd_timer *timer) { unsigned long flags; unsigned int ticks; struct snd_cs4231 *chip = snd_timer_chip(timer); spin_lock_irqsave(&chip->lock, flags); ticks = timer->sticks; if ((chip->image[CS4231_ALT_FEATURE_1] & CS4231_TIMER_ENABLE) == 0 || (unsigned char)(t...
[ 1, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static int snd_cs4231_open(struct snd_cs4231 *chip, unsigned int mode) { unsigned long flags; mutex_lock(&chip->open_mutex); if ((chip->mode & mode)) { mutex_unlock(&chip->open_mutex); return -EAGAIN; } if (chip->mode & CS4231_MODE_OPEN) { chip->mode |= mode; mutex_unlock(&chip->open_mutex); ...
[ 0, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static void snd_cs4231_close(struct snd_cs4231 *chip, unsigned int mode) { unsigned long flags; mutex_lock(&chip->open_mutex); chip->mode &= ~mode; if (chip->mode & CS4231_MODE_OPEN) { mutex_unlock(&chip->open_mutex); return; } snd_cs4231_calibrate_mute(chip, 1); spin_lock_irqsave(&chip->lock, f...
[ 0, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static int snd_cs4231_playback_prepare(struct snd_pcm_substream *substream) { struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; unsigned long flags; int ret = 0; spin_lock_irqsave(&chip->lock, flags); chip->image[CS4231_IFACE_CTRL] &= ...
[ 0, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static void snd_cs4231_overrange(struct snd_cs4231 *chip) { unsigned long flags; unsigned char res; spin_lock_irqsave(&chip->lock, flags); res = snd_cs4231_in(chip, CS4231_TEST_INIT); spin_unlock_irqrestore(&chip->lock, flags); if (res & (0x08 | 0x02)) chip->capture_substream->runtime->overrange++; }
[ 1, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static snd_pcm_uframes_t snd_cs4231_playback_pointer(struct snd_pcm_substream *substream) { struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); struct cs4231_dma_control *dma_cont = &chip->p_dma; size_t ptr; if (!(chip->image[CS4231_IFACE_CTRL] & CS4231_PLAYBACK_ENABLE)) return 0; ptr = dma_con...
[ 1, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static int snd_cs4231_capture_open(struct snd_pcm_substream *substream) { struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; int err; runtime->hw = snd_cs4231_capture; err = snd_cs4231_open(chip, CS4231_MODE_RECORD); if (err < 0) return ...
[ 0, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static int snd_cs4231_playback_close(struct snd_pcm_substream *substream) { struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); snd_cs4231_close(chip, CS4231_MODE_PLAY); chip->playback_substream = NULL; return 0; }
[ 0, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static int snd_cs4231_timer(struct snd_card *card) { struct snd_cs4231 *chip = card->private_data; struct snd_timer *timer; struct snd_timer_id tid; int err; tid.dev_class = SNDRV_TIMER_CLASS_CARD; tid.dev_sclass = SNDRV_TIMER_SCLASS_NONE; tid.card = card->number; tid.device = 0; tid.subdevice = 0; ...
[ 1, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static int snd_cs4231_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); unsigned long flags; int reg = kcontrol->private_value & 0xff; int shift = (kcontrol->private_value >> 8) & 0xff; int ...
[ 1, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static int snd_cs4231_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); unsigned long flags; int reg = kcontrol->private_value & 0xff; int shift = (kcontrol->private_value >> 8) & 0xff; int ...
[ 1, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static int snd_cs4231_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { int mask = (kcontrol->private_value >> 24) & 0xff; uinfo->type = mask == 1 ? SNDRV_CTL_ELEM_TYPE_BOOLEAN : SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; uinfo->value.int...
[ 1, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static int snd_cs4231_mixer(struct snd_card *card) { struct snd_cs4231 *chip = card->private_data; int err, idx; if (snd_BUG_ON(!chip || !chip->pcm)) return -EINVAL; strcpy(card->mixername, chip->pcm->name); for (idx = 0; idx < ARRAY_SIZE(snd_cs4231_controls); idx++) { err = snd_ctl_add(card, snd_...
[ 1, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static int snd_cs4231_sbus_dev_free(struct snd_device *device) { struct snd_cs4231 *cp = device->device_data; return snd_cs4231_sbus_free(cp); }
[ 0, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static int cs4231_sbus_probe(struct platform_device *op) { struct resource *rp = &op->resource[0]; struct snd_card *card; int err; err = cs4231_attach_begin(op, &card); if (err) return err; sprintf(card->longname, "%s at 0x%02lx:0x%016Lx, irq %d", card->shortname, rp->flags & 0xffL, (unsign...
[ 1, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static void snd_cs4231_ebus_play_callback(struct ebus_dma_info *p, int event, void *cookie) { struct snd_cs4231 *chip = cookie; snd_cs4231_play_callback(chip); }
[ 0, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static void snd_cs4231_ebus_capture_callback(struct ebus_dma_info *p, int event, void *cookie) { struct snd_cs4231 *chip = cookie; snd_cs4231_capture_callback(chip); }
[ 0, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static int _ebus_dma_request(struct cs4231_dma_control *dma_cont, dma_addr_t bus_addr, size_t len) { return ebus_dma_request(&dma_cont->ebus_info, bus_addr, len); }
[ 0, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static void _ebus_dma_enable(struct cs4231_dma_control *dma_cont, int on) { ebus_dma_enable(&dma_cont->ebus_info, on); }
[ 0, 0 ]
Linux Kernel
sound/sparc/cs4231.c
static void _ebus_dma_prepare(struct cs4231_dma_control *dma_cont, int dir) { ebus_dma_prepare(&dma_cont->ebus_info, dir); }
[ 0, 0 ]
Linux Kernel
sound/sparc/dbri.c
static void dbri_cmdsend(struct snd_dbri *dbri, s32 *cmd, int len) { u32 dvma_addr = (u32)dbri->dma_dvma; s32 tmp, addr; static int wait_id; wait_id++; wait_id &= 0xffff; *(cmd) = DBRI_CMD(D_WAIT, 1, wait_id); *(cmd + 1) = DBRI_CMD(D_WAIT, 1, wait_id); /* Replace the last command with JUMP */ addr =...
[ 1, 0 ]
Linux Kernel
sound/sparc/dbri.c
static inline int pipe_active(struct snd_dbri *dbri, int pipe) { return ((pipe >= 0) && (dbri->pipes[pipe].desc != -1)); }
[ 0, 0 ]
Linux Kernel
sound/sparc/dbri.c
static void cs4215_setup_pipes(struct snd_dbri *dbri) { unsigned long flags; spin_lock_irqsave(&dbri->lock, flags); setup_pipe(dbri, 4, D_SDP_MEM | D_SDP_TO_SER | D_SDP_MSB); setup_pipe(dbri, 20, D_SDP_FIXED | D_SDP_TO_SER | D_SDP_MSB); setup_pipe(dbri, 6, D_SDP_MEM | D_SDP_FROM_SER | D_SDP_MSB); setup_pi...
[ 0, 0 ]
Linux Kernel
sound/sparc/dbri.c
static int cs4215_init_data(struct cs4215 *mm) { mm->data[0] = CS4215_LO(0x20) | CS4215_HE | CS4215_LE; mm->data[1] = CS4215_RO(0x20) | CS4215_SE; mm->data[2] = CS4215_LG(0x8) | CS4215_IS | CS4215_PIO0 | CS4215_PIO1; mm->data[3] = CS4215_RG(0x8) | CS4215_MA(0xf); /* * Control Time Slot 1-4 * 0: Defaul...
[ 1, 0 ]
Linux Kernel
sound/sparc/dbri.c
static int cs4215_prepare(struct snd_dbri *dbri, unsigned int rate, snd_pcm_format_t format, unsigned int channels) { int freq_idx; int ret = 0; for (freq_idx = 0; CS4215_FREQ[freq_idx].freq != 0; freq_idx++) { if (CS4215_FREQ[freq_idx].freq == rate) break; } if (CS4215_FR...
[ 0, 0 ]
Linux Kernel
sound/sparc/dbri.c
static void transmission_complete_intr(struct snd_dbri *dbri, int pipe) { struct dbri_streaminfo *info = &dbri->stream_info[DBRI_PLAY]; int td = dbri->pipes[pipe].desc; int status; while (td >= 0) { if (td >= DBRI_NO_DESCS) { printk(KERN_ERR "DBRI: invalid td on pipe %d\n", pipe); return; }...
[ 0, 0 ]
Linux Kernel
sound/sparc/dbri.c
static int snd_dbri_trigger(struct snd_pcm_substream *substream, int cmd) { struct snd_dbri *dbri = snd_pcm_substream_chip(substream); struct dbri_streaminfo *info = DBRI_STREAM(dbri, substream); int ret = 0; switch (cmd) { case SNDRV_PCM_TRIGGER_START: dprintk(D_USR, "start audio, period is %d bytes\n",...
[ 0, 0 ]
Linux Kernel
sound/sparc/dbri.c
static snd_pcm_uframes_t snd_dbri_pointer(struct snd_pcm_substream *substream) { struct snd_dbri *dbri = snd_pcm_substream_chip(substream); struct dbri_streaminfo *info = DBRI_STREAM(dbri, substream); snd_pcm_uframes_t ret; ret = bytes_to_frames(substream->runtime, info->offset) % substream->runtime->...
[ 1, 0 ]
Linux Kernel
sound/sparc/dbri.c
static int snd_cs4215_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { int mask = (kcontrol->private_value >> 16) & 0xff; uinfo->type = (mask == 1) ? SNDRV_CTL_ELEM_TYPE_BOOLEAN : SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; uinfo->value.i...
[ 1, 0 ]
Linux Kernel
sound/sparc/dbri.c
static void dbri_debug_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_dbri *dbri = entry->private_data; int pipe; snd_iprintf(buffer, "debug=%d\n", dbri_debug); for (pipe = 0; pipe < 32; pipe++) { if (pipe_active(dbri, pipe)) { struct dbri_...
[ 0, 0 ]
Linux Kernel
sound/spi/at73c213.c
static int snd_at73c213_pcm_open(struct snd_pcm_substream *substream) { struct snd_at73c213 *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; int err; err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); if (err < 0) return err; snd_at...
[ 0, 0 ]
Linux Kernel
sound/spi/at73c213.c
static int snd_at73c213_pcm_prepare(struct snd_pcm_substream *substream) { struct snd_at73c213 *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; int block_size; block_size = frames_to_bytes(runtime, runtime->period_size); chip->period = 0; ssc_writel(chip->...
[ 0, 0 ]
Linux Kernel
sound/spi/at73c213.c
static int snd_at73c213_pcm_new(struct snd_at73c213 *chip, int device) { struct snd_pcm *pcm; int retval; retval = snd_pcm_new(chip->card, chip->card->shortname, device, 1, 0, &pcm); if (retval < 0) goto out; pcm->private_data = chip; pcm->info_flags = SNDRV_PCM_INFO_BLOCK_TRANSFER; strcpy(pcm->nam...
[ 1, 0 ]