Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | sound/pci/asihpi/hpimsginit.c | static void hpi_init_messageV1(struct hpi_message_header *phm, u16 size,
u16 object, u16 function) {
memset(phm, 0, size);
if ((object > 0) && (object <= HPI_OBJ_MAXINDEX)) {
phm->size = size;
phm->type = HPI_TYPE_REQUEST;
phm->object = object;
phm->function = function... | [
1,
0
] |
Linux Kernel | sound/pci/asihpi/hpimsginit.c |
void hpi_init_responseV1(struct hpi_response_header *phr, u16 size, u16 object,
u16 function) {
(void)object;
(void)function;
memset(phr, 0, size);
phr->size = size;
phr->version = 1;
phr->type = HPI_TYPE_RESPONSE;
phr->error = HPI_ERROR_PROCESSING_MESSAGE;
} | [
1,
0
] |
Linux Kernel | sound/pci/asihpi/hpimsgx.c |
static inline void hw_entry_point(struct hpi_message *phm,
struct hpi_response *phr) {
if ((phm->adapter_index < HPI_MAX_ADAPTERS) &&
hpi_entry_points[phm->adapter_index])
hpi_entry_points[phm->adapter_index](phm, phr);
else
hpi_init_response(phr, phm->object, phm->f... | [
1,
0
] |
Linux Kernel | sound/pci/asihpi/hpimsgx.c |
static void mixer_message(struct hpi_message *phm, struct hpi_response *phr) {
switch (phm->function) {
case HPI_MIXER_OPEN:
mixer_open(phm, phr);
break;
case HPI_MIXER_CLOSE:
mixer_close(phm, phr);
break;
default:
hw_entry_point(phm, phr);
break;
}
} | [
0,
0
] |
Linux Kernel | sound/pci/asihpi/hpimsgx.c |
static void adapter_open(struct hpi_message *phm, struct hpi_response *phr) {
HPI_DEBUG_LOG(VERBOSE, "adapter_open\n");
memcpy(phr, &rESP_HPI_ADAPTER_OPEN[phm->adapter_index],
sizeof(rESP_HPI_ADAPTER_OPEN[0]));
} | [
1,
0
] |
Linux Kernel | sound/pci/asihpi/hpimsgx.c |
static void mixer_close(struct hpi_message *phm, struct hpi_response *phr) {
hpi_init_response(phr, HPI_OBJ_MIXER, HPI_MIXER_CLOSE, 0);
} | [
0,
0
] |
Linux Kernel | sound/pci/asihpi/hpimsgx.c | static u16 HPIMSGX__init(struct hpi_message *phm,
/* resource list or NULL=find all */
struct hpi_response *phr
/* response from HPI_ADAPTER_GET_INFO */
) {
hpi_handler_func *entry_point_func;
struct hpi_response hr;
/* Init response her... | [
1,
0
] |
Linux Kernel | sound/pci/asihpi/hpioctl.c | static void hpi_send_recv_f(struct hpi_message *phm, struct hpi_response *phr,
struct file *file) {
if ((phm->adapter_index >= HPI_MAX_ADAPTERS) &&
(phm->object != HPI_OBJ_SUBSYSTEM))
phr->error = HPI_ERROR_INVALID_OBJ_INDEX;
else
hpi_send_recv_ex(phm, phr, file);
} | [
1,
0
] |
Linux Kernel | sound/pci/asihpi/hpioctl.c |
static irqreturn_t asihpi_isr_thread(int irq, void *dev_id) {
struct hpi_adapter *a = dev_id;
if (a->interrupt_callback)
a->interrupt_callback(a);
return IRQ_HANDLED;
} | [
0,
0
] |
Linux Kernel | sound/pci/asihpi/hpios.h | static inline void cond_lock(struct hpios_spinlock *l) {
if (irqs_disabled()) {
spin_lock(&((l)->lock));
l->lock_context = IN_LOCK_IRQ;
} else {
spin_lock_bh(&((l)->lock));
l->lock_context = IN_LOCK_BH;
}
} | [
0,
0
] |
Linux Kernel | sound/pci/atiixp.c | static int snd_atiixp_update_bits(struct atiixp *chip, unsigned int reg,
unsigned int mask, unsigned int value) {
void __iomem *addr = chip->remap_addr + reg;
unsigned int data, old_data;
old_data = data = readl(addr);
data &= ~mask;
data |= value;
if (old_data == data)
... | [
1,
0
] |
Linux Kernel | sound/pci/atiixp.c | static int atiixp_build_dma_packets(struct atiixp *chip, struct atiixp_dma *dma,
struct snd_pcm_substream *substream,
unsigned int periods,
unsigned int period_bytes) {
unsigned int i;
u32 addr, desc_addr;
... | [
1,
0
] |
Linux Kernel | sound/pci/atiixp.c |
static void snd_atiixp_codec_write(struct atiixp *chip, unsigned short codec,
unsigned short reg, unsigned short val) {
unsigned int data;
if (snd_atiixp_acquire_codec(chip) < 0)
return;
data = ((unsigned int)val << ATI_REG_PHYS_OUT_DATA_SHIFT) |
((unsigned int)r... | [
0,
0
] |
Linux Kernel | sound/pci/atiixp.c | static int snd_atiixp_chip_stop(struct atiixp *chip) {
atiixp_write(chip, ISR, atiixp_read(chip, ISR));
/* disable irqs */
atiixp_write(chip, IER, 0);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/atiixp.c | static void snd_atiixp_xrun_dma(struct atiixp *chip, struct atiixp_dma *dma) {
if (!dma->substream || !dma->running)
return;
dev_dbg(chip->card->dev, "XRUN detected (DMA %d)\n", dma->ops->type);
snd_pcm_stop_xrun(dma->substream);
} | [
1,
0
] |
Linux Kernel | sound/pci/atiixp.c | static void atiixp_out_flush_dma(struct atiixp *chip) {
atiixp_write(chip, FIFO_FLUSH, ATI_REG_FIFO_OUT_FLUSH);
} | [
0,
0
] |
Linux Kernel | sound/pci/atiixp.c | static void atiixp_out_enable_dma(struct atiixp *chip, int on) {
unsigned int data;
data = atiixp_read(chip, CMD);
if (on) {
if (data & ATI_REG_CMD_OUT_DMA_EN)
return;
atiixp_out_flush_dma(chip);
data |= ATI_REG_CMD_OUT_DMA_EN;
} else
data &= ~ATI_REG_CMD_OUT_DMA_EN;
atiixp_write(chip, C... | [
0,
0
] |
Linux Kernel | sound/pci/atiixp.c | static void atiixp_out_enable_transfer(struct atiixp *chip, int on) {
atiixp_update(chip, CMD, ATI_REG_CMD_SEND_EN, on ? ATI_REG_CMD_SEND_EN : 0);
} | [
0,
0
] |
Linux Kernel | sound/pci/atiixp.c | static void atiixp_in_enable_transfer(struct atiixp *chip, int on) {
if (on) {
unsigned int data = atiixp_read(chip, CMD);
if (!(data & ATI_REG_CMD_RECEIVE_EN)) {
data |= ATI_REG_CMD_RECEIVE_EN;
#if 0 /* FIXME: this causes the endless loop */
/* wait until slot 3/4 are finished */
while ((atiixp_r... | [
1,
1
] |
Linux Kernel | sound/pci/atiixp.c | static void atiixp_spdif_enable_dma(struct atiixp *chip, int on) {
atiixp_update(chip, CMD, ATI_REG_CMD_SPDF_DMA_EN,
on ? ATI_REG_CMD_SPDF_DMA_EN : 0);
} | [
0,
0
] |
Linux Kernel | sound/pci/atiixp.c | static int snd_atiixp_pcm_close(struct snd_pcm_substream *substream,
struct atiixp_dma *dma) {
struct atiixp *chip = snd_pcm_substream_chip(substream);
if (snd_BUG_ON(!dma->ops || !dma->ops->enable_dma))
return -EINVAL;
spin_lock_irq(&chip->reg_lock);
dma->ops->enable_dma(ch... | [
1,
0
] |
Linux Kernel | sound/pci/atiixp.c |
static int snd_atiixp_spdif_close(struct snd_pcm_substream *substream) {
struct atiixp *chip = snd_pcm_substream_chip(substream);
int err;
mutex_lock(&chip->open_mutex);
if (chip->spdif_over_aclink)
err = snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_PLAYBACK]);
else
err = snd_atiixp_pcm_close(... | [
0,
0
] |
Linux Kernel | sound/pci/atiixp.c | static int snd_atiixp_mixer_new(struct atiixp *chip, int clock,
const char *quirk_override) {
struct snd_ac97_bus *pbus;
struct snd_ac97_template ac97;
int i, err;
int codec_count;
static const struct snd_ac97_bus_ops ops = {
.write = snd_atiixp_ac97_write,
.read = ... | [
1,
0
] |
Linux Kernel | sound/pci/atiixp.c | static void snd_atiixp_free(struct snd_card *card) {
snd_atiixp_chip_stop(card->private_data);
} | [
0,
0
] |
Linux Kernel | sound/pci/atiixp.c |
static int __snd_atiixp_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id) {
struct snd_card *card;
struct atiixp *chip;
int err;
err = snd_devm_card_new(&pci->dev, index, id, THIS_MODULE, sizeof(*chip),
&card);
if (err < 0)
return err... | [
1,
0
] |
Linux Kernel | sound/pci/atiixp.c |
static int snd_atiixp_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id) {
return snd_card_free_on_error(&pci->dev, __snd_atiixp_probe(pci, pci_id));
} | [
0,
0
] |
Linux Kernel | sound/pci/atiixp_modem.c | static void snd_atiixp_xrun_dma(struct atiixp_modem *chip,
struct atiixp_dma *dma) {
if (!dma->substream || !dma->running)
return;
dev_dbg(chip->card->dev, "XRUN detected (DMA %d)\n", dma->ops->type);
snd_pcm_stop_xrun(dma->substream);
} | [
1,
0
] |
Linux Kernel | sound/pci/atiixp_modem.c | static void atiixp_out_enable_transfer(struct atiixp_modem *chip, int on) {
atiixp_update(chip, CMD, ATI_REG_CMD_MODEM_SEND1_EN,
on ? ATI_REG_CMD_MODEM_SEND1_EN : 0);
} | [
0,
0
] |
Linux Kernel | sound/pci/atiixp_modem.c | static void atiixp_in_enable_dma(struct atiixp_modem *chip, int on) {
atiixp_update(chip, CMD, ATI_REG_CMD_MODEM_IN_DMA_EN,
on ? ATI_REG_CMD_MODEM_IN_DMA_EN : 0);
} | [
0,
0
] |
Linux Kernel | sound/pci/atiixp_modem.c |
static int snd_atiixp_pcm_hw_free(struct snd_pcm_substream *substream) {
struct atiixp_modem *chip = snd_pcm_substream_chip(substream);
struct atiixp_dma *dma = substream->runtime->private_data;
atiixp_clear_dma_packets(chip, dma, substream);
return 0;
} | [
1,
0
] |
Linux Kernel | sound/pci/atiixp_modem.c | static int snd_atiixp_pcm_open(struct snd_pcm_substream *substream,
struct atiixp_dma *dma, int pcm_type) {
struct atiixp_modem *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
int err;
static const unsigned int rates[] = {8000, 9600... | [
1,
0
] |
Linux Kernel | sound/pci/atiixp_modem.c | static int snd_atiixp_pcm_close(struct snd_pcm_substream *substream,
struct atiixp_dma *dma) {
struct atiixp_modem *chip = snd_pcm_substream_chip(substream);
if (snd_BUG_ON(!dma->ops || !dma->ops->enable_dma))
return -EINVAL;
spin_lock_irq(&chip->reg_lock);
dma->ops->enable_... | [
1,
0
] |
Linux Kernel | sound/pci/atiixp_modem.c |
static int snd_atiixp_capture_open(struct snd_pcm_substream *substream) {
struct atiixp_modem *chip = snd_pcm_substream_chip(substream);
return snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_CAPTURE], 1);
} | [
0,
0
] |
Linux Kernel | sound/pci/atiixp_modem.c | static int snd_atiixp_pcm_new(struct atiixp_modem *chip) {
struct snd_pcm *pcm;
int err;
chip->dmas[ATI_DMA_PLAYBACK].ops = &snd_atiixp_playback_dma_ops;
chip->dmas[ATI_DMA_CAPTURE].ops = &snd_atiixp_capture_dma_ops;
/* PCM #0: analog I/O */
err = snd_pcm_new(chip->card, "ATI IXP MC97", ATI_PCMDEV_ANALOG,... | [
1,
0
] |
Linux Kernel | sound/pci/atiixp_modem.c | static int snd_atiixp_mixer_new(struct atiixp_modem *chip, int clock) {
struct snd_ac97_bus *pbus;
struct snd_ac97_template ac97;
int i, err;
int codec_count;
static const struct snd_ac97_bus_ops ops = {
.write = snd_atiixp_ac97_write,
.read = snd_atiixp_ac97_read,
};
static const unsigned int... | [
1,
0
] |
Linux Kernel | sound/pci/atiixp_modem.c |
static int snd_atiixp_resume(struct device *dev) {
struct snd_card *card = dev_get_drvdata(dev);
struct atiixp_modem *chip = card->private_data;
int i;
snd_atiixp_aclink_reset(chip);
snd_atiixp_chip_start(chip);
for (i = 0; i < NUM_ATI_CODECS; i++)
snd_ac97_resume(chip->ac97[i]);
snd_power_change_... | [
0,
0
] |
Linux Kernel | sound/pci/atiixp_modem.c | static void snd_atiixp_proc_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer) {
struct atiixp_modem *chip = entry->private_data;
int i;
for (i = 0; i < 256; i += 4)
snd_iprintf(buffer, "%02x: %08x\n", i, readl(chip->remap_addr + i));
} | [
0,
0
] |
Linux Kernel | sound/pci/atiixp_modem.c | static void snd_atiixp_free(struct snd_card *card) {
snd_atiixp_chip_stop(card->private_data);
} | [
0,
0
] |
Linux Kernel | sound/pci/atiixp_modem.c | static int snd_atiixp_init(struct snd_card *card, struct pci_dev *pci) {
struct atiixp_modem *chip = card->private_data;
int err;
err = pcim_enable_device(pci);
if (err < 0)
return err;
spin_lock_init(&chip->reg_lock);
mutex_init(&chip->open_mutex);
chip->card = card;
chip->pci = pci;
chip->irq ... | [
0,
0
] |
Linux Kernel | sound/pci/atiixp_modem.c |
static int snd_atiixp_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id) {
return snd_card_free_on_error(&pci->dev, __snd_atiixp_probe(pci, pci_id));
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0.c |
static int snd_vortex_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id) {
return snd_card_free_on_error(&pci->dev, __snd_vortex_probe(pci, pci_id));
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_a3d.c |
static void a3dsrc_SetHrtfCurrent(a3dsrc_t *a, a3d_Hrtf_t const aa,
a3d_Hrtf_t const b) {
vortex_t *vortex = (vortex_t *)(a->vortex);
int i;
for (i = 0; i < HRTF_SZ; i++)
hwwrite(vortex->mmio,
a3d_addrB(a->slice, a->source, A3D_B_HrtfCurrent) + (i << 2),
... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_a3d.c | static void a3dsrc_SetItdTarget(a3dsrc_t *a, short litd, short ritd) {
vortex_t *vortex = (vortex_t *)(a->vortex);
if (litd < 0)
litd = 0;
if (litd > 0x57FF)
litd = 0x57FF;
if (ritd < 0)
ritd = 0;
if (ritd > 0x57FF)
ritd = 0x57FF;
hwwrite(vortex->mmio, a3d_addrB(a->slice, a->source, A3D_B_I... | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_a3d.c | static void a3dsrc_SetItdCurrent(a3dsrc_t *a, short litd, short ritd) {
vortex_t *vortex = (vortex_t *)(a->vortex);
if (litd < 0)
litd = 0;
if (litd > 0x57FF)
litd = 0x57FF;
if (ritd < 0)
ritd = 0;
if (ritd > 0x57FF)
ritd = 0x57FF;
hwwrite(vortex->mmio, a3d_addrB(a->slice, a->source, A3D_B_... | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_a3d.c | static void a3dsrc_SetItdDline(a3dsrc_t *a, a3d_ItdDline_t const dline) {
vortex_t *vortex = (vortex_t *)(a->vortex);
int i;
for (i = 0; i < DLINE_SZ; i++)
hwwrite(vortex->mmio,
a3d_addrA(a->slice, a->source, A3D_A_ITDDelayLine) + (i << 2),
dline[i]);
}
#if 0
static void a3dsrc_GetIt... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_a3d.c | static void a3dsrc_SetGainCurrent(a3dsrc_t *a, short left, short right) {
vortex_t *vortex = (vortex_t *)(a->vortex);
hwwrite(vortex->mmio, a3d_addrB(a->slice, a->source, A3D_B_GainCurrent),
(right << 0x10) | left);
}
#if 0
static void a3dsrc_GetGainTarget(a3dsrc_t * a, short *left, short *right)
{
vort... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_a3d.c | static void a3dsrc_SetA3DSampleRate(a3dsrc_t *a, int sr) {
vortex_t *vortex = (vortex_t *)(a->vortex);
int esp0 = 0;
esp0 = (((esp0 & 0x7fffffff) | 0xB8000000) & 0x7) | ((sr & 0x1f) << 3);
hwwrite(vortex->mmio, A3D_SLICE_Control + ((a->slice) << 0xd), esp0);
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_a3d.c | static void a3dsrc_EnableA3D(a3dsrc_t *a) {
vortex_t *vortex = (vortex_t *)(a->vortex);
hwwrite(vortex->mmio, A3D_SLICE_Control + ((a->slice) << 0xd), 0xF0000001);
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_a3d.c |
static void a3dsrc_SetA3DControlReg(a3dsrc_t *a, unsigned long ctrl) {
vortex_t *vortex = (vortex_t *)(a->vortex);
hwwrite(vortex->mmio, A3D_SLICE_Control + ((a->slice) << 0xd), ctrl);
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_a3d.c | static void a3dsrc_ZeroStateA3D(a3dsrc_t *a, vortex_t *v) {
int i, var, var2;
if ((a->vortex) == NULL) {
dev_err(v->card->dev, "ZeroStateA3D: ERROR: a->vortex is NULL\n");
return;
}
a3dsrc_SetA3DControlReg(a, 0);
a3dsrc_SetA3DPointerReg(a, 0);
var = a->slice;
var2 = a->source;
for (i = 0; i <... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_a3d.c | static void vortex_A3dSourceHw_Initialize(vortex_t *v, int source, int slice) {
a3dsrc_t *a3dsrc = &(v->a3d[source + (slice * 4)]);
a3dsrc->vortex = (void *)v;
a3dsrc->source = source; /* source */
a3dsrc->slice = slice; /* slice */
a3dsrc_ZeroState(a3dsrc);
/* Added by me. */
a3dsrc_SetA3DSampleRate(a... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_a3d.c | static void vortex_a3d_translate_filter(a3d_atmos_t filter, int *params) {
/* FIXME: implement this. */
} | [
0,
1
] |
Linux Kernel | sound/pci/au88x0/au88x0_a3d.c | static int snd_vortex_a3d_itd_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
a3dsrc_t *a = kcontrol->private_data;
int coord[6];
int i;
for (i = 0; i < 6; i++)
coord[i] = ucontrol->value.integer.value[i];
vortex_a3d_coord2itd(a->hrtf[0], coord)... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_a3d.c |
static void vortex_a3d_unregister_controls(vortex_t *vortex) {} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c |
static void vortex_mixer_en_sr(vortex_t *vortex, int channel) {
hwwrite(vortex->mmio, VORTEX_MIXER_SR,
hwread(vortex->mmio, VORTEX_MIXER_SR) | (0x1 << channel));
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_mix_setvolumebyte(vortex_t *vortex, unsigned char mix,
unsigned char vol) {
int temp;
hwwrite(vortex->mmio, VORTEX_MIX_VOL_A + (mix << 2), vol);
if (1) {
temp = hwread(vortex->mmio, VORTEX_MIX_VOL_B + (mix << 2));
if ((temp != 0x80) || (vol == 0x80))... | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_mix_setinputvolumebyte(vortex_t *vortex, unsigned char mix,
int mixin, unsigned char vol) {
int temp;
hwwrite(vortex->mmio, VORTEX_MIX_INVOL_A + (((mix << 5) + mixin) << 2), vol);
if (1) {
temp =
hwread(vortex->mmio, VORTEX_MIX_INVOL_B + ((... | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c |
static void vortex_mix_killinput(vortex_t *vortex, unsigned char mix,
int mixin) {
rampchs[mix] &= ~(1 << mixin);
vortex_mix_setinputvolumebyte(vortex, mix, mixin, 0x80);
mchannels[mix] &= ~(1 << mixin);
vortex_mix_setenablebit(vortex, mix, mixin, 0);
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_mix_enableinput(vortex_t *vortex, unsigned char mix,
int mixin) {
vortex_mix_killinput(vortex, mix, mixin);
if ((mchannels[mix] & (1 << mixin)) == 0) {
vortex_mix_setinputvolumebyte(vortex, mix, mixin, 0x80);
mchannels[mix] |= (1 << mixin);
}
vortex_... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_fifo_setadbvalid(vortex_t *vortex, int fifo, int en) {
hwwrite(
vortex->mmio, VORTEX_FIFO_ADBCTRL + (fifo << 2),
(hwread(vortex->mmio, VORTEX_FIFO_ADBCTRL + (fifo << 2)) & 0xffffffef) |
((1 & en) << 4) | FIFO_U1);
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_fifo_clearwtdata(vortex_t *vortex, int fifo, int x) {
if (x < 1)
return;
for (x--; x >= 0; x--)
hwwrite(vortex->mmio,
VORTEX_FIFO_WTDATA + (((fifo << FIFO_SIZE_BITS) + x) << 2), 0);
} | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_fifo_init(vortex_t *vortex) {
int x;
u32 addr;
addr = VORTEX_FIFO_ADBCTRL + ((NR_ADB - 1) * 4);
for (x = NR_ADB - 1; x >= 0; x--) {
hwwrite(vortex->mmio, addr, (FIFO_U0 | FIFO_U1));
if (hwread(vortex->mmio, addr) != (FIFO_U0 | FIFO_U1))
dev_err(vortex->card->dev, "bad adb fifo ... | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_adbdma_setmode(vortex_t *vortex, int adbdma, int ie, int dir,
int fmt, int stereo, u32 offset) {
stream_t *dma = &vortex->dma_adb[adbdma];
dma->dma_unknown = stereo;
dma->dma_ctrl = ((offset & OFFSET_MASK) | (dma->dma_ctrl & ~OFFSET_MASK));
dma->dma_ctrl = ... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_adbdma_resetup(vortex_t *vortex, int adbdma) {
stream_t *dma = &vortex->dma_adb[adbdma];
int p, pp, i;
for (i = 0; i < 4 && i < dma->nr_periods; i++) {
/* p: audio buffer page index */
p = dma->period_virt + i;
if (p >= dma->nr_periods)
p -= dma->nr_periods;
/* pp: hardwa... | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_wtdma_setstartbuffer(vortex_t *vortex, int wtdma, int sb) {
stream_t *dma = &vortex->dma_wt[wtdma];
hwwrite(vortex->mmio, VORTEX_WTDMA_START + (wtdma << 2),
sb << ((0xf - (wtdma & 0xf)) * 2));
dma->period_real = dma->period_virt = sb;
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_wtdma_setmode(vortex_t *vortex, int wtdma, int ie, int fmt,
int d, u32 offset) {
stream_t *dma = &vortex->dma_wt[wtdma];
// dma->this_08 = e;
dma->dma_unknown = d;
dma->dma_ctrl = 0;
dma->dma_ctrl = ((offset & OFFSET_MASK) | (dma->dma_ctrl & ~OFFSET_MASK));... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c |
static void vortex_wtdma_startfifo(vortex_t *vortex, int wtdma) {
stream_t *dma = &vortex->dma_wt[wtdma];
int this_8 = 0, this_4 = 0;
switch (dma->fifo_status) {
case FIFO_START:
vortex_fifo_setwtvalid(vortex, wtdma, dma->fifo_enabled ? 1 : 0);
break;
case FIFO_STOP:
this_8 = 1;
hwwrite(vort... | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_adb_init(vortex_t *vortex) {
int i;
hwwrite(vortex->mmio, VORTEX_ADB_SR, 0);
for (i = 0; i < VORTEX_ADB_RTBASE_COUNT; i++)
hwwrite(vortex->mmio, VORTEX_ADB_RTBASE + (i << 2),
hwread(vortex->mmio, VORTEX_ADB_RTBASE + (i << 2)) | ROUTE_MASK);
for (i = 0; i < VORTEX_ADB_CHNBASE_... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_routeLRT(vortex_t *vortex, int en, unsigned char ch,
unsigned char source0, unsigned char source1,
unsigned char dest) {
ADBRamLink route[2];
route[0] = ((source0 & ADB_MASK) << ADB_SHIFT) | (dest & ADB_MASK);
route[1] = ((source1 & ADB_M... | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_connection_adbdma_src(vortex_t *vortex, int en,
unsigned char ch, unsigned char adbdma,
unsigned char src) {
vortex_route(vortex, en, ch, ADB_DMA(adbdma), ADB_SRCIN(src));
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_connection_src_mixin(vortex_t *vortex, int en,
unsigned char channel,
unsigned char src,
unsigned char mixin) {
vortex_route(vortex, en, channel, ADB_SRCOUT(src), ADB_MIXIN(mixin)... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c |
static void vortex_connection_src_adbdma(vortex_t *vortex, int en,
unsigned char ch, unsigned char src,
unsigned char adbdma) {
vortex_route(vortex, en, ch, ADB_SRCOUT(src), ADB_DMA(adbdma));
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static int vortex_adb_checkinout(vortex_t *vortex, int resmap[], int out,
int restype) {
int i, qty = resnum[restype], resinuse = 0;
if (out) {
for (i = 0; i < NR_ADB; i++) {
resinuse |= vortex->dma_adb[i].resources[restype];
}
resinuse |= vortex->fixed_res[resty... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_adb_setsrc(vortex_t *vortex, int adbdma, unsigned int rate,
int dir) {
stream_t *stream = &(vortex->dma_adb[adbdma]);
int i, cvrt;
if (dir)
cvrt = SRC_RATIO(rate, 48000);
else
cvrt = SRC_RATIO(48000, rate);
/* Setup SRC's */
for (i = 0; i < NR_SRC; ... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static void vortex_codec_init(vortex_t *vortex) {
int i;
for (i = 0; i < 32; i++) {
hwwrite(vortex->mmio, (VORTEX_CODEC_CHN + (i << 2)), -i);
msleep(2);
}
if (0) {
hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0x8068);
msleep(1);
hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0x00e8);
msleep(1);
... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static unsigned short vortex_codec_read(struct snd_ac97 *codec,
unsigned short addr) {
vortex_t *card = (vortex_t *)codec->private_data;
u32 read_addr, data;
unsigned lifeboat = 0;
while (!(hwread(card->mmio, VORTEX_CODEC_CTRL) & 0x100)) {
udelay(100);
if (lifeb... | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static int vortex_core_init(vortex_t *vortex) {
dev_info(vortex->card->dev, "init started\n");
hwwrite(vortex->mmio, VORTEX_CTRL, 0xffffffff);
msleep(5);
hwwrite(vortex->mmio, VORTEX_CTRL,
hwread(vortex->mmio, VORTEX_CTRL) & 0xffdfffff);
msleep(5);
/* Reset IRQ flags */
hwwrite(vortex->mmio, V... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_core.c | static int vortex_core_shutdown(vortex_t *vortex) {
dev_info(vortex->card->dev, "shutdown started\n");
#ifndef CHIP_AU8820
vortex_eq_free(vortex);
vortex_Vort3D_disable(vortex);
#endif
vortex_disable_int(vortex);
vortex_connect_default(vortex, 0);
/* Reset all DMA fifos. */
vortex_fifo_init(vortex);
/... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_eq.c | static void vortex_EqHw_SetRightCoefs(vortex_t *vortex, const u16 coefs[]) {
eqhw_t *eqhw = &(vortex->eq.this04);
int i = 0, n;
for (n = 0; n < eqhw->this04; n++) {
hwwrite(vortex->mmio, 0x2b1e0 + n * 0x30, coefs[0 + i]);
hwwrite(vortex->mmio, 0x2b1e4 + n * 0x30, coefs[1 + i]);
if (eqhw->this08 == 0... | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_eq.c |
static void vortex_EqHw_SetRightGainsSingleTarget(vortex_t *vortex, u16 index,
u16 b) {
hwwrite(vortex->mmio, 0x2b20c + (index * 0x30), b);
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_eq.c | static void vortex_EqHw_Enable(vortex_t *vortex) {
hwwrite(vortex->mmio, VORTEX_EQ_CTRL, 0xf001);
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_eq.c |
static void vortex_EqHw_ZeroA3DIO(vortex_t *vortex) {
int i;
for (i = 0; i < 0x4; i++)
hwwrite(vortex->mmio, VORTEX_EQ_DEST + (i << 2), 0x0);
} | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_eq.c | static void vortex_EqHw_GetTenBandLevels(vortex_t *vortex, u16 peaks[]) {
eqhw_t *eqhw = &(vortex->eq.this04);
int i;
if (eqhw->this04 <= 0)
return;
for (i = 0; i < eqhw->this04; i++)
peaks[i] = hwread(vortex->mmio, 0x2B024 + i * 0x30);
for (i = 0; i < eqhw->this04; i++)
peaks[i + eqhw->this04] ... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_eq.c | static int vortex_Eqlzr_GetLeftGain(vortex_t *vortex, u16 index, u16 *gain) {
eqlzr_t *eq = &(vortex->eq);
if (eq->this28) {
*gain = eq->this130[index];
return 0;
}
return 1;
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_eq.c | static int vortex_Eqlzr_SetAllBandsFromActiveCoeffSet(vortex_t *vortex) {
eqlzr_t *eq = &(vortex->eq);
vortex_EqHw_SetLeftGainsTarget(vortex, eq->this130);
vortex_EqHw_SetRightGainsTarget(vortex, &(eq->this130[eq->this10]));
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_eq.c |
static void vortex_Eqlzr_SetA3dBypassGain(vortex_t *vortex, u32 a, u32 b) {
eqlzr_t *eq = &(vortex->eq);
u32 eax, ebx;
eq->this58 = a;
eq->this5c = b;
if (eq->this54)
eax = eq->this0e;
else
eax = eq->this0a;
ebx = (eax * eq->this58) >> 0x10;
eax = (eax * eq->this5c) >> 0x10;
vortex_EqHw_SetA... | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_eq.c |
static int snd_vortex_peaks_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) {
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 20;
uinfo->value.integer.min = 0x0000;
uinfo->value.integer.max = 0x7fff;
return 0;
} | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_eq.c |
static int snd_vortex_peaks_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
int i, count = 0;
u16 peaks[20];
vortex_Eqlzr_GetAllPeaks(vortex, peaks, &count);
if (count != 20) {
dev_err(vortex->card-... | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_game.c |
static void vortex_gameport_unregister(vortex_t *vortex) {
if (vortex->gameport) {
gameport_unregister_port(vortex->gameport);
vortex->gameport = NULL;
}
}
#else | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_pcm.c | static int snd_vortex_pcm_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params) {
vortex_t *chip = snd_pcm_substream_chip(substream);
stream_t *stream = (stream_t *)(substream->runtime->private_data);
spin_lock_irq(&chip->lock);
// Make audio ro... | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_pcm.c |
static int snd_vortex_spdif_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
ucontrol->value.iec958.status[0] = 0x00;
ucontrol->value.iec958.status[1] =
IEC958_AES1_CON_ORIGINAL | IEC958_AES1_CON_DIGDIG... | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_synth.c | static void vortex_wt_setdsout(vortex_t *vortex, u32 wt, int en) {
int temp;
temp = hwread(vortex->mmio, WT_DSREG((wt >= 0x20) ? 1 : 0));
if (en)
temp |= (1 << (wt & 0x1f));
else
temp &= ~(1 << (wt & 0x1f));
hwwrite(vortex->mmio, WT_DSREG((wt >= 0x20) ? 1 : 0), temp);
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_xtalk.c | static void vortex_XtalkHw_SetLeftEQ(vortex_t *vortex, short arg_0, short arg_4,
xtalk_coefs_t const coefs) {
int i;
for (i = 0; i < 5; i++) {
hwwrite(vortex->mmio, 0x24200 + i * 0x24, coefs[i][0]);
hwwrite(vortex->mmio, 0x24204 + i * 0x24, coefs[i][1]);
hwwrite(vor... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_xtalk.c |
static void vortex_XtalkHw_SetLeftEQStates(vortex_t *vortex,
xtalk_instate_t const arg_0,
xtalk_state_t const coefs) {
int i;
for (i = 0; i < 5; i++) {
hwwrite(vortex->mmio, 0x24214 + i * 0x24, coefs[i][0]);
hwwrite(vort... | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_xtalk.c |
static void vortex_XtalkHw_SetLeftDline(vortex_t *vortex,
xtalk_dline_t const dline) {
int i;
for (i = 0; i < 0x20; i++) {
hwwrite(vortex->mmio, 0x24000 + (i << 2), dline[i] & 0xffff);
hwwrite(vortex->mmio, 0x24080 + (i << 2), dline[i] >> 0x10);
}
} | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_xtalk.c |
static void vortex_XtalkHw_Disable(vortex_t *vortex) {
u32 temp;
temp = (hwread(vortex->mmio, 0x24660) & 0x1FFFFFFF) | 0xC0000000;
temp &= 0xfffffffe;
hwwrite(vortex->mmio, 0x24660, temp);
} | [
1,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_xtalk.c |
static void vortex_XtalkHw_ZeroIO(vortex_t *vortex) {
int i;
for (i = 0; i < 20; i++)
hwwrite(vortex->mmio, 0x24600 + (i << 2), 0);
for (i = 0; i < 4; i++)
hwwrite(vortex->mmio, 0x24650 + (i << 2), 0);
} | [
0,
0
] |
Linux Kernel | sound/pci/au88x0/au88x0_xtalk.c | static void vortex_XtalkHw_ProgramPipe(vortex_t *vortex) {
vortex_XtalkHw_SetLeftEQ(vortex, 0, 1, asXtalkCoefsPipe);
vortex_XtalkHw_SetRightEQ(vortex, 0, 1, asXtalkCoefsPipe);
vortex_XtalkHw_SetLeftXT(vortex, 0, 0, asXtalkCoefsZeros);
vortex_XtalkHw_SetRightXT(vortex, 0, 0, asXtalkCoefsZeros);
vortex_XtalkH... | [
0,
0
] |
Linux Kernel | sound/pci/aw2/aw2-alsa.c | static int snd_aw2_pcm_prepare_playback(struct snd_pcm_substream *substream) {
struct aw2_pcm_device *pcm_device = snd_pcm_substream_chip(substream);
struct aw2 *chip = pcm_device->chip;
struct snd_pcm_runtime *runtime = substream->runtime;
unsigned long period_size, buffer_size;
mutex_lock(&chip->mtx);
p... | [
0,
0
] |
Linux Kernel | sound/pci/aw2/aw2-saa7146.c | void snd_aw2_saa7146_pcm_init_playback(struct snd_aw2_saa7146 *chip,
int stream_number,
unsigned long dma_addr,
unsigned long period_size,
unsigned long buffer_size... | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.