Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int patch_wolfson_wm9711_specific(struct snd_ac97 *ac97) {
int err, i;
for (i = 0; i < ARRAY_SIZE(wm9711_snd_ac97_controls); i++) {
err = snd_ctl_add(ac97->bus->card,
snd_ac97_cnew(&wm9711_snd_ac97_controls[i], ac97));
if (err < 0)
return err;
}
snd_ac97_write_cache(... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static int patch_wolfson11(struct snd_ac97 *ac97) {
ac97->build_ops = &patch_wolfson_wm9711_ops;
ac97->flags |= AC97_HAS_NO_REC_GAIN | AC97_STEREO_MUTES | AC97_HAS_NO_MIC |
AC97_HAS_NO_PC_BEEP | AC97_HAS_NO_VIDEO | AC97_HAS_NO_CD;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int patch_wolfson_wm9713_specific(struct snd_ac97 *ac97) {
int err, i;
for (i = 0; i < ARRAY_SIZE(wm13_snd_ac97_controls); i++) {
err = snd_ctl_add(ac97->bus->card,
snd_ac97_cnew(&wm13_snd_ac97_controls[i], ac97));
if (err < 0)
return err;
}
snd_ac97_write_cache(ac97... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static int patch_tritech_tr28028(struct snd_ac97 *ac97) {
snd_ac97_write_cache(ac97, 0x26, 0x0300);
snd_ac97_write_cache(ac97, 0x26, 0x0000);
snd_ac97_write_cache(ac97, AC97_SURROUND_MASTER, 0x0000);
snd_ac97_write_cache(ac97, AC97_SPDIF, 0x0000);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static int patch_sigmatel_stac9708_specific(struct snd_ac97 *ac97) {
int err;
snd_ac97_remove_ctl(ac97, "PCM Out Path & Mute", NULL);
snd_ac97_rename_vol_ctl(ac97, "Headphone Playback",
"Sigmatel Surround Playback");
err = patch_build_controls(ac97, &snd_ac97_stac9708_bias_control, 1... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static int patch_sigmatel_stac9756(struct snd_ac97 *ac97) {
ac97->build_ops = &patch_sigmatel_stac9700_ops;
snd_ac97_write_cache(ac97, AC97_SIGMATEL_CIC1, 0xabba);
snd_ac97_write_cache(ac97, AC97_SIGMATEL_CIC2,
0x0000); /* is this correct? --jk */
snd_ac97_write_cache(ac97, AC97_SIGMATEL... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static int patch_sigmatel_stac9758_specific(struct snd_ac97 *ac97) {
int err;
err = patch_sigmatel_stac97xx_specific(ac97);
if (err < 0)
return err;
err = patch_build_controls(ac97, snd_ac97_sigmatel_stac9758_controls,
ARRAY_SIZE(snd_ac97_sigmatel_stac9758_controls));
if (err... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static int patch_sigmatel_stac9758(struct snd_ac97 *ac97) {
static const unsigned short regs[4] = {
AC97_SIGMATEL_OUTSEL, AC97_SIGMATEL_IOMISC, AC97_SIGMATEL_INSEL,
AC97_SIGMATEL_VARIOUS};
static const unsigned short def_regs[4] = {
0xd794, /* CL:CL, SR:SR, LO:MX, LI:DS, MI:DS */
/* IOMISC *... | [
1,
1
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static int patch_cirrus_build_spdif(struct snd_ac97 *ac97) {
int err;
err = patch_build_controls(ac97, &snd_ac97_controls_spdif[0], 3);
if (err < 0)
return err;
/* switch, spsa */
err = patch_build_controls(ac97, &snd_ac97_cirrus_controls_spdif[0], 1);
if (err < 0)
return err;
switch (ac97->id & ... | [
1,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static int patch_cx20551(struct snd_ac97 *ac97) {
snd_ac97_update_bits(ac97, 0x5c, 0x01, 0x01);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static int patch_ad1819(struct snd_ac97 *ac97) {
unsigned short scfg;
scfg = snd_ac97_read(ac97, AC97_AD_SERIAL_CFG);
snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG,
scfg | 0x7000); /* select all codecs */
ac97->res_table = ad1819_restbl;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static unsigned short patch_ad1881_unchained(struct snd_ac97 *ac97, int idx,
unsigned short mask) {
unsigned short val;
snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, mask);
snd_ac97_write_cache(ac97, AC97_AD_CODEC_CFG,
0x0000); /* ID0C,... | [
1,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static void patch_ad1881_chained(struct snd_ac97 *ac97, int unchained_idx,
int cidx1, int cidx2) {
if (ac97->spec.ad18xx.unchained[cidx1] || ac97->spec.ad18xx.chained[cidx1])
cidx1 = -1;
if (ac97->spec.ad18xx.unchained[cidx2] || ac97->spec.ad18xx.chained[cidx2])
cidx2 = -1;... | [
1,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int snd_ac97_ad198x_spdif_source_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) {
static const char *const texts[2] = {"AC-Link", "A/D Converter"};
return snd_ctl_enum_info(uinfo, 1, 2, texts);
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int
snd_ac97_ad198x_spdif_source_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
unsigned short val;
val = ac97->regs[AC97_AD_SERIAL_CFG];
ucontrol->value.enumerated.item[0] = (val >> 2) & 1;... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int patch_ad198x_post_spdif(struct snd_ac97 *ac97) {
return patch_build_controls(ac97, &snd_ac97_ad198x_spdif_source, 1);
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int patch_ad1981a_specific(struct snd_ac97 *ac97) {
if (check_list(ac97, ad1981_jacks_denylist))
return 0;
return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense,
ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int snd_ac97_ad1888_lohpsel_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
unsigned short val;
val = ac97->regs[AC97_AD_MISC];
ucontrol->value.integer.value[0] = !(val & AC97_AD198X_LO... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int snd_ac97_ad1888_lohpsel_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
unsigned short val;
val = !ucontrol->value.integer.value[0];
if (ac97->spec.ad18xx.lo_as_master)
val = !v... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int snd_ac97_ad1888_downmix_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
unsigned short val;
val = ac97->regs[AC97_AD_MISC];
if (!(val & AC97_AD198X_DMIX1))
ucontrol->value.enume... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int snd_ac97_ad1985_vrefout_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) {
static const char *const texts[4] = {"High-Z", "3.7 V", "2.25 V", "0 V"};
return snd_ctl_enum_info(uinfo, 1, 4, texts);
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int snd_ac97_ad1985_vrefout_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
static const int reg2ctrl[4] = {2, 0, 1, 3};
struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
unsigned short val;
val = (ac97->regs[AC97_AD_MISC] & AC97_AD198X... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int snd_ac97_ad1986_spread_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
unsigned short val;
val = ac97->regs[AC97_AD_MISC];
ucontrol->value.integer.value[0] = (val & AC97_AD1986_SPRD)... | [
1,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int snd_ac97_ad1986_miclisel_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
unsigned char swap = ucontrol->value.integer.value[0] != 0;
if (swap != ac97->spec.ad18xx.swap_mic_linein) {
... | [
1,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int patch_ad1986_specific(struct snd_ac97 *ac97) {
int err;
err = patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1);
if (err < 0)
return err;
return patch_build_controls(ac97, snd_ac97_ad1986_controls,
ARRAY_SIZE(snd_ac97_ad1985_controls));
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static int patch_aztech_azf3328_specific(struct snd_ac97 *ac97) {
struct snd_kcontrol *kctl_3d_center =
snd_ac97_find_mixer_ctl(ac97, "3D Control - Center");
struct snd_kcontrol *kctl_3d_depth =
snd_ac97_find_mixer_ctl(ac97, "3D Control - Depth");
if (kctl_3d_center) {
kctl_3d_center->private_val... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int patch_aztech_azf3328(struct snd_ac97 *ac97) {
ac97->build_ops = &patch_aztech_azf3328_ops;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static void cm9738_update_jacks(struct snd_ac97 *ac97) {
snd_ac97_update_bits(ac97, AC97_CM9738_VENDOR_CTRL, 1 << 10,
is_shared_surrout(ac97) ? (1 << 10) : 0);
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static void cm9739_update_jacks(struct snd_ac97 *ac97) {
snd_ac97_update_bits(ac97, AC97_CM9739_MULTI_CHAN, 1 << 10,
is_shared_surrout(ac97) ? (1 << 10) : 0);
/* shared Mic In / Center/LFE Out **/
snd_ac97_update_bits(ac97, AC97_CM9739_MULTI_CHAN, 0x3000,
is_shared_c... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int patch_cm9739_specific(struct snd_ac97 *ac97) {
return patch_build_controls(ac97, snd_ac97_cm9739_controls,
ARRAY_SIZE(snd_ac97_cm9739_controls));
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int cm9761_spdif_out_source_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) {
static const char *const texts[] = {"AC-Link", "ADC", "SPDIF-In"};
return snd_ctl_enum_info(uinfo, 1, 3, texts);
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int patch_cm9761_specific(struct snd_ac97 *ac97) {
return patch_build_controls(ac97, snd_ac97_cm9761_controls,
ARRAY_SIZE(snd_ac97_cm9761_controls));
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static struct snd_kcontrol *snd_ac97_find_mixer_ctl(struct snd_ac97 *ac97,
const char *name) {
struct snd_ctl_elem_id id;
memset(&id, 0, sizeof(id));
id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
strcpy(id.name, name);
return snd_ctl_find_id(ac97->bus->card, &id);
... | [
1,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name,
const unsigned int *tlv,
const char *const *followers) {
struct snd_kcontrol *kctl;
const char *const *s;
int err;
kctl = snd_ctl_make_virtual_master(name, tlv);
if (!kctl)
r... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static int patch_vt1616_specific(struct snd_ac97 *ac97) {
struct snd_kcontrol *kctl;
int err;
if (snd_ac97_try_bit(ac97, 0x5a, 9)) {
err = patch_build_controls(ac97, &snd_ac97_controls_vt1616[0], 1);
if (err < 0)
return err;
}
err = patch_build_controls(ac97, &snd_ac97_controls_vt1616[1],
... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c | static int snd_ac97_vt1617a_smart51_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
ushort usSM51, usMS, usReg;
struct snd_ac97 *pac97;
pac97 = snd_kcontrol_chip(kcontrol);
usSM51 = ucontrol->value.enumerated.item[0] >> 1;
usMS = ucontrol->v... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int snd_ac97_vt1618_UAJ_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) {
return snd_ctl_enum_info(uinfo, 1, 4,
vt1618_uaj[kcontrol->private_value].items);
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int snd_ac97_vt1618_UAJ_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
return ac97_update_bits_page(snd_kcontrol_chip(kcontrol), 0x60,
vt1618_uaj[kcontrol->private_value].mask,
ucontrol-... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_patch.c |
static int patch_ucb1400_specific(struct snd_ac97 *ac97) {
int idx, err;
for (idx = 0; idx < ARRAY_SIZE(snd_ac97_controls_ucb1400); idx++) {
err = snd_ctl_add(ac97->bus->card,
snd_ctl_new1(&snd_ac97_controls_ucb1400[idx], ac97));
if (err < 0)
return err;
}
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_pcm.c |
static int double_rate_hw_constraint_channels(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule *rule) {
struct snd_interval *rate =
hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
if (rate->min > 48000) {
static const struct snd_interval double_ra... | [
0,
0
] |
Linux Kernel | sound/pci/ac97/ac97_proc.c | static void snd_ac97_proc_read_functions(struct snd_ac97 *ac97,
struct snd_info_buffer *buffer) {
int header = 0, function;
unsigned short info, sense_info;
static const char *function_names[12] = {
"Master Out", "AUX Out", "Center/LFE Out", "SPDIF Out",
"Phon... | [
1,
0
] |
Linux Kernel | sound/pci/ac97/ac97_proc.c |
void snd_ac97_proc_init(struct snd_ac97 *ac97) {
struct snd_info_entry *entry;
char name[32];
const char *prefix;
if (ac97->bus->proc == NULL)
return;
prefix = ac97_is_audio(ac97) ? "ac97" : "mc97";
sprintf(name, "%s#%d-%d", prefix, ac97->addr, ac97->num);
entry = snd_info_create_card_entry(ac97->bu... | [
1,
0
] |
Linux Kernel | sound/pci/ad1889.c |
static inline void ad1889_writew(struct snd_ad1889 *chip, unsigned reg,
u16 val) {
writew(val, chip->iobase + reg);
} | [
0,
0
] |
Linux Kernel | sound/pci/ad1889.c |
static inline void ad1889_unmute(struct snd_ad1889 *chip) {
u16 st;
st = ad1889_readw(chip, AD_DS_WADA) & ~(AD_DS_WADA_RWAM | AD_DS_WADA_LWAM);
ad1889_writew(chip, AD_DS_WADA, st);
ad1889_readw(chip, AD_DS_WADA);
} | [
0,
0
] |
Linux Kernel | sound/pci/ad1889.c |
static inline void ad1889_mute(struct snd_ad1889 *chip) {
u16 st;
st = ad1889_readw(chip, AD_DS_WADA) | AD_DS_WADA_RWAM | AD_DS_WADA_LWAM;
ad1889_writew(chip, AD_DS_WADA, st);
ad1889_readw(chip, AD_DS_WADA);
} | [
0,
0
] |
Linux Kernel | sound/pci/ad1889.c |
static inline void ad1889_load_wave_buffer_address(struct snd_ad1889 *chip,
u32 address) {
ad1889_writel(chip, AD_DMA_WAVBA, address);
ad1889_writel(chip, AD_DMA_WAVCA, address);
} | [
0,
0
] |
Linux Kernel | sound/pci/ad1889.c |
static inline void ad1889_load_wave_interrupt_count(struct snd_ad1889 *chip,
u32 count) {
ad1889_writel(chip, AD_DMA_WAVIB, count);
ad1889_writel(chip, AD_DMA_WAVIC, count);
} | [
0,
0
] |
Linux Kernel | sound/pci/ad1889.c | static void ad1889_channel_reset(struct snd_ad1889 *chip,
unsigned int channel) {
u16 reg;
if (channel & AD_CHAN_WAV) {
reg = ad1889_readw(chip, AD_DS_WSMC) & ~AD_DS_WSMC_WAEN;
ad1889_writew(chip, AD_DS_WSMC, reg);
chip->wave.reg = reg;
/* disable IRQs */
reg ... | [
0,
0
] |
Linux Kernel | sound/pci/ad1889.c |
static int snd_ad1889_playback_close(struct snd_pcm_substream *ss) {
struct snd_ad1889 *chip = snd_pcm_substream_chip(ss);
chip->psubs = NULL;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/ad1889.c | static snd_pcm_uframes_t
snd_ad1889_playback_pointer(struct snd_pcm_substream *ss) {
size_t ptr = 0;
struct snd_ad1889 *chip = snd_pcm_substream_chip(ss);
if (unlikely(!(chip->wave.reg & AD_DS_WSMC_WAEN)))
return 0;
ptr = ad1889_readl(chip, AD_DMA_WAVCA);
ptr -= chip->wave.addr;
if (snd_BUG_ON(ptr >=... | [
0,
0
] |
Linux Kernel | sound/pci/ad1889.c | static irqreturn_t snd_ad1889_interrupt(int irq, void *dev_id) {
unsigned long st;
struct snd_ad1889 *chip = dev_id;
st = ad1889_readl(chip, AD_DMA_DISR);
ad1889_writel(chip, AD_DMA_DISR, st);
st &= AD_INTR_MASK;
if (unlikely(!st))
return IRQ_NONE;
if (st & (AD_DMA_DISR_PMAI | AD_DMA_DISR_PTAI))
... | [
0,
0
] |
Linux Kernel | sound/pci/ad1889.c |
static int snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device) {
int err;
struct snd_pcm *pcm;
err = snd_pcm_new(chip->card, chip->card->driver, device, 1, 1, &pcm);
if (err < 0)
return err;
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_ad1889_playback_ops);
snd_pcm_set_ops(pcm, SNDRV_PCM... | [
1,
0
] |
Linux Kernel | sound/pci/ad1889.c | static void snd_ad1889_free(struct snd_card *card) {
struct snd_ad1889 *chip = card->private_data;
spin_lock_irq(&chip->lock);
ad1889_mute(chip);
ad1889_channel_reset(chip, AD_CHAN_WAV | AD_CHAN_ADC);
/* clear DISR. If we don't, we'd better jump off the Eiffel Tower */
ad1889_writel(chip, AD_DMA_DISR, A... | [
0,
0
] |
Linux Kernel | sound/pci/ak4531_codec.c | static int snd_ak4531_get_single(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol);
int reg = kcontrol->private_value & 0xff;
int shift = (kcontrol->private_value >> 16) & 0x07;
int mask = (kcontrol->pri... | [
1,
0
] |
Linux Kernel | sound/pci/ak4531_codec.c |
static int snd_ak4531_info_input_sw(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) {
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 4;
uinfo->value.integer.min = 0;
uinfo->value.integer.max = 1;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c | static inline unsigned int snd_ali_5451_peek(struct snd_ali *codec,
unsigned int port) {
return (unsigned int)inl(ALI_REG(codec, port));
} | [
0,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c |
static void snd_ali_codec_poke(struct snd_ali *codec, int secondary,
unsigned short reg, unsigned short val) {
unsigned int dwVal;
unsigned int port;
if (reg >= 0x80) {
dev_err(codec->card->dev, "ali_codec_poke: reg(%xh) invalid.\n", reg);
return;
}
port = codec->chre... | [
1,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c | static int snd_ali_reset_5451(struct snd_ali *codec) {
struct pci_dev *pci_dev;
unsigned short wCount, wReg;
unsigned int dwVal;
pci_dev = codec->pci_m1533;
if (pci_dev) {
pci_read_config_dword(pci_dev, 0x7c, &dwVal);
pci_write_config_dword(pci_dev, 0x7c, dwVal | 0x08000000);
mdelay(5);
pci_r... | [
0,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c |
static void snd_ali_enable_address_interrupt(struct snd_ali *codec) {
unsigned int gc;
gc = inl(ALI_REG(codec, ALI_GC_CIR));
gc |= ENDLP_IE;
gc |= MIDLP_IE;
outl(gc, ALI_REG(codec, ALI_GC_CIR));
} | [
0,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c |
static void snd_ali_stop_voice(struct snd_ali *codec, unsigned int channel) {
unsigned int mask = 1 << (channel & 0x1f);
dev_dbg(codec->card->dev, "stop_voice: channel=%d\n", channel);
outl(mask, ALI_REG(codec, codec->chregs.regs.stop));
} | [
1,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c |
static void snd_ali_enable_spdif_in(struct snd_ali *codec) {
unsigned int dwVal;
dwVal = inl(ALI_REG(codec, ALI_GLOBAL_CONTROL));
dwVal |= ALI_SPDIF_IN_SUPPORT;
outl(dwVal, ALI_REG(codec, ALI_GLOBAL_CONTROL));
dwVal = inb(ALI_REG(codec, ALI_SPDIF_CTRL));
dwVal |= 0x02;
outb(dwVal, ALI_REG(codec, ALI_SP... | [
1,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c |
static void snd_ali_enable_spdif_out(struct snd_ali *codec) {
unsigned short wVal;
unsigned char bVal;
struct pci_dev *pci_dev;
pci_dev = codec->pci_m1533;
if (pci_dev == NULL)
return;
pci_read_config_byte(pci_dev, 0x61, &bVal);
bVal |= 0x40;
pci_write_config_byte(pci_dev, 0x61, bVal);
pci_read_... | [
1,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c | static void snd_ali_enable_spdif_chnout(struct snd_ali *codec) {
unsigned short wVal;
wVal = inw(ALI_REG(codec, ALI_GLOBAL_CONTROL));
wVal &= ~ALI_SPDIF_OUT_SEL_PCM;
outw(wVal, ALI_REG(codec, ALI_GLOBAL_CONTROL));
snd_ali_enable_special_channel(codec, ALI_SPDIF_OUT_CHANNEL);
} | [
0,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c |
static void snd_ali_disable_spdif_out(struct snd_ali *codec) {
unsigned char bVal;
bVal = inb(ALI_REG(codec, ALI_SCTRL));
outb(bVal & ~ALI_SPDIF_OUT_ENABLE, ALI_REG(codec, ALI_SCTRL));
snd_ali_disable_spdif_chnout(codec);
} | [
0,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c | static irqreturn_t snd_ali_card_interrupt(int irq, void *dev_id) {
struct snd_ali *codec = dev_id;
int channel;
unsigned int audio_int;
struct snd_ali_channel_control *pchregs;
if (codec == NULL || !codec->hw_initialized)
return IRQ_NONE;
audio_int = inl(ALI_REG(codec, ALI_MISCINT));
if (!audio_int)... | [
0,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c |
static snd_pcm_uframes_t snd_ali_pointer(struct snd_pcm_substream *substream) {
struct snd_ali *codec = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_ali_voice *pvoice = runtime->private_data;
unsigned int cso;
spin_lock(&codec->reg_lock);
if (!pvoice... | [
0,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c |
static int snd_ali_playback_open(struct snd_pcm_substream *substream) {
return snd_ali_open(substream, 0, -1, &snd_ali_playback);
} | [
0,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c |
static int snd_ali_close(struct snd_pcm_substream *substream) {
struct snd_ali *codec = snd_pcm_substream_chip(substream);
struct snd_ali_voice *pvoice = substream->runtime->private_data;
snd_ali_disable_special_channel(codec, pvoice->number);
return 0;
} | [
1,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c | static int snd_ali_modem_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params) {
struct snd_ali *chip = snd_pcm_substream_chip(substream);
unsigned int modem_num = chip->num_of_codecs - 1;
snd_ac97_write(chip->ac97[modem_num], AC97_LINE1_RATE,
... | [
1,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c |
static int snd_ali_modem_playback_open(struct snd_pcm_substream *substream) {
return snd_ali_modem_open(substream, 0, ALI_MODEM_OUT_CHANNEL);
} | [
0,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c |
static int snd_ali_modem_capture_open(struct snd_pcm_substream *substream) {
return snd_ali_modem_open(substream, 1, ALI_MODEM_IN_CHANNEL);
} | [
0,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c |
static void snd_ali_pcm_free(struct snd_pcm *pcm) {
struct snd_ali *codec = pcm->private_data;
codec->pcm[pcm->device] = NULL;
} | [
0,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c | static int ali_resume(struct device *dev) {
struct snd_card *card = dev_get_drvdata(dev);
struct snd_ali *chip = card->private_data;
struct snd_ali_image *im;
int i, j;
im = chip->image;
if (!im)
return 0;
spin_lock_irq(&chip->reg_lock);
for (i = 0; i < ALI_CHANNELS; i++) {
outb(i, ALI_REG(ch... | [
1,
0
] |
Linux Kernel | sound/pci/ali5451/ali5451.c |
static int __snd_ali_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id) {
struct snd_card *card;
struct snd_ali *codec;
int err;
dev_dbg(&pci->dev, "probe ...\n");
err = snd_devm_card_new(&pci->dev, index, id, THIS_MODULE, sizeof(*codec),
&ca... | [
1,
0
] |
Linux Kernel | sound/pci/als300.c | static irqreturn_t snd_als300_interrupt(int irq, void *dev_id) {
u8 status;
struct snd_als300 *chip = dev_id;
struct snd_als300_substream_data *data;
status = inb(chip->port + ALS300_IRQ_STATUS);
if (!status)
return IRQ_NONE;
/* ACK everything ASAP */
outb(status, chip->port + ALS300_IRQ_STATUS);
... | [
1,
0
] |
Linux Kernel | sound/pci/als300.c | static irqreturn_t snd_als300plus_interrupt(int irq, void *dev_id) {
u8 general, mpu, dram;
struct snd_als300 *chip = dev_id;
struct snd_als300_substream_data *data;
general = inb(chip->port + ALS300P_IRQ_STATUS);
mpu = inb(chip->port + MPU_IRQ_STATUS);
dram = inb(chip->port + ALS300P_DRAM_IRQ_STATUS);
... | [
1,
1
] |
Linux Kernel | sound/pci/als300.c |
static void snd_als300_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
unsigned short val) {
int i;
struct snd_als300 *chip = ac97->private_data;
for (i = 0; i < 1000; i++) {
if ((inb(chip->port + AC97_STATUS) & (AC97_BUSY)) == 0)
break;
udelay(10);
}
ou... | [
1,
0
] |
Linux Kernel | sound/pci/als300.c |
static int snd_als300_playback_open(struct snd_pcm_substream *substream) {
struct snd_als300 *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_als300_substream_data *data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data)
return -ENOMEM;
chip->play... | [
0,
0
] |
Linux Kernel | sound/pci/als300.c |
static int snd_als300_capture_open(struct snd_pcm_substream *substream) {
struct snd_als300 *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_als300_substream_data *data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data)
return -ENOMEM;
chip->captu... | [
0,
0
] |
Linux Kernel | sound/pci/als300.c | static int snd_als300_playback_prepare(struct snd_pcm_substream *substream) {
u32 tmp;
struct snd_als300 *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
unsigned short period_bytes = snd_pcm_lib_period_bytes(substream);
unsigned short buffer_bytes = snd_pcm_lib... | [
1,
0
] |
Linux Kernel | sound/pci/als300.c |
static snd_pcm_uframes_t
snd_als300_pointer(struct snd_pcm_substream *substream) {
u16 current_ptr;
struct snd_als300 *chip = snd_pcm_substream_chip(substream);
struct snd_als300_substream_data *data;
unsigned short period_bytes;
data = substream->runtime->private_data;
period_bytes = snd_pcm_lib_period_b... | [
0,
0
] |
Linux Kernel | sound/pci/als4000.c |
static inline u8 snd_als4k_iobase_readb(unsigned long iobase,
enum als4k_iobase_t reg) {
return inb(iobase + reg);
} | [
0,
0
] |
Linux Kernel | sound/pci/als4000.c |
static inline u32 snd_als4k_iobase_readl(unsigned long iobase,
enum als4k_iobase_t reg) {
return inl(iobase + reg);
} | [
0,
0
] |
Linux Kernel | sound/pci/als4000.c | static inline void snd_als4_cr_write(struct snd_sb *chip, enum als4k_cr_t reg,
u8 data) {
snd_sbmixer_write(chip, reg | 0xc0, data);
} | [
0,
0
] |
Linux Kernel | sound/pci/als4000.c | static inline u8 snd_als4_cr_read(struct snd_sb *chip, enum als4k_cr_t reg) {
return snd_sbmixer_read(chip, reg | 0xc0);
} | [
0,
0
] |
Linux Kernel | sound/pci/als4000.c |
static void snd_als4000_set_rate(struct snd_sb *chip, unsigned int rate) {
if (!(chip->mode & SB_RATE_LOCK)) {
snd_sbdsp_command(chip, SB_DSP_SAMPLE_RATE_OUT);
snd_sbdsp_command(chip, rate >> 8);
snd_sbdsp_command(chip, rate);
}
} | [
0,
0
] |
Linux Kernel | sound/pci/als4000.c | static int snd_als4000_playback_prepare(struct snd_pcm_substream *substream) {
struct snd_sb *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
unsigned long size;
unsigned count;
chip->playback_format = snd_als4000_get_format(runtime);
size = snd_pcm_lib_buff... | [
1,
1
] |
Linux Kernel | sound/pci/als4000.c | static int snd_als4000_capture_trigger(struct snd_pcm_substream *substream,
int cmd) {
struct snd_sb *chip = snd_pcm_substream_chip(substream);
int result = 0;
/* FIXME race condition in here!!!
chip->mode non-atomic update gets consistently protected
by reg_lock ... | [
0,
1
] |
Linux Kernel | sound/pci/als4000.c |
static snd_pcm_uframes_t
snd_als4000_playback_pointer(struct snd_pcm_substream *substream) {
struct snd_sb *chip = snd_pcm_substream_chip(substream);
unsigned result;
spin_lock(&chip->reg_lock);
result = snd_als4k_gcr_read(chip, ALS4K_GCRA0_FIFO1_CURRENT_ADDR);
spin_unlock(&chip->reg_lock);
result &= 0xff... | [
1,
0
] |
Linux Kernel | sound/pci/als4000.c |
static int snd_als4000_playback_close(struct snd_pcm_substream *substream) {
struct snd_sb *chip = snd_pcm_substream_chip(substream);
chip->playback_substream = NULL;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/als4000.c |
static int snd_als4000_capture_open(struct snd_pcm_substream *substream) {
struct snd_sb *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
chip->capture_substream = substream;
runtime->hw = snd_als4000_capture;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/als4000.c |
static int snd_als4000_capture_close(struct snd_pcm_substream *substream) {
struct snd_sb *chip = snd_pcm_substream_chip(substream);
chip->capture_substream = NULL;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/als4000.c |
static int snd_als4000_pcm(struct snd_sb *chip, int device) {
struct snd_pcm *pcm;
int err;
err = snd_pcm_new(chip->card, "ALS4000 DSP", device, 1, 1, &pcm);
if (err < 0)
return err;
pcm->private_data = chip;
pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX;
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBA... | [
1,
0
] |
Linux Kernel | sound/pci/als4000.c | static int snd_als4000_create_gameport(struct snd_card_als4000 *acard,
int dev) {
struct gameport *gp;
struct resource *r;
int io_port;
if (joystick_port[dev] == 0)
return -ENODEV;
if (joystick_port[dev] == 1) {
for (io_port = 0x200; io_port <= 0x218; io_port +... | [
1,
0
] |
Linux Kernel | sound/pci/als4000.c | static void snd_card_als4000_free(struct snd_card *card) {
struct snd_card_als4000 *acard = card->private_data;
snd_als4k_gcr_write_addr(acard->iobase, ALS4K_GCR8C_MISC_CTRL, 0);
/* free resources */
snd_als4000_free_gameport(acard);
} | [
0,
0
] |
Linux Kernel | sound/pci/als4000.c |
static int snd_card_als4000_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id) {
return snd_card_free_on_error(&pci->dev,
__snd_card_als4000_probe(pci, pci_id));
}
#ifdef CONFIG_PM_SLEEP | [
0,
0
] |
Linux Kernel | sound/pci/asihpi/asihpi.c | static u16 hpi_stream_host_buffer_attach(
u32 h_stream, u32 size_in_bytes, /* size in bytes of bus mastering buffer */
u32 pci_address) {
struct hpi_message hm;
struct hpi_response hr;
unsigned int obj = hpi_handle_object(h_stream);
if (!h_stream)
return HPI_ERROR_INVALID_OBJ;
hpi_init_message_re... | [
1,
0
] |
Linux Kernel | sound/pci/asihpi/asihpi.c |
static u16 handle_error(u16 err, int line, char *filename) {
if (err)
printk(KERN_WARNING "in file %s, line %d: HPI error %d\n", filename, line,
err);
return err;
} | [
0,
0
] |
Linux Kernel | sound/pci/asihpi/asihpi.c |
static void snd_card_asihpi_runtime_free(struct snd_pcm_runtime *runtime) {
struct snd_card_asihpi_pcm *dpcm = runtime->private_data;
kfree(dpcm);
} | [
0,
0
] |
Linux Kernel | sound/pci/asihpi/asihpi.c |
static void snd_card_asihpi_pcm_int_stop(struct snd_pcm_substream *substream) {
struct snd_card_asihpi *card;
card = snd_pcm_substream_chip(substream);
hpi_handle_error(hpi_adapter_set_property(
card->hpi->adapter->index, HPI_ADAPTER_PROPERTY_IRQ_RATE, 0, 0));
card->llmode_streampriv = NULL;
} | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.