Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/pci/ctxfi/ctsrc.c
static int src_set_bp(struct src *src, unsigned int bp) { struct hw *hw; hw = src->rsc.hw; hw->src_set_bp(src->rsc.ctrl_blk, bp); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctsrc.c
static int src_set_cisz(struct src *src, unsigned int cisz) { struct hw *hw; hw = src->rsc.hw; hw->src_set_cisz(src->rsc.ctrl_blk, cisz); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctsrc.c
static struct src *src_next_interleave(struct src *src) { return src->intlv; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctsrc.c
static int src_default_config_memwr(struct src *src) { struct hw *hw = src->rsc.hw; hw->src_set_state(src->rsc.ctrl_blk, SRC_STATE_OFF); hw->src_set_bm(src->rsc.ctrl_blk, 1); hw->src_set_rsr(src->rsc.ctrl_blk, 0); hw->src_set_sf(src->rsc.ctrl_blk, SRC_SF_S16); hw->src_set_wr(src->rsc.ctrl_blk, 1); hw->s...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctsrc.c
int src_mgr_create(struct hw *hw, struct src_mgr **rsrc_mgr) { int err, i; struct src_mgr *src_mgr; *rsrc_mgr = NULL; src_mgr = kzalloc(sizeof(*src_mgr), GFP_KERNEL); if (!src_mgr) return -ENOMEM; err = rsc_mgr_init(&src_mgr->mgr, SRC, SRC_RESOURCE_NUM, hw); if (err) goto error1; spin_lock_in...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctsrc.c
static void srcimp_next_conj(struct rsc *rsc) { rsc->conj++; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctsrc.c
static int srcimp_index(const struct rsc *rsc) { return container_of(rsc, struct srcimp, rsc)->idx[rsc->conj]; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctsrc.c
static int srcimp_map(struct srcimp *srcimp, struct src *src, struct rsc *input) { struct imapper *entry; int i; srcimp->rsc.ops->master(&srcimp->rsc); src->rsc.ops->master(&src->rsc); input->ops->master(input); for (i = 0; i < srcimp->rsc.msr; i++) { entry = &srcimp->imappers[i]...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctsrc.c
static int srcimp_imap_delete(struct srcimp_mgr *mgr, struct imapper *entry) { unsigned long flags; int err; spin_lock_irqsave(&mgr->imap_lock, flags); err = input_mapper_delete(&mgr->imappers, entry, srcimp_map_op, mgr); if (list_empty(&mgr->imappers)) { input_mapper_add(&mgr->imappers, mgr->init_imap,...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctsrc.c
int srcimp_mgr_create(struct hw *hw, struct srcimp_mgr **rsrcimp_mgr) { int err; struct srcimp_mgr *srcimp_mgr; struct imapper *entry; *rsrcimp_mgr = NULL; srcimp_mgr = kzalloc(sizeof(*srcimp_mgr), GFP_KERNEL); if (!srcimp_mgr) return -ENOMEM; err = rsc_mgr_init(&srcimp_mgr->mgr, SRCIMP, SRCIMP_RES...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cttimer.c
static void ct_systimer_callback(struct timer_list *t) { struct ct_timer_instance *ti = from_timer(ti, t, timer); struct snd_pcm_substream *substream = ti->substream; struct snd_pcm_runtime *runtime = substream->runtime; struct ct_atc_pcm *apcm = ti->apcm; unsigned int period_size = runtime->period_size; un...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cttimer.c
static void ct_xfitimer_irq_rearm(struct ct_timer *atimer, int ticks) { struct hw *hw = atimer->atc->hw; if (ticks > MAX_TICKS) ticks = MAX_TICKS; hw->set_timer_tick(hw, ticks); if (!atimer->running) hw->set_timer_irq(hw, 1); atimer->running = 1; }
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cttimer.c
static void ct_xfitimer_irq_stop(struct ct_timer *atimer) { if (atimer->running) { struct hw *hw = atimer->atc->hw; hw->set_timer_irq(hw, 0); hw->set_timer_tick(hw, 0); atimer->running = 0; } }
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cttimer.c
static void ct_xfitimer_free_global(struct ct_timer *atimer) { ct_xfitimer_irq_stop(atimer); }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cttimer.c
void ct_timer_prepare(struct ct_timer_instance *ti) { if (ti->timer_base->ops->prepare) ti->timer_base->ops->prepare(ti); ti->position = 0; ti->running = 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cttimer.c
void ct_timer_instance_free(struct ct_timer_instance *ti) { struct ct_timer *atimer = ti->timer_base; atimer->ops->stop(ti); if (atimer->ops->free_instance) atimer->ops->free_instance(ti); spin_lock_irq(&atimer->list_lock); list_del(&ti->instance_list); spin_unlock_irq(&atimer->list_lock); kfree(ti...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cttimer.c
void ct_timer_free(struct ct_timer *atimer) { struct hw *hw = atimer->atc->hw; hw->irq_callback = NULL; if (atimer->ops->free_global) atimer->ops->free_global(atimer); kfree(atimer); }
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/ctvmem.c
static void put_vm_block(struct ct_vm *vm, struct ct_vm_block *block) { struct ct_vm_block *entry, *pre_ent; struct list_head *pos, *pre; block->size = CT_PAGE_ALIGN(block->size); mutex_lock(&vm->lock); list_del(&block->list); vm->size += block->size; list_for_each(pos, &vm->unused) { entry = list_...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctvmem.c
static dma_addr_t ct_get_ptp_phys(struct ct_vm *vm, int index) { return (index >= CT_PTP_NUM) ? ~0UL : vm->ptp[index].addr; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctvmem.c
int ct_vm_create(struct ct_vm **rvm, struct pci_dev *pci) { struct ct_vm *vm; struct ct_vm_block *block; int i, err = 0; *rvm = NULL; vm = kzalloc(sizeof(*vm), GFP_KERNEL); if (!vm) return -ENOMEM; mutex_init(&vm->lock); for (i = 0; i < CT_PTP_NUM; i++) { err = snd_dma_alloc_pages(SNDRV_DMA_...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/xfi.c
static int ct_card_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) { static int dev; struct snd_card *card; struct ct_atc *atc; int err; if (dev >= SNDRV_CARDS) return -ENODEV; if (!enable[dev]) { dev++; return -ENOENT; } err = snd_card_new(&pci->dev...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/xfi.c
static void ct_card_remove(struct pci_dev *pci) { snd_card_free(pci_get_drvdata(pci)); }
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/darla20_dsp.c
static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) { int err; if (snd_BUG_ON((subdevice_id & 0xfff0) != DARLA20)) return -ENODEV; err = init_dsp_comm_page(chip); if (err) { dev_err(chip->card->dev, "init_hw: could not initialize DSP comm page\n"); return err; } chip->...
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/darla20_dsp.c
static int set_mixer_defaults(struct echoaudio *chip) { return init_line_levels(chip); }
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/darla24_dsp.c
static int set_mixer_defaults(struct echoaudio *chip) { return init_line_levels(chip); }
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/darla24_dsp.c
static int set_sample_rate(struct echoaudio *chip, u32 rate) { u8 clock; switch (rate) { case 96000: clock = GD24_96000; break; case 88200: clock = GD24_88200; break; case 48000: clock = GD24_48000; break; case 44100: clock = GD24_44100; break; case 32000: clock = GD24...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/darla24_dsp.c
static int set_input_clock(struct echoaudio *chip, u16 clock) { if (snd_BUG_ON(clock != ECHO_CLOCK_INTERNAL && clock != ECHO_CLOCK_ESYNC)) return -EINVAL; chip->input_clock = clock; return set_sample_rate(chip, chip->sample_rate); }
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio.c
static int get_firmware(const struct firmware **fw_entry, struct echoaudio *chip, const short fw_index) { int err; char name[30]; #ifdef CONFIG_PM_SLEEP if (chip->fw_cache[fw_index]) { dev_dbg(chip->card->dev, "firmware requested: %s is cached\n", card_fw[fw_index].data)...
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio.c
static void free_firmware_cache(struct echoaudio *chip) { #ifdef CONFIG_PM_SLEEP int i; for (i = 0; i < 8; i++) if (chip->fw_cache[i]) { release_firmware(chip->fw_cache[i]); dev_dbg(chip->card->dev, "release_firmware(%d)\n", i); } #endif }
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio.c
static int hw_rule_capture_channels_by_format(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule) { struct snd_interval *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); ...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio.c
static int pcm_close(struct snd_pcm_substream *substream) { struct echoaudio *chip = snd_pcm_substream_chip(substream); mutex_lock(&chip->mode_mutex); dev_dbg(chip->card->dev, "pcm_open opencount=%d can_set_rate=%d, rate_set=%d", chip->opencount, chip->can_set_rate, chip->rate_set); chip->opencount...
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio.c
static int snd_echo_output_gain_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { struct echoaudio *chip; chip = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = num_busses_out(chip); uinfo->value.integer.min = EC...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio.c
static int snd_echo_input_gain_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { struct echoaudio *chip; chip = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = num_analog_busses_in(chip); uinfo->value.integer.min ...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio.c
static int snd_echo_input_gain_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct echoaudio *chip; int c; chip = snd_kcontrol_chip(kcontrol); for (c = 0; c < num_analog_busses_in(chip); c++) ucontrol->value.integer.value[c] = chip->input_gai...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio.c
static int snd_echo_input_nominal_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct echoaudio *chip; int c; chip = snd_kcontrol_chip(kcontrol); for (c = 0; c < num_analog_busses_in(chip); c++) ucontrol->value.integer.value[c] = c...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio.c
static int snd_echo_input_nominal_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct echoaudio *chip; int c, changed; changed = 0; chip = snd_kcontrol_chip(kcontrol); spin_lock_irq(&chip->lock); for (c = 0; c < num_analog_busses_in(chip); ...
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio.c
static int snd_echo_mixer_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; uinfo->value.integer.min = ECHOGAIN_MINOUT; uinfo->value.integer.max = ECHOGAIN_MAXOUT; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio.c
static int snd_echo_digital_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static const char *const names[4] = {"S/PDIF Coaxial", "S/PDIF Optical", "ADAT Optical", "S/PDIF Cdrom"}; struct echoaudio *chip; ch...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio.c
static int snd_echo_spdif_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct echoaudio *chip; chip = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = !!chip->professional_spdif; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio.c
static int snd_echo_spdif_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct echoaudio *chip; int mode; chip = snd_kcontrol_chip(kcontrol); mode = !!ucontrol->value.enumerated.item[0]; if (mode != chip->professional_spdif) { spin_lock...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio.h
static inline int bx_analog_in(const struct echoaudio *chip) { return BX_ANALOG_IN; }
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio_3g.c
static u32 set_spdif_bits(struct echoaudio *chip, u32 control_reg, u32 rate) { control_reg &= E3G_SPDIF_FORMAT_CLEAR_MASK; switch (rate) { case 32000: control_reg |= E3G_SPDIF_SAMPLE_RATE0 | E3G_SPDIF_SAMPLE_RATE1; break; case 44100: if (chip->professional_spdif) control_reg |= E3G_SPDIF_SA...
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio_dsp.c
static int load_firmware(struct echoaudio *chip) { const struct firmware *fw; int box_type, err; if (snd_BUG_ON(!chip->comm_page)) return -EPERM; if (chip->dsp_code) { box_type = check_asic_status(chip); if (box_type >= 0) return box_type; /* ASIC check failed; force the DSP to reload */...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio_dsp.c
static int stop_transport(struct echoaudio *chip, u32 channel_mask) { if (wait_handshake(chip)) return -EIO; chip->comm_page->cmd_stop |= cpu_to_le32(channel_mask); chip->comm_page->cmd_reset |= cpu_to_le32(channel_mask); if (chip->comm_page->cmd_reset) { clear_handshake(chip); send_vector(chip, D...
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio_dsp.c
static int allocate_pipes(struct echoaudio *chip, struct audiopipe *pipe, int pipe_index, int interleave) { int i; u32 channel_mask; dev_dbg(chip->card->dev, "allocate_pipes: ch=%d int=%d\n", pipe_index, interleave); if (chip->bad_board) return -EIO; for (channel_mas...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio_dsp.c
static int free_pipes(struct echoaudio *chip, struct audiopipe *pipe) { u32 channel_mask; int i; if (snd_BUG_ON(!is_pipe_allocated(chip, pipe->index))) return -EINVAL; if (snd_BUG_ON(pipe->state != PIPE_STATE_STOPPED)) return -EINVAL; for (channel_mask = i = 0; i < pipe->interleave; i++) chann...
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio_dsp.c
static int sglist_init(struct echoaudio *chip, struct audiopipe *pipe) { pipe->sglist_head = 0; memset(pipe->sgpage.area, 0, PAGE_SIZE); chip->comm_page->sglist_addr[pipe->index].addr = cpu_to_le32(pipe->sgpage.addr); return 0; }
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio_dsp.c
static inline int sglist_add_irq(struct echoaudio *chip, struct audiopipe *pipe) { return sglist_add_mapping(chip, pipe, 0, 0); }
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio_gml.c
static int check_asic_status(struct echoaudio *chip) { u32 asic_status; send_vector(chip, DSP_VC_TEST_ASIC); if (read_dsp(chip, &asic_status) < 0) { dev_err(chip->card->dev, "check_asic_status: failed on read_dsp\n"); chip->asic_loaded = false; return -EIO; } chip->asic_loaded = (asic_status ==...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/echoaudio_gml.c
static int write_control_reg(struct echoaudio *chip, u32 value, char force) { __le32 reg_value; if (chip->digital_in_automute) value |= GML_DIGITAL_IN_AUTO_MUTE; else value &= ~GML_DIGITAL_IN_AUTO_MUTE; dev_dbg(chip->card->dev, "write_control_reg: 0x%x\n", value); /* Write the control register */ ...
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/gina20_dsp.c
static u32 detect_input_clocks(const struct echoaudio *chip) { u32 clocks_from_dsp, clock_bits; clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks); clock_bits = ECHO_CLOCK_BIT_INTERNAL; if (clocks_from_dsp & GLDM_CLOCK_DETECT_BIT_SPDIF) clock_bits |= ECHO_CLOCK_BIT_SPDIF; return clock_bits;...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/gina20_dsp.c
static int set_input_clock(struct echoaudio *chip, u16 clock) { switch (clock) { case ECHO_CLOCK_INTERNAL: chip->clock_state = GD_CLOCK_UNDEF; chip->spdif_status = GD_SPDIF_STATUS_UNDEF; set_sample_rate(chip, chip->sample_rate); chip->input_clock = clock; break; case ECHO_CLOCK_SPDIF: ch...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/gina20_dsp.c
static int update_flags(struct echoaudio *chip) { if (wait_handshake(chip)) return -EIO; clear_handshake(chip); return send_vector(chip, DSP_VC_UPDATE_FLAGS); }
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/gina24_dsp.c
static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) { int err; if (snd_BUG_ON((subdevice_id & 0xfff0) != GINA24)) return -ENODEV; err = init_dsp_comm_page(chip); if (err) { dev_err(chip->card->dev, "init_hw - could not initialize DSP comm page\n"); return err; } chip->...
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/gina24_dsp.c
static int set_mixer_defaults(struct echoaudio *chip) { chip->digital_mode = DIGITAL_MODE_SPDIF_RCA; chip->professional_spdif = false; chip->digital_in_automute = true; return init_line_levels(chip); }
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/gina24_dsp.c
static int load_asic(struct echoaudio *chip) { u32 control_reg; int err; short asic; if (chip->asic_loaded) return 1; mdelay(10); /* Pick the correct ASIC for '301 or '361 Gina24 */ if (chip->device_id == DEVICE_ID_56361) asic = FW_GINA24_361_ASIC; else asic = FW_GINA24_301_ASIC; err =...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/gina24_dsp.c
static int set_input_clock(struct echoaudio *chip, u16 clock) { u32 control_reg, clocks_from_dsp; control_reg = le32_to_cpu(chip->comm_page->control_register) & GML_CLOCK_CLEAR_MASK; clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks); switch (clock) { case ECHO_CLOCK_INTERNAL: chip->inp...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/indigodj_dsp.c
static int set_vmixer_gain(struct echoaudio *chip, u16 output, u16 pipe, int gain) { int index; if (snd_BUG_ON(pipe >= num_pipes_out(chip) || output >= num_busses_out(chip))) return -EINVAL; if (wait_handshake(chip)) return -EIO; chip->vmixer_gain[output][pipe] = gain; in...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/indigoio_dsp.c
static int set_sample_rate(struct echoaudio *chip, u32 rate) { if (wait_handshake(chip)) return -EIO; chip->sample_rate = rate; chip->comm_page->sample_rate = cpu_to_le32(rate); clear_handshake(chip); return send_vector(chip, DSP_VC_UPDATE_CLOCKS); }
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/indigoio_dsp.c
static int set_vmixer_gain(struct echoaudio *chip, u16 output, u16 pipe, int gain) { int index; if (snd_BUG_ON(pipe >= num_pipes_out(chip) || output >= num_busses_out(chip))) return -EINVAL; if (wait_handshake(chip)) return -EIO; chip->vmixer_gain[output][pipe] = gain; in...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/indigo_dsp.c
static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) { int err; if (snd_BUG_ON((subdevice_id & 0xfff0) != INDIGO)) return -ENODEV; err = init_dsp_comm_page(chip); if (err) { dev_err(chip->card->dev, "init_hw - could not initialize DSP comm page\n"); return err; } chip->...
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/indigo_dsp.c
static u32 detect_input_clocks(const struct echoaudio *chip) { return ECHO_CLOCK_BIT_INTERNAL; }
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/indigo_dsp.c
static int update_vmixer_level(struct echoaudio *chip) { if (wait_handshake(chip)) return -EIO; clear_handshake(chip); return send_vector(chip, DSP_VC_SET_VMIXER_GAIN); }
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/indigo_express_dsp.c
static int update_vmixer_level(struct echoaudio *chip) { if (wait_handshake(chip)) return -EIO; clear_handshake(chip); return send_vector(chip, DSP_VC_SET_VMIXER_GAIN); }
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/layla20_dsp.c
static int set_output_clock(struct echoaudio *chip, u16 clock) { switch (clock) { case ECHO_CLOCK_SUPER: clock = LAYLA20_OUTPUT_CLOCK_SUPER; break; case ECHO_CLOCK_WORD: clock = LAYLA20_OUTPUT_CLOCK_WORD; break; default: dev_err(chip->card->dev, "set_output_clock wrong clock\n"); retur...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/layla20_dsp.c
static int set_input_gain(struct echoaudio *chip, u16 input, int gain) { if (snd_BUG_ON(input >= num_busses_in(chip))) return -EINVAL; if (wait_handshake(chip)) return -EIO; chip->input_gain[input] = gain; gain += GL20_INPUT_GAIN_MAGIC_NUMBER; chip->comm_page->line_in_level[input] = gain; return 0...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/layla20_dsp.c
static int set_professional_spdif(struct echoaudio *chip, char prof) { if (prof) chip->comm_page->flags |= cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF); else chip->comm_page->flags &= ~cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF); chip->professional_spdif = prof; return update_flags(chip); }
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/layla24_dsp.c
static int load_asic(struct echoaudio *chip) { int err; if (chip->asic_loaded) return 1; mdelay(10); /* Load the ASIC for the PCI card */ err = load_asic_generic(chip, DSP_FNC_LOAD_LAYLA24_PCI_CARD_ASIC, FW_LAYLA24_1_ASIC); if (err < 0) return err; chip->asic_code = F...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/layla24_dsp.c
static int dsp_set_digital_mode(struct echoaudio *chip, u8 mode) { u32 control_reg; int err, incompatible_clock; short asic; incompatible_clock = false; switch (mode) { case DIGITAL_MODE_SPDIF_OPTICAL: case DIGITAL_MODE_SPDIF_RCA: if (chip->input_clock == ECHO_CLOCK_ADAT) incompatible_clock = t...
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/mia_dsp.c
static int set_sample_rate(struct echoaudio *chip, u32 rate) { u32 control_reg; switch (rate) { case 96000: control_reg = MIA_96000; break; case 88200: control_reg = MIA_88200; break; case 48000: control_reg = MIA_48000; break; case 44100: control_reg = MIA_44100; break; c...
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/mia_dsp.c
static int set_input_clock(struct echoaudio *chip, u16 clock) { dev_dbg(chip->card->dev, "set_input_clock(%d)\n", clock); if (snd_BUG_ON(clock != ECHO_CLOCK_INTERNAL && clock != ECHO_CLOCK_SPDIF)) return -EINVAL; chip->input_clock = clock; return set_sample_rate(chip, chip->sample_rate); }
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/midi.c
static int midi_service_irq(struct echoaudio *chip) { short int count, midi_byte, i, received; count = le16_to_cpu(chip->comm_page->midi_input[0]); if (snd_BUG_ON(count >= MIDI_IN_BUFFER_SIZE)) return 0; /* Get the MIDI data from the comm page */ received = 0; for (i = 1; i <= count; i++) { /* Ge...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/midi.c
static int snd_echo_midi_output_open(struct snd_rawmidi_substream *substream) { struct echoaudio *chip = substream->rmidi->private_data; chip->tinuse = 0; chip->midi_full = 0; chip->midi_out = substream; return 0; }
[ 1, 0 ]
Linux Kernel
sound/pci/echoaudio/mona_dsp.c
static int set_mixer_defaults(struct echoaudio *chip) { chip->digital_mode = DIGITAL_MODE_SPDIF_RCA; chip->professional_spdif = false; chip->digital_in_automute = true; return init_line_levels(chip); }
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/mona_dsp.c
static int load_asic(struct echoaudio *chip) { u32 control_reg; int err; short asic; if (chip->asic_loaded) return 0; mdelay(10); if (chip->device_id == DEVICE_ID_56361) asic = FW_MONA_361_1_ASIC48; else asic = FW_MONA_301_1_ASIC48; err = load_asic_generic(chip, DSP_FNC_LOAD_MONA_PCI_CAR...
[ 0, 0 ]
Linux Kernel
sound/pci/echoaudio/mona_dsp.c
static int switch_asic(struct echoaudio *chip, char double_speed) { int err; short asic; if (chip->device_id == DEVICE_ID_56361) { if (double_speed) asic = FW_MONA_361_1_ASIC96; else asic = FW_MONA_361_1_ASIC48; } else { if (double_speed) asic = FW_MONA_301_1_ASIC96; else ...
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1x.c
static unsigned int snd_emu10k1x_ptr_read(struct emu10k1x *emu, unsigned int reg, unsigned int chn) { unsigned long flags; unsigned int regptr, val; regptr = (reg << 16) | chn; spin_lock_irqsave(&emu->emu_lock, flags); outl(regptr, emu->port + PTR); val = inl(emu...
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1x.c
static void snd_emu10k1x_intr_disable(struct emu10k1x *emu, unsigned int intrenb) { unsigned long flags; unsigned int intr_enable; spin_lock_irqsave(&emu->emu_lock, flags); intr_enable = inl(emu->port + INTE) & ~intrenb; outl(intr_enable, emu->port + INTE); spin_unloc...
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1x.c
static void snd_emu10k1x_gpio_write(struct emu10k1x *emu, unsigned int value) { unsigned long flags; spin_lock_irqsave(&emu->emu_lock, flags); outl(value, emu->port + GPIO); spin_unlock_irqrestore(&emu->emu_lock, flags); }
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1x.c
static int snd_emu10k1x_playback_close(struct snd_pcm_substream *substream) { return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1x.c
static int snd_emu10k1x_pcm_prepare(struct snd_pcm_substream *substream) { struct emu10k1x *emu = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct emu10k1x_pcm *epcm = runtime->private_data; int voice = epcm->voice->number; u32 *table_base = (u32 *)(emu->dma_buff...
[ 1, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1x.c
static int snd_emu10k1x_pcm_hw_free_capture(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct emu10k1x_pcm *epcm; if (runtime->private_data == NULL) return 0; epcm = runtime->private_data; if (epcm->voice) { epcm->voice->use = 0; epcm->voice->ep...
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1x.c
static void snd_emu10k1x_free(struct snd_card *card) { struct emu10k1x *chip = card->private_data; snd_emu10k1x_ptr_write(chip, TRIGGER_CHANNEL, 0, 0); outl(0, chip->port + INTE); // disable audio outl(HCFG_LOCKSOUNDCACHE, chip->port + HCFG); }
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1x.c
static void snd_emu10k1x_proc_reg_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct emu10k1x *emu = entry->private_data; unsigned long value, value1, value2; unsigned long flags; int i; snd_iprintf(buffer, "Registers:\n\n"); for (i = 0; i < ...
[ 1, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1x.c
static int snd_emu10k1x_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; uinfo->count = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1x.c
static void do_emu10k1x_midi_interrupt(struct emu10k1x *emu, struct emu10k1x_midi *midi, unsigned int status) { unsigned char byte; if (midi->rmidi == NULL) { snd_emu10k1x_intr_disable(emu, midi->tx_enable | midi->rx_enable); ret...
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1x.c
static int snd_emu10k1x_midi_cmd(struct emu10k1x *emu, struct emu10k1x_midi *midi, unsigned char cmd, int ack) { unsigned long flags; int timeout, ok; spin_lock_irqsave(&midi->input_lock, flags); mpu401_write_data(emu, midi, 0x00); mpu401_wri...
[ 1, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1x.c
static int snd_emu10k1x_midi_input_open(struct snd_rawmidi_substream *substream) { struct emu10k1x *emu; struct emu10k1x_midi *midi = substream->rmidi->private_data; unsigned long flags; emu = midi->emu; if (snd_BUG_ON(!emu)) return -ENXIO; spin_lock_irqsave(&midi->open_lock, flags); midi->midi_mode...
[ 1, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1x.c
static int emu10k1x_midi_init(struct emu10k1x *emu, struct emu10k1x_midi *midi, int device, char *name) { struct snd_rawmidi *rmidi; int err; err = snd_rawmidi_new(emu->card, name, device, 1, 1, &rmidi); if (err < 0) return err; midi->emu = emu; spin_lock_init(&midi->open...
[ 1, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1x.c
static int snd_emu10k1x_midi(struct emu10k1x *emu) { struct emu10k1x_midi *midi = &emu->midi; int err; err = emu10k1x_midi_init(emu, midi, 0, "EMU10K1X MPU-401 (UART)"); if (err < 0) return err; midi->tx_enable = INTE_MIDITXENABLE; midi->rx_enable = INTE_MIDIRXENABLE; midi->port = MUDATA; midi->i...
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1x.c
static int snd_emu10k1x_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) { return snd_card_free_on_error(&pci->dev, __snd_emu10k1x_probe(pci, pci_id)); }
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1_callback.c
void snd_emu10k1_ops_setup(struct snd_emux *emux) { emux->ops = emu10k1_ops; }
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1_callback.c
static void terminate_voice(struct snd_emux_voice *vp) { struct snd_emu10k1 *hw; if (snd_BUG_ON(!vp)) return; hw = vp->hw; snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, 0x807f | DCYSUSV_CHANNELENABLE_MASK); if (vp->block) { struct snd_emu10k1_memblk *emem; emem = (struct snd_...
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1_callback.c
static void free_voice(struct snd_emux_voice *vp) { struct snd_emu10k1 *hw; hw = vp->hw; /* FIXME: emu10k1_synth is broken. */ /* This can get called with hw == 0 */ /* Problem apparent on plug, unplug then plug */ /* on the Audigy 2 ZS Notebook. */ if (hw && (vp->ch >= 0)) { snd_emu10k1_ptr_write(hw...
[ 1, 1 ]
Linux Kernel
sound/pci/emu10k1/emu10k1_callback.c
static void update_voice(struct snd_emux_voice *vp, int update) { struct snd_emu10k1 *hw; hw = vp->hw; if (update & SNDRV_EMUX_UPDATE_VOLUME) snd_emu10k1_ptr_write(hw, IFATN_ATTENUATION, vp->ch, vp->avol); if (update & SNDRV_EMUX_UPDATE_PITCH) snd_emu10k1_ptr_write(hw, IP, vp->ch, vp->apitch); if (up...
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1_callback.c
static struct snd_emux_voice *get_voice(struct snd_emux *emu, struct snd_emux_port *port) { struct snd_emu10k1 *hw; struct snd_emux_voice *vp; struct best_voice best[V_END]; int i; hw = emu->hw; lookup_voices(emu, hw, best, 0); for (i = 0; i < V_END; i++) { if...
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1_callback.c
static void set_fm2frq2(struct snd_emu10k1 *hw, struct snd_emux_voice *vp) { unsigned short fm2frq2; short pitch; unsigned char freq; int modulation; pitch = (char)(vp->reg.parm.fm2frq2 >> 8); freq = vp->reg.parm.fm2frq2 & 0xff; modulation = vp->chan->gm_modulation + vp->chan->midi_pressure; pitch += (...
[ 1, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1_callback.c
static void set_filterQ(struct snd_emu10k1 *hw, struct snd_emux_voice *vp) { unsigned int val; val = snd_emu10k1_ptr_read(hw, CCCA, vp->ch) & ~CCCA_RESONANCE; val |= (vp->reg.parm.filterQ << 28); snd_emu10k1_ptr_write(hw, CCCA, vp->ch, val); }
[ 0, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1_main.c
static void snd_emu10k1_ecard_write(struct snd_emu10k1 *emu, unsigned int value) { unsigned short count; unsigned int data; unsigned long hc_port; unsigned int hc_value; hc_port = emu->port + HCFG; hc_value = inl(hc_port) & ~(HOOKN_BIT | HANDN_BIT | PULSEN_BIT); outl(h...
[ 1, 0 ]
Linux Kernel
sound/pci/emu10k1/emu10k1_main.c
static int snd_emu10k1_ecard_init(struct snd_emu10k1 *emu) { unsigned int hc_value; emu->ecard_ctrl = EC_RAW_RUN_MODE | EC_SPDIF0_SELECT(EC_DEFAULT_SPDIF0_SEL) | EC_SPDIF1_SELECT(EC_DEFAULT_SPDIF1_SEL); /* Step 0: Set the codec type in the hardware control register * and enable audio outp...
[ 1, 1 ]