repo_name
string
dataset
string
owner
string
lang
string
func_name
string
code
string
docstring
string
url
string
sha
string
SBEMU
github_2023
crazii
c
ct_alsa_pcm_create
int ct_alsa_pcm_create(struct ct_atc *atc, enum CTALSADEVS device, const char *device_name) { struct snd_pcm *pcm; const struct snd_pcm_chmap_elem *map; int chs; int err; int playback_count, capture_count; playback_count = (IEC958 == device) ? 1 : 256; capture_count = (FRONT == device) ? 1 : 0...
/* Create ALSA pcm device */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/ctxfi/ctpcm.c#L423-L488
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
get_resource
static int get_resource(u8 *rscs, unsigned int amount, unsigned int multi, unsigned int *ridx) { int i, j, k, n; /* Check whether there are sufficient resources to meet request. */ for (i = 0, n = multi; i < amount; i++) { j = i / 8; k = i % 8; if (rscs[j] & ((u8)1 << k)) { n = multi; continue; ...
/* Resource allocation based on bit-map management mechanism */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/ctxfi/ctresource.c#L22-L56
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
srcimp_master
static void srcimp_master(struct rsc *rsc) { rsc->conj = 0; rsc->idx = container_of(rsc, struct srcimp, rsc)->idx[0]; }
/* SRCIMP resource manager operations */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/ctxfi/ctsrc.c#L593-L597
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
ct_systimer_callback
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; unsigned...
/* * system-timer-based updates */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/ctxfi/cttimer.c#L63-L89
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
ct_xfitimer_reprogram
static int ct_xfitimer_reprogram(struct ct_timer *atimer, int can_update) { struct ct_timer_instance *ti; unsigned int min_intr = (unsigned int)-1; int updates = 0; unsigned int wc, diff; if (list_empty(&atimer->running_head)) { ct_xfitimer_irq_stop(atimer); atimer->reprogram = 0; /* clear flag */ return 0;...
/* * reprogram the timer interval; * checks the running instance list and determines the next timer interval. * also updates the each stream position, returns the number of streams * to call snd_pcm_period_elapsed() appropriately * * call this inside the lock and irq disabled */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/ctxfi/cttimer.c#L179-L235
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
ct_xfitimer_check_period
static void ct_xfitimer_check_period(struct ct_timer *atimer) { struct ct_timer_instance *ti; unsigned long flags; spin_lock_irqsave(&atimer->list_lock, flags); list_for_each_entry(ti, &atimer->instance_head, instance_list) { if (ti->running && ti->need_update) { ti->need_update = 0; ti->apcm->interrupt(ti...
/* look through the instance list and call period_elapsed if needed */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/ctxfi/cttimer.c#L238-L251
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
ct_xfitimer_callback
static void ct_xfitimer_callback(struct ct_timer *atimer) { int update; unsigned long flags; spin_lock_irqsave(&atimer->lock, flags); atimer->irq_handling = 1; do { update = ct_xfitimer_reprogram(atimer, 1); spin_unlock(&atimer->lock); if (update) ct_xfitimer_check_period(atimer); spin_lock(&atimer->lo...
/* Handle timer-interrupt */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/ctxfi/cttimer.c#L254-L270
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
ct_xfitimer_update
static void ct_xfitimer_update(struct ct_timer *atimer) { unsigned long flags; spin_lock_irqsave(&atimer->lock, flags); if (atimer->irq_handling) { /* reached from IRQ handler; let it handle later */ atimer->reprogram = 1; spin_unlock_irqrestore(&atimer->lock, flags); return; } ct_xfitimer_irq_stop(atime...
/* start/stop the timer */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/ctxfi/cttimer.c#L281-L296
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
ct_timer_interrupt
static void ct_timer_interrupt(void *data, unsigned int status) { struct ct_timer *timer = data; /* Interval timer interrupt */ if ((status & IT_INT) && timer->ops->interrupt) timer->ops->interrupt(timer); }
/* * timer manager */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/ctxfi/cttimer.c#L405-L412
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
ct_get_ptp_phys
static dma_addr_t ct_get_ptp_phys(struct ct_vm *vm, int index) { return (index >= CT_PTP_NUM) ? ~0UL : vm->ptp[index].addr; }
/* * * return the host physical addr of the @index-th device * page table page on success, or ~0UL on failure. * The first returned ~0UL indicates the termination. * */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/ctxfi/ctvmem.c#L166-L170
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
ct_vm_destroy
void ct_vm_destroy(struct ct_vm *vm) { int i; struct list_head *pos; struct ct_vm_block *entry; /* free used and unused list nodes */ while (!list_empty(&vm->used)) { pos = vm->used.next; list_del(pos); entry = list_entry(pos, struct ct_vm_block, list); kfree(entry); } while (!list_empty(&vm->unused)) {...
/* The caller must ensure no mapping pages are being used * by hardware before calling this function */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/ctxfi/ctvmem.c#L218-L245
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_emu10k1x_playback_open
int snd_emu10k1x_playback_open(struct snd_pcm_substream *substream) { struct emu10k1x *chip = snd_pcm_substream_chip(substream); struct emu10k1x_pcm *epcm; struct snd_pcm_runtime *runtime = substream->runtime; int err; #if 0 err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); if (err < 0) ...
/* open callback */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/emu10k1/emu10k1x.c#L368-L396
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_emu10k1x_playback_close
static int snd_emu10k1x_playback_close(struct snd_pcm_substream *substream) { return 0; }
/* close callback */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/emu10k1/emu10k1x.c#L399-L402
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_emu10k1x_pcm_hw_params
int snd_emu10k1x_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { struct snd_pcm_runtime *runtime = substream->runtime; struct emu10k1x_pcm *epcm = runtime->private_data; if (! epcm->voice) { epcm->voice = &epcm->emu->voices[substream->pcm->d...
/* hw_params callback */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/emu10k1/emu10k1x.c#L405-L418
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_emu10k1x_pcm_hw_free
static int snd_emu10k1x_pcm_hw_free(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->epcm = NULL; epcm-...
/* hw_free callback */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/emu10k1/emu10k1x.c#L421-L438
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_emu10k1x_pcm_prepare
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_buffer->area+102...
/* prepare callback */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/emu10k1/emu10k1x.c#L441-L467
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_emu10k1x_pcm_trigger
int snd_emu10k1x_pcm_trigger(struct snd_pcm_substream *substream, int cmd) { struct emu10k1x *emu = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct emu10k1x_pcm *epcm = runtime->private_data; int channel = epcm->voice->number; int result ...
/* trigger callback */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/emu10k1/emu10k1x.c#L470-L504
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_emu10k1x_pcm_pointer
snd_pcm_uframes_t snd_emu10k1x_pcm_pointer(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 channel = epcm->voice->number; snd_pcm_uframes_t ptr = 0, ptr1 = 0...
/* pointer callback */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/emu10k1/emu10k1x.c#L507-L536
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_emu10k1x_pcm_open_capture
static int snd_emu10k1x_pcm_open_capture(struct snd_pcm_substream *substream) { struct emu10k1x *chip = snd_pcm_substream_chip(substream); struct emu10k1x_pcm *epcm; struct snd_pcm_runtime *runtime = substream->runtime; int err; #if 0 err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); if (...
/* open_capture callback */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/emu10k1/emu10k1x.c#L550-L579
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_emu10k1x_pcm_close_capture
static int snd_emu10k1x_pcm_close_capture(struct snd_pcm_substream *substream) { return 0; }
/* close callback */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/emu10k1/emu10k1x.c#L582-L585
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_emu10k1x_pcm_hw_params_capture
static int snd_emu10k1x_pcm_hw_params_capture(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { struct snd_pcm_runtime *runtime = substream->runtime; struct emu10k1x_pcm *epcm = runtime->private_data; if (! epcm->voice) { if (epcm->emu->capture_voice.use) return -EBUSY; e...
/* hw_params callback */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/emu10k1/emu10k1x.c#L588-L603
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_emu10k1x_pcm_hw_free_capture
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->epcm = NULL; ...
/* hw_free callback */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/emu10k1/emu10k1x.c#L606-L623
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_emu10k1x_pcm_prepare_capture
static int snd_emu10k1x_pcm_prepare_capture(struct snd_pcm_substream *substream) { struct emu10k1x *emu = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; snd_emu10k1x_ptr_write(emu, CAPTURE_DMA_ADDR, 0, runtime->dma_addr); snd_emu10k1x_ptr_write(emu, CAPTURE_BUFFER_SIZE, 0,...
/* prepare capture callback */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/emu10k1/emu10k1x.c#L626-L637
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_emu10k1x_pcm_trigger_capture
static int snd_emu10k1x_pcm_trigger_capture(struct snd_pcm_substream *substream, int cmd) { struct emu10k1x *emu = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct emu10k1x_pcm *epcm = runtime->private_data; int result = 0; switch (cmd) { case SNDRV_PCM_TRI...
/* trigger_capture callback */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/emu10k1/emu10k1x.c#L640-L666
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_emu10k1x_pcm_pointer_capture
static snd_pcm_uframes_t snd_emu10k1x_pcm_pointer_capture(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; snd_pcm_uframes_t ptr; if (!epcm->running) return 0;...
/* pointer_capture callback */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/emu10k1/emu10k1x.c#L669-L685
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
do_emu10k1x_midi_interrupt
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); return; } spin_lock(&midi->input_lock); if ((status & midi->ipr_rx) && m...
/* */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/emu10k1/emu10k1x.c#L1235-L1267
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_outw
static inline void snd_m3_outw(struct snd_m3 *chip, u16 value, unsigned long reg) { outw(value, chip->iobase + reg); }
/* * lowlevel functions */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L202-L205
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_assp_read
static u16 snd_m3_assp_read(struct snd_m3 *chip, u16 region, u16 index) { snd_m3_outw(chip, region & MEMTYPE_MASK, DSP_PORT_MEMORY_TYPE); snd_m3_outw(chip, index, DSP_PORT_MEMORY_INDEX); return snd_m3_inw(chip, DSP_PORT_MEMORY_DATA); }
/* * access 16bit words to the code or data regions of the dsp's memory. * index addresses 16bit words. */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L226-L231
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_add_list
static int snd_m3_add_list(struct snd_m3 *chip, struct m3_list *list, u16 val) { snd_m3_assp_write(chip, MEMTYPE_INTERNAL_DATA, list->mem_addr + list->curlen, val); return list->curlen++; }
/* * This makes me sad. the maestro3 has lists * internally that must be packed.. 0 terminates, * apparently, or maybe all unused entries have * to be 0, the lists have static lengths set * by the binary code images. */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L261-L267
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_pcm_start
static int snd_m3_pcm_start(struct snd_m3 *chip, struct m3_dma *s, struct snd_pcm_substream *subs) { if (! s || ! subs) return -EINVAL; snd_m3_inc_timer_users(chip); switch (subs->stream) { case SNDRV_PCM_STREAM_PLAYBACK: chip->dacs_active++; snd_m3_assp_write(chip, MEMTYPE_INTERNAL_DATA, s->ins...
/* * start/stop */ /* spinlock held! */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L334-L358
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_pcm_stop
static int snd_m3_pcm_stop(struct snd_m3 *chip, struct m3_dma *s, struct snd_pcm_substream *subs) { if (! s || ! subs) return -EINVAL; snd_m3_assp_write(chip, MEMTYPE_INTERNAL_DATA, s->inst.data + CDATA_INSTANCE_READY, 0); snd_m3_dec_timer_users(chip); switch (subs->stream) { case SNDRV_PCM_STREAM_PL...
/* spinlock held! */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L361-L383
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_pcm_setup1
static void snd_m3_pcm_setup1(struct snd_m3 *chip, struct m3_dma *s, struct snd_pcm_substream *subs) { int dsp_in_size, dsp_out_size, dsp_in_buffer, dsp_out_buffer; struct snd_pcm_runtime *runtime = subs->runtime; if (subs->stream == SNDRV_PCM_STREAM_PLAYBACK) { dsp_in_size = MINISRC_IN_BUFFER_SIZE - (0x20 * 2);...
/* * setup */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L423-L506
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_playback_setup
static void snd_m3_playback_setup(struct snd_m3 *chip, struct m3_dma *s, struct snd_pcm_substream *subs) { unsigned int i; /* * some per client initializers */ snd_m3_assp_write(chip, MEMTYPE_INTERNAL_DATA, s->inst.data + SRC3_DIRECTION_OFFSET + 12, s->inst.data + 40 + 8); snd_m3_assp_write...
/* the mode passed should be already shifted and masked */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L575-L609
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_get_pointer
static unsigned int snd_m3_get_pointer(struct snd_m3 *chip, struct m3_dma *s, struct snd_pcm_substream *subs) { u16 hi = 0, lo = 0; int retry = 10; u32 addr; /* * try and get a valid answer */ while (retry--) { hi = snd_m3_assp_read(chip, MEMTYPE_INTERNAL_DATA, s->inst.data + CDATA_HOST_SRC_CURR...
/* * get current pointer */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L730-L753
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_update_ptr
static void snd_m3_update_ptr(struct snd_m3 *chip, struct m3_dma *s) { struct snd_pcm_substream *subs = s->substream; unsigned int hwptr; int diff; if (! s->running) return; hwptr = snd_m3_get_pointer(chip, s, subs); /* try to avoid expensive modulo divisions */ if (hwptr >= s->dma_size) hwptr %= s->dma_s...
/* update pointer */ /* spinlock held! */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L774-L808
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_update_hw_volume
static void snd_m3_update_hw_volume (struct snd_m3 *chip) // (struct work_struct *work) { //struct snd_m3 *chip = container_of(work, struct snd_m3, hwvol_work); int x, val; /* Figure out which volume control button was pushed, based on differences from the default register values. */ x = inb(chip->iobase +...
/* The m3's hardware volume works by incrementing / decrementing 2 counters (without wrap around) in response to volume button presses and then generating an interrupt. The pair of counters is stored in bits 1-3 and 5-7 of a byte wide register. The meaning of bits 0 and 4 is unknown. */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L818-L909
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_substream_open
static int snd_m3_substream_open(struct snd_m3 *chip, struct snd_pcm_substream *subs) { int i; struct m3_dma *s; spin_lock_irq(&chip->reg_lock); for (i = 0; i < chip->num_substreams; i++) { s = &chip->substreams[i]; if (! s->opened) goto __found; } spin_unlock_irq(&chip->reg_lock); return -ENOMEM; __foun...
/* */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L1020-L1051
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_ac97_wait
static int snd_m3_ac97_wait(struct snd_m3 *chip) { int i = 10000; do { if (! (snd_m3_inb(chip, 0x30) & 1)) return 0; cpu_relax(); } while (i-- > 0); dev_err(chip->card->dev, "ac97 serial bus busy\n"); return 1; }
/* * ac97 interface */ /* * Wait for the ac97 serial bus to be free. * return nonzero if the bus is still busy. */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L1185-L1197
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_try_read_vendor
static int snd_m3_try_read_vendor(struct snd_m3 *chip) { u16 ret; if (snd_m3_ac97_wait(chip)) return 1; //printk("wait ok\n"); snd_m3_outb(chip, 0x80 | (AC97_VENDOR_ID1 & 0x7f), 0x30); if (snd_m3_ac97_wait(chip)) return 1; ret = snd_m3_inw(chip, 0x32); //printk("ac97 vendor: %4.4X\n", ret);...
/* * hack, returns non zero on err */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L1304-L1321
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_amp_enable
static void snd_m3_amp_enable(struct snd_m3 *chip, int enable) { int io = chip->iobase; u16 gpo, polarity; if (! chip->external_amp) return; polarity = enable ? 0 : 1; polarity = polarity << chip->amp_gpio; gpo = 1 << chip->amp_gpio; outw(~gpo, io + GPIO_MASK); outw(inw(io + GPIO_DIRECTION) | gpo, i...
/* * this works for the reference board, have to find * out about others * * this needs more magic for 4 speaker, but.. */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L1599-L1621
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_free
static void snd_m3_free(struct snd_card *card) { struct snd_m3 *chip = card->private_data; struct m3_dma *s; int i; #if 0 cancel_work_sync(&chip->hwvol_work); #endif if (chip->substreams) { spin_lock_irq(&chip->reg_lock); for (i = 0; i < chip->num_substreams; i++) { s = &chip->substreams[i]; /* check s...
/* */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L1751-L1783
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_m3_probe
int snd_m3_probe (struct snd_card *card, struct pci_dev *pci, int probe_only, int spdif, int enable_amp, int amp_gpio) { struct snd_m3 *chip; int i, err; u32 iobase; const struct snd_pci_quirk *quirk; if (pcim_enable_device(pci)) return -EIO; /* check, if we ca...
/* CONFIG_INPUT */ /* */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L1906-L2082
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
__snd_m3_probe
static int __snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) { static int dev; struct snd_card *card; struct snd_m3 *chip; int err; /* don't pick up modems */ if (((pci->class >> 8) & 0xffff) != PCI_CLASS_MULTIMEDIA_AUDIO) return -ENODEV; if (dev >= SNDRV_CARDS) return -ENODEV; if (!...
/* */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/maestro3/maestro3.c#L2087-L2151
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
oxygen_write_ac97
void oxygen_write_ac97(struct oxygen *chip, unsigned int codec, unsigned int index, u16 data) { unsigned int count, succeeded; u32 reg; reg = data; reg |= index << OXYGEN_AC97_REG_ADDR_SHIFT; reg |= OXYGEN_AC97_REG_DIR_WRITE; reg |= codec << OXYGEN_AC97_REG_CODEC_SHIFT; succeeded = 0; for (count = 5; ...
/* * About 10% of AC'97 register reads or writes fail to complete, but even those * where the controller indicates completion aren't guaranteed to have actually * happened. * * It's hard to assign blame to either the controller or the codec because both * were made by C-Media ... */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/oxygen/oxygen_io.c#L124-L146
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
oxygen_pci_shutdown
void oxygen_pci_shutdown(struct pci_dev *pci) { struct snd_card *card = pci_get_drvdata(pci); struct oxygen *chip = card->private_data; oxygen_shutdown(chip); chip->model.cleanup(chip); }
/* CONFIG_PM_SLEEP */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/oxygen/oxygen_lib.c#L838-L845
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
output_select_apply
static int output_select_apply(struct oxygen *chip) { struct dg *data = chip->model_data; data->cs4245_shadow[CS4245_SIGNAL_SEL] &= ~CS4245_A_OUT_SEL_MASK; if (data->output_sel == PLAYBACK_DST_HP) { /* mute FP (aux output) amplifier, switch rear jack to CS4245 */ oxygen_set_bits8(chip, OXYGEN_GPIO_DATA, GPIO_HP...
/* analog output select */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/oxygen/xonar_dg_mixer.c#L22-L45
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
hp_stereo_volume_info
static int hp_stereo_volume_info(struct snd_kcontrol *ctl, struct snd_ctl_elem_info *info) { info->type = SNDRV_CTL_ELEM_TYPE_INTEGER; info->count = 2; info->value.integer.min = 0; info->value.integer.max = 255; return 0; }
/* CS4245 Headphone Channels A&B Volume Control */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/oxygen/xonar_dg_mixer.c#L94-L102
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
hp_mute_get
static int hp_mute_get(struct snd_kcontrol *ctl, struct snd_ctl_elem_value *val) { struct oxygen *chip = ctl->private_data; struct dg *data = chip->model_data; mutex_lock(&chip->mutex); val->value.integer.value[0] = !(data->cs4245_shadow[CS4245_DAC_CTRL_1] & CS4245_MUTE_DAC); mutex_unlock(&chip->mutex); ret...
/* Headphone Mute */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/oxygen/xonar_dg_mixer.c#L194-L205
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
input_volume_apply
static int input_volume_apply(struct oxygen *chip, char left, char right) { struct dg *data = chip->model_data; int ret; data->cs4245_shadow[CS4245_PGA_A_CTRL] = left; data->cs4245_shadow[CS4245_PGA_B_CTRL] = right; ret = cs4245_write_spi(chip, CS4245_PGA_A_CTRL); if (ret < 0) return ret; return cs4245_write_...
/* capture volume for all sources */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/oxygen/xonar_dg_mixer.c#L229-L240
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
input_source_apply
static int input_source_apply(struct oxygen *chip) { struct dg *data = chip->model_data; data->cs4245_shadow[CS4245_ANALOG_IN] &= ~CS4245_SEL_MASK; if (data->input_sel == CAPTURE_SRC_FP_MIC) data->cs4245_shadow[CS4245_ANALOG_IN] |= CS4245_SEL_INPUT_2; else if (data->input_sel == CAPTURE_SRC_LINE) data->cs4245_...
/* Capture Source */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/oxygen/xonar_dg_mixer.c#L299-L311
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
hpf_info
static int hpf_info(struct snd_kcontrol *ctl, struct snd_ctl_elem_info *info) { static const char *const names[2] = { "Active", "Frozen" }; return snd_ctl_enum_info(info, 1, 2, names); }
/* ADC high-pass filter */
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/oxygen/xonar_dg_mixer.c#L364-L369
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_codec_read
static unsigned short snd_trident_codec_read(struct snd_ac97 *ac97, unsigned short reg) { unsigned int data = 0, treg; unsigned short count = 0xffff; unsigned long flags; struct snd_trident *trident = ac97->private_data; spin_lock_irqsave(&trident->reg_lock, flags); if (trident->device == TRIDENT_DEVICE_ID_DX) {...
/*--------------------------------------------------------------------------- unsigned short snd_trident_codec_read(struct snd_ac97 *ac97, unsigned short reg) Description: This routine will do all of the reading from the external CODEC (AC97). Parameters: ac97 - ac97 codec structure ...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L124-L170
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_codec_write
static void snd_trident_codec_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short wdata) { unsigned int address, data; unsigned short count = 0xffff; unsigned long flags; struct snd_trident *trident = ac97->private_data; data = ((unsigned long) wdata) << 16; spin_lock_irqsave(&trident->reg_l...
/*--------------------------------------------------------------------------- void snd_trident_codec_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short wdata) Description: This routine will do all of the writing to the external CODEC (AC97). Parameters: ac97 - ac97 codec s...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L186-L240
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_enable_eso
static void snd_trident_enable_eso(struct snd_trident * trident) { unsigned int val; val = inl(TRID_REG(trident, T4D_LFO_GC_CIR)); val |= ENDLP_IE; val |= MIDLP_IE; if (trident->device == TRIDENT_DEVICE_ID_SI7018) val |= BANK_B_EN; outl(val, TRID_REG(trident, T4D_LFO_GC_CIR)); }
/*--------------------------------------------------------------------------- void snd_trident_enable_eso(struct snd_trident *trident) Description: This routine will enable end of loop interrupts. End of loop interrupts will occur when a running channel reaches ESO. ...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L307-L317
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_disable_eso
static void snd_trident_disable_eso(struct snd_trident * trident) { unsigned int tmp; tmp = inl(TRID_REG(trident, T4D_LFO_GC_CIR)); tmp &= ~ENDLP_IE; tmp &= ~MIDLP_IE; outl(tmp, TRID_REG(trident, T4D_LFO_GC_CIR)); }
/*--------------------------------------------------------------------------- void snd_trident_disable_eso(struct snd_trident *trident) Description: This routine will disable end of loop interrupts. End of loop interrupts will occur when a running channel reaches ESO. ...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L334-L342
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_start_voice
void snd_trident_start_voice(struct snd_trident * trident, unsigned int voice) { unsigned int mask = 1 << (voice & 0x1f); unsigned int reg = (voice & 0x20) ? T4D_START_B : T4D_START_A; outl(mask, TRID_REG(trident, reg)); }
/*--------------------------------------------------------------------------- void snd_trident_start_voice(struct snd_trident * trident, unsigned int voice) Description: Start a voice, any channel 0 thru 63. This routine automatically handles the fact that there are more than 3...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L358-L364
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_stop_voice
void snd_trident_stop_voice(struct snd_trident * trident, unsigned int voice) { unsigned int mask = 1 << (voice & 0x1f); unsigned int reg = (voice & 0x20) ? T4D_STOP_B : T4D_STOP_A; outl(mask, TRID_REG(trident, reg)); }
/*--------------------------------------------------------------------------- void snd_trident_stop_voice(struct snd_trident * trident, unsigned int voice) Description: Stop a voice, any channel 0 thru 63. This routine automatically handles the fact that there are more than 32 ...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L382-L388
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_allocate_pcm_channel
static int snd_trident_allocate_pcm_channel(struct snd_trident * trident) { int idx; if (trident->ChanPCMcnt >= trident->ChanPCM) return -1; for (idx = 31; idx >= 0; idx--) { if (!(trident->ChanMap[T4D_BANK_B] & (1 << idx))) { trident->ChanMap[T4D_BANK_B] |= 1 << idx; trident->ChanPCMcnt++; return idx ...
/*--------------------------------------------------------------------------- int snd_trident_allocate_pcm_channel(struct snd_trident *trident) Description: Allocate hardware channel in Bank B (32-63). Parameters : trident - pointer to target device class for 4DWave. Return Value: hardware cha...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L403-L417
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_free_pcm_channel
static void snd_trident_free_pcm_channel(struct snd_trident *trident, int channel) { if (channel < 32 || channel > 63) return; channel &= 0x1f; if (trident->ChanMap[T4D_BANK_B] & (1 << channel)) { trident->ChanMap[T4D_BANK_B] &= ~(1 << channel); trident->ChanPCMcnt--; } }
/*--------------------------------------------------------------------------- void snd_trident_free_pcm_channel(int channel) Description: Free hardware channel in Bank B (32-63) Parameters : trident - pointer to target device class for 4DWave. channel - hardware channel number 0-63 ...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L431-L440
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_allocate_synth_channel
static int snd_trident_allocate_synth_channel(struct snd_trident * trident) { int idx; for (idx = 31; idx >= 0; idx--) { if (!(trident->ChanMap[T4D_BANK_A] & (1 << idx))) { trident->ChanMap[T4D_BANK_A] |= 1 << idx; trident->synth.ChanSynthCount++; return idx; } } return -1; }
/*--------------------------------------------------------------------------- unsigned int snd_trident_allocate_synth_channel(void) Description: Allocate hardware channel in Bank A (0-31). Parameters : trident - pointer to target device class for 4DWave. Return Value: hardware channel - 0-31 o...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L453-L465
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_free_synth_channel
static void snd_trident_free_synth_channel(struct snd_trident *trident, int channel) { if (channel < 0 || channel > 31) return; channel &= 0x1f; if (trident->ChanMap[T4D_BANK_A] & (1 << channel)) { trident->ChanMap[T4D_BANK_A] &= ~(1 << channel); trident->synth.ChanSynthCount--; } }
/*--------------------------------------------------------------------------- void snd_trident_free_synth_channel( int channel ) Description: Free hardware channel in Bank B (0-31). Parameters : trident - pointer to target device class for 4DWave. channel - hardware channel number 0-63 ...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L479-L488
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_write_voice_regs
void snd_trident_write_voice_regs(struct snd_trident * trident, struct snd_trident_voice * voice) { unsigned int FmcRvolCvol; unsigned int regs[5]; regs[1] = voice->LBA; regs[4] = (voice->GVSel << 31) | ((voice->Pan & 0x0000007f) << 24) | ((voice->CTRL & 0x0000000f) << 12); FmcRvolCvol = ((voice->FM...
/*--------------------------------------------------------------------------- snd_trident_write_voice_regs Description: This routine will complete and write the 5 hardware channel registers to hardware. Parameters: trident - pointer to target device class for 4DWave. voic...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L502-L569
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_write_cso_reg
static void snd_trident_write_cso_reg(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned int CSO) { voice->CSO = CSO; outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); if (trident->device != TRIDENT_DEVICE_ID_NX) { outw(voice->CSO, TRID_REG(trident, CH_DX_CSO_ALPHA_F...
/*--------------------------------------------------------------------------- snd_trident_write_cso_reg Description: This routine will write the new CSO offset register to hardware. Parameters: trident - pointer to target device class for 4DWave. voice - synthesizer voice...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L585-L597
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_write_eso_reg
static void snd_trident_write_eso_reg(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned int ESO) { voice->ESO = ESO; outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); if (trident->device != TRIDENT_DEVICE_ID_NX) { outw(voice->ESO, TRID_REG(trident, CH_DX_ESO_DELTA) ...
/*--------------------------------------------------------------------------- snd_trident_write_eso_reg Description: This routine will write the new ESO offset register to hardware. Parameters: trident - pointer to target device class for 4DWave. voice - synthesizer voice...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L611-L623
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_write_vol_reg
static void snd_trident_write_vol_reg(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned int Vol) { voice->Vol = Vol; outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); switch (trident->device) { case TRIDENT_DEVICE_ID_DX: case TRIDENT_DEVICE_ID_NX: outb(voice->Vol ...
/*--------------------------------------------------------------------------- snd_trident_write_vol_reg Description: This routine will write the new voice volume register to hardware. Parameters: trident - pointer to target device class for 4DWave. voice - synthesizer voi...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L637-L654
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_write_pan_reg
static void snd_trident_write_pan_reg(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned int Pan) { voice->Pan = Pan; outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); outb(((voice->GVSel & 0x01) << 7) | (voice->Pan & 0x7f), TRID_REG(trident, CH_GVSEL_PAN_VOL_CTR...
/*--------------------------------------------------------------------------- snd_trident_write_pan_reg Description: This routine will write the new voice pan register to hardware. Parameters: trident - pointer to target device class for 4DWave. voice - synthesizer voice ...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L668-L676
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_write_rvol_reg
static void snd_trident_write_rvol_reg(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned int RVol) { voice->RVol = RVol; outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); outw(((voice->FMC & 0x0003) << 14) | ((voice->RVol & 0x007f) << 7) | (voice->CVol & 0x007...
/*--------------------------------------------------------------------------- snd_trident_write_rvol_reg Description: This routine will write the new reverb volume register to hardware. Parameters: trident - pointer to target device class for 4DWave. voice - synthesizer v...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L690-L700
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_write_cvol_reg
static void snd_trident_write_cvol_reg(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned int CVol) { voice->CVol = CVol; outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); outw(((voice->FMC & 0x0003) << 14) | ((voice->RVol & 0x007f) << 7) | (voice->CVol & 0x007...
/*--------------------------------------------------------------------------- snd_trident_write_cvol_reg Description: This routine will write the new chorus volume register to hardware. Parameters: trident - pointer to target device class for 4DWave. voice - synthesizer v...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L714-L724
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_convert_rate
static unsigned int snd_trident_convert_rate(unsigned int rate) { unsigned int delta; // We special case 44100 and 8000 since rounding with the equation // does not give us an accurate enough value. For 11025 and 22050 // the equation gives us the best answer. All other frequencies will // also use the equation. ...
/*--------------------------------------------------------------------------- snd_trident_convert_rate Description: This routine converts rate in HZ to hardware delta value. Parameters: trident - pointer to target device class for 4DWave. rate - Real or Virtual channel number. Return...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L737-L754
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_convert_adc_rate
static unsigned int snd_trident_convert_adc_rate(unsigned int rate) { unsigned int delta; // We special case 44100 and 8000 since rounding with the equation // does not give us an accurate enough value. For 11025 and 22050 // the equation gives us the best answer. All other frequencies will // also use the equati...
/*--------------------------------------------------------------------------- snd_trident_convert_adc_rate Description: This routine converts rate in HZ to hardware delta value. Parameters: trident - pointer to target device class for 4DWave. rate - Real or Virtual channel number. Re...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L767-L784
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_spurious_threshold
static unsigned int snd_trident_spurious_threshold(unsigned int rate, unsigned int period_size) { unsigned int res = (rate * period_size) / 48000; if (res < 64) res = res / 2; else res -= 32; return res; }
/*--------------------------------------------------------------------------- snd_trident_spurious_threshold Description: This routine converts rate in HZ to spurious threshold. Parameters: trident - pointer to target device class for 4DWave. rate - Real or Virtual channel number. Re...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L797-L806
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_control_mode
static unsigned int snd_trident_control_mode(struct snd_pcm_substream *substream) { unsigned int CTRL; struct snd_pcm_runtime *runtime = substream->runtime; /* set ctrl mode CTRL default: 8-bit (unsigned) mono, loop mode enabled */ CTRL = 0x00000001; if (snd_pcm_format_width(runtime->format) == 16) CTRL |...
/*--------------------------------------------------------------------------- snd_trident_control_mode Description: This routine returns a control mode for a PCM channel. Parameters: trident - pointer to target device class for 4DWave. substream - PCM substream Returns: Control ...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L819-L835
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_ioctl
static int snd_trident_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg) { /* FIXME: it seems that with small periods the behaviour of trident hardware is unpredictable and interrupt generator is broken */ #if 0 return snd_pcm_lib_ioctl(substream, cmd, arg);...
/* * PCM part */ /*--------------------------------------------------------------------------- snd_trident_ioctl Description: Device I/O control handler for playback/capture parameters. Parameters: substream - PCM substream class cmd - what ioctl message to process ...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L854-L865
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_allocate_pcm_mem
static int snd_trident_allocate_pcm_mem(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_trident_voice *voice = runtime->private_data; int err; if ((err...
/*--------------------------------------------------------------------------- snd_trident_allocate_pcm_mem Description: Allocate PCM ring buffer for given substream Parameters: substream - PCM substream class hw_params - hardware parameters Returns: Error status ----------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L879-L899
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_allocate_evoice
static int snd_trident_allocate_evoice(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_trident_voice *voice = runtime->private_data; struct snd_tri...
/*--------------------------------------------------------------------------- snd_trident_allocate_evoice Description: Allocate extra voice as interrupt generator Parameters: substream - PCM substream class hw_params - hardware parameters Returns: Error status ------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L913-L939
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_hw_params
int snd_trident_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { int err; err = snd_trident_allocate_pcm_mem(substream, hw_params); if (err >= 0) err = snd_trident_allocate_evoice(substream, hw_params); return err; }
/*--------------------------------------------------------------------------- snd_trident_hw_params Description: Set the hardware parameters for the playback device. Parameters: substream - PCM substream class hw_params - hardware parameters Returns: Error status ---------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L953-L962
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_hw_free
static int snd_trident_hw_free(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_trident_voice *voice = runtime->private_data; struct snd_trident_voice *evoice = voice ? voice->extra : NULL; if (...
/*--------------------------------------------------------------------------- snd_trident_playback_hw_free Description: Release the hardware resources for the playback device. Parameters: substream - PCM substream class Returns: Error status ----------------------------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L975-L994
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_playback_prepare
int snd_trident_playback_prepare(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_trident_voice *voice = runtime->private_data; struct snd_trident_voice *evoice = voice->extra; struct snd_trident...
/*--------------------------------------------------------------------------- snd_trident_playback_prepare Description: Prepare playback device for playback. Parameters: substream - PCM substream class Returns: Error status ----------------------------------------------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L1007-L1080
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_capture_hw_params
static int snd_trident_capture_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { return snd_trident_allocate_pcm_mem(substream, hw_params); }
/*--------------------------------------------------------------------------- snd_trident_capture_hw_params Description: Set the hardware parameters for the capture device. Parameters: substream - PCM substream class hw_params - hardware parameters Returns: Error status --------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L1094-L1098
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_capture_prepare
static int snd_trident_capture_prepare(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_trident_voice *voice = runtime->private_data; unsigned int val, ESO_bytes; spin_lock_irq(&trident->reg_loc...
/*--------------------------------------------------------------------------- snd_trident_capture_prepare Description: Prepare capture device for playback. Parameters: substream - PCM substream class Returns: Error status ------------------------------------------------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L1111-L1189
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_si7018_capture_hw_params
static int snd_trident_si7018_capture_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { int err; if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) return err; return snd_trident_allocate_evoice(substream, hw_params); }
/*--------------------------------------------------------------------------- snd_trident_si7018_capture_hw_params Description: Set the hardware parameters for the capture device. Parameters: substream - PCM substream class hw_params - hardware parameters Returns: Error status -------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L1203-L1212
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_si7018_capture_hw_free
static int snd_trident_si7018_capture_hw_free(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_trident_voice *voice = runtime->private_data; struct snd_trident_voice *evoice = voice ? voice->extra...
/*--------------------------------------------------------------------------- snd_trident_si7018_capture_hw_free Description: Release the hardware resources for the capture device. Parameters: substream - PCM substream class Returns: Error status -----------------------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L1225-L1238
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_si7018_capture_prepare
static int snd_trident_si7018_capture_prepare(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_trident_voice *voice = runtime->private_data; struct snd_trident_voice *evoice = voice->extra; spin...
/*--------------------------------------------------------------------------- snd_trident_si7018_capture_prepare Description: Prepare capture device for playback. Parameters: substream - PCM substream class Returns: Error status -----------------------------------------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L1251-L1309
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_foldback_prepare
static int snd_trident_foldback_prepare(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_trident_voice *voice = runtime->private_data; struct snd_trident_voice *evoice = voice->extra; spin_lock_...
/*--------------------------------------------------------------------------- snd_trident_foldback_prepare Description: Prepare foldback capture device for playback. Parameters: substream - PCM substream class Returns: Error status --------------------------------------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L1322-L1386
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_spdif_hw_params
static int snd_trident_spdif_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { struct snd_trident *trident = snd_pcm_substream_chip(substream); unsigned int old_bits = 0, change = 0; int err; err = snd_trident_allocate_pcm_mem(substream, hw_params); if (err < 0) re...
/*--------------------------------------------------------------------------- snd_trident_spdif_hw_params Description: Set the hardware parameters for the spdif device. Parameters: substream - PCM substream class hw_params - hardware parameters Returns: Error status ------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L1400-L1454
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_spdif_prepare
static int snd_trident_spdif_prepare(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_trident_voice *voice = runtime->private_data; struct snd_trident_voice *evoice = voice->extra; struct snd_tri...
/*--------------------------------------------------------------------------- snd_trident_spdif_prepare Description: Prepare SPDIF device for playback. Parameters: substream - PCM substream class Returns: Error status ----------------------------------------------------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L1467-L1592
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_trigger
int snd_trident_trigger(struct snd_pcm_substream *substream, int cmd) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_substream *s; unsigned int what, whati, capture_flag, spdif_flag; struct snd_trident_voice *voice, *evoice; unsigned int val, go; ...
/*--------------------------------------------------------------------------- snd_trident_trigger Description: Start/stop devices Parameters: substream - PCM substream class cmd - trigger command (STOP, GO) Returns: Error status ------------------------------------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L1606-L1692
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_playback_pointer
snd_pcm_uframes_t snd_trident_playback_pointer(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_trident_voice *voice = runtime->private_data; unsigned int cso; if (!voice->running) return 0; ...
/*--------------------------------------------------------------------------- snd_trident_playback_pointer Description: This routine return the playback position Parameters: substream - PCM substream class Returns: position of buffer -------------------------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L1705-L1731
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_capture_pointer
static snd_pcm_uframes_t snd_trident_capture_pointer(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_trident_voice *voice = runtime->private_data; unsigned int result; if (!voice->running) re...
/*--------------------------------------------------------------------------- snd_trident_capture_pointer Description: This routine return the capture position Parameters: pcm1 - PCM device class Returns: position of buffer -------------------------------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L1744-L1761
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_spdif_pointer
static snd_pcm_uframes_t snd_trident_spdif_pointer(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_trident_voice *voice = runtime->private_data; unsigned int result; if (!voice->running) retu...
/*--------------------------------------------------------------------------- snd_trident_spdif_pointer Description: This routine return the SPDIF playback position Parameters: substream - PCM substream class Returns: position of buffer ----------------------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L1774-L1787
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_playback_close
static int snd_trident_playback_close(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_trident_voice *voice = runtime->private_data; snd_trident_pcm_mixer_free(trident, voice, substream); return...
/*--------------------------------------------------------------------------- snd_trident_playback_close Description: This routine will close the 4DWave playback device. For now we will simply free the dma transfer buffer. Parameters: substream - PCM substream class ---...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L1968-L1976
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_spdif_open
static int snd_trident_spdif_open(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_trident_voice *voice; struct snd_pcm_runtime *runtime = substream->runtime; voice = snd_trident_alloc_voice(trident, SNDRV_TRIDENT_VOICE_TYPE_PCM, 0, 0); if (voice ...
/*--------------------------------------------------------------------------- snd_trident_spdif_open Description: This routine will open the 4DWave SPDIF device. Parameters: substream - PCM substream class Returns: status - success or failure flag --------------------------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L1989-L2020
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_spdif_close
static int snd_trident_spdif_close(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); unsigned int temp; spin_lock_irq(&trident->reg_lock); // restore default SPDIF setting if (trident->device != TRIDENT_DEVICE_ID_SI7018) { outb(trident->spdif_ctrl, TRID_REG(...
/*--------------------------------------------------------------------------- snd_trident_spdif_close Description: This routine will close the 4DWave SPDIF device. Parameters: substream - PCM substream class ---------------------------------------------------------------------------*/
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L2032-L2059
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_capture_open
static int snd_trident_capture_open(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_trident_voice *voice; struct snd_pcm_runtime *runtime = substream->runtime; voice = snd_trident_alloc_voice(trident, SNDRV_TRIDENT_VOICE_TYPE_PCM, 0, 0); if (voice...
/*--------------------------------------------------------------------------- snd_trident_capture_open Description: This routine will open the 4DWave capture device. Parameters: substream - PCM substream class Returns: status - success or failure flag ------------------------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L2072-L2091
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_capture_close
static int snd_trident_capture_close(struct snd_pcm_substream *substream) { return 0; }
/*--------------------------------------------------------------------------- snd_trident_capture_close Description: This routine will close the 4DWave capture device. For now we will simply free the dma transfer buffer. Parameters: substream - PCM substream class -----...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L2102-L2105
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_foldback_open
static int snd_trident_foldback_open(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_trident_voice *voice; struct snd_pcm_runtime *runtime = substream->runtime; voice = snd_trident_alloc_voice(trident, SNDRV_TRIDENT_VOICE_TYPE_PCM, 0, 0); if (voic...
/*--------------------------------------------------------------------------- snd_trident_foldback_open Description: This routine will open the 4DWave foldback capture device. Parameters: substream - PCM substream class Returns: status - success or failure flag --------------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L2118-L2136
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_foldback_close
static int snd_trident_foldback_close(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_trident_voice *voice; struct snd_pcm_runtime *runtime = substream->runtime; voice = runtime->private_data; /* stop capture channel */ spin_lock_irq(&trident->r...
/*--------------------------------------------------------------------------- snd_trident_foldback_close Description: This routine will close the 4DWave foldback capture device. For now we will simply free the dma transfer buffer. Parameters: substream - PCM substream class ---------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L2147-L2159
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_pcm
int snd_trident_pcm(struct snd_trident *trident, int device) { struct snd_pcm *pcm; int err; if ((err = snd_pcm_new(trident->card, "trident_dx_nx", device, trident->ChanPCM, 1, &pcm)) < 0) return err; pcm->private_data = trident; if (trident->tlb.entries) { snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &s...
/*--------------------------------------------------------------------------- snd_trident_pcm Description: This routine registers the 4DWave device for PCM support. Parameters: trident - pointer to target device class for 4DWave. Returns: None ---------------------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L2267-L2307
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_foldback_pcm
int snd_trident_foldback_pcm(struct snd_trident *trident, int device) { struct snd_pcm *foldback; int err; int num_chan = 3; struct snd_pcm_substream *substream; if (trident->device == TRIDENT_DEVICE_ID_NX) num_chan = 4; if ((err = snd_pcm_new(trident->card, "trident_dx_nx", device, 0, num_chan, &foldback)) < ...
/*--------------------------------------------------------------------------- snd_trident_foldback_pcm Description: This routine registers the 4DWave device for foldback PCM support. Parameters: trident - pointer to target device class for 4DWave. Returns: None ---------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L2320-L2359
f0cbde063396deb2c1246c9b3108a37755c68e9a
SBEMU
github_2023
crazii
c
snd_trident_spdif_pcm
int snd_trident_spdif_pcm(struct snd_trident *trident, int device) { struct snd_pcm *spdif; int err; if ((err = snd_pcm_new(trident->card, "trident_dx_nx IEC958", device, 1, 0, &spdif)) < 0) return err; spdif->private_data = trident; if (trident->device != TRIDENT_DEVICE_ID_SI7018) { snd_pcm_set_ops(spdif, S...
/*--------------------------------------------------------------------------- snd_trident_spdif Description: This routine registers the 4DWave-NX device for SPDIF support. Parameters: trident - pointer to target device class for 4DWave-NX. Returns: None -----------------------...
https://github.com/crazii/SBEMU/blob/f0cbde063396deb2c1246c9b3108a37755c68e9a/drivers/trident/trident_main.c#L2372-L2393
f0cbde063396deb2c1246c9b3108a37755c68e9a