• Home
  • Raw
  • Download

Lines Matching refs:devc

73 #define REG(x)	(devc->base+x)
144 static struct pss_confdata *devc = &pss_data; variable
153 static void pss_write(struct pss_confdata *devc, int data) in pss_write() argument
182 devc->base = hw_config->io_base; in probe_pss()
183 irq = devc->irq = hw_config->irq; in probe_pss()
184 dma = devc->dma = hw_config->dma; in probe_pss()
185 devc->osp = hw_config->osp; in probe_pss()
187 if (devc->base != 0x220 && devc->base != 0x240) in probe_pss()
188 if (devc->base != 0x230 && devc->base != 0x250) /* Some cards use these */ in probe_pss()
191 if (!request_region(devc->base, 0x10, "PSS mixer, SB emulation")) { in probe_pss()
197 printk(KERN_ERR "No PSS signature detected at 0x%x (0x%x)\n", devc->base, id); in probe_pss()
198 release_region(devc->base, 0x10); in probe_pss()
201 if (!request_region(devc->base + 0x10, 0x9, "PSS config")) { in probe_pss()
203 release_region(devc->base, 0x10); in probe_pss()
209 static int set_irq(struct pss_confdata *devc, int dev, int irq) in set_irq() argument
235 static void set_io_base(struct pss_confdata *devc, int dev, int base) in set_io_base() argument
243 static int set_dma(struct pss_confdata *devc, int dev, int dma) in set_dma() argument
267 static int pss_reset_dsp(struct pss_confdata *devc) in pss_reset_dsp() argument
278 static int pss_put_dspword(struct pss_confdata *devc, unsigned short word) in pss_put_dspword() argument
294 static int pss_get_dspword(struct pss_confdata *devc, unsigned short *word) in pss_get_dspword() argument
310 static int pss_download_boot(struct pss_confdata *devc, unsigned char *block, in pss_download_boot() argument
327 pss_reset_dsp(devc); in pss_download_boot()
401 static void set_master_volume(struct pss_confdata *devc, int left, int right) in set_master_volume() argument
414 pss_write(devc, 0x0010); in set_master_volume()
415 pss_write(devc, log_scale[left] | 0x0000); in set_master_volume()
416 pss_write(devc, 0x0010); in set_master_volume()
417 pss_write(devc, log_scale[right] | 0x0100); in set_master_volume()
420 static void set_synth_volume(struct pss_confdata *devc, int volume) in set_synth_volume() argument
423 pss_write(devc, 0x0080); in set_synth_volume()
424 pss_write(devc, vol); in set_synth_volume()
425 pss_write(devc, 0x0081); in set_synth_volume()
426 pss_write(devc, vol); in set_synth_volume()
429 static void set_bass(struct pss_confdata *devc, int level) in set_bass() argument
432 pss_write(devc, 0x0010); in set_bass()
433 pss_write(devc, vol | 0x0200); in set_bass()
436 static void set_treble(struct pss_confdata *devc, int level) in set_treble() argument
439 pss_write(devc, 0x0010); in set_treble()
440 pss_write(devc, vol | 0x0300); in set_treble()
443 static void pss_mixer_reset(struct pss_confdata *devc) in pss_mixer_reset() argument
445 set_master_volume(devc, 33, 33); in pss_mixer_reset()
446 set_bass(devc, 50); in pss_mixer_reset()
447 set_treble(devc, 50); in pss_mixer_reset()
448 set_synth_volume(devc, 30); in pss_mixer_reset()
449 pss_write (devc, 0x0010); in pss_mixer_reset()
450 pss_write (devc, 0x0800 | 0xce); /* Stereo */ in pss_mixer_reset()
454 devc->mixer.volume_l = devc->mixer.volume_r = 33; in pss_mixer_reset()
455 devc->mixer.bass = 50; in pss_mixer_reset()
456 devc->mixer.treble = 50; in pss_mixer_reset()
457 devc->mixer.synth = 30; in pss_mixer_reset()
503 static int call_ad_mixer(struct pss_confdata *devc, unsigned int cmd, in call_ad_mixer() argument
506 if (devc->ad_mixer_dev != NO_WSS_MIXER) in call_ad_mixer()
507 return mixer_devs[devc->ad_mixer_dev]->ioctl(devc->ad_mixer_dev, cmd, arg); in call_ad_mixer()
514 struct pss_confdata *devc = mixer_devs[dev]->devc; in pss_mixer_ioctl() local
523 return call_ad_mixer(devc, cmd, arg); in pss_mixer_ioctl()
534 if (devc->ad_mixer_dev != NO_WSS_MIXER) in pss_mixer_ioctl()
535 return call_ad_mixer(devc, cmd, arg); in pss_mixer_ioctl()
547 &devc->mixer.volume_l, in pss_mixer_ioctl()
548 &devc->mixer.volume_r)) in pss_mixer_ioctl()
550 set_master_volume(devc, devc->mixer.volume_l, in pss_mixer_ioctl()
551 devc->mixer.volume_r); in pss_mixer_ioctl()
552 return ret_vol_stereo(devc->mixer.volume_l, in pss_mixer_ioctl()
553 devc->mixer.volume_r); in pss_mixer_ioctl()
556 if (set_volume_mono(arg, &devc->mixer.bass)) in pss_mixer_ioctl()
558 set_bass(devc, devc->mixer.bass); in pss_mixer_ioctl()
559 return ret_vol_mono(devc->mixer.bass); in pss_mixer_ioctl()
562 if (set_volume_mono(arg, &devc->mixer.treble)) in pss_mixer_ioctl()
564 set_treble(devc, devc->mixer.treble); in pss_mixer_ioctl()
565 return ret_vol_mono(devc->mixer.treble); in pss_mixer_ioctl()
568 if (set_volume_mono(arg, &devc->mixer.synth)) in pss_mixer_ioctl()
570 set_synth_volume(devc, devc->mixer.synth); in pss_mixer_ioctl()
571 return ret_vol_mono(devc->mixer.synth); in pss_mixer_ioctl()
586 if (call_ad_mixer(devc, cmd, arg) == -EINVAL) in pss_mixer_ioctl()
593 if (call_ad_mixer(devc, cmd, arg) == -EINVAL) in pss_mixer_ioctl()
600 if (devc->ad_mixer_dev != NO_WSS_MIXER) in pss_mixer_ioctl()
601 return call_ad_mixer(devc, cmd, arg); in pss_mixer_ioctl()
605 if (devc->ad_mixer_dev != NO_WSS_MIXER) in pss_mixer_ioctl()
606 return call_ad_mixer(devc, cmd, arg); in pss_mixer_ioctl()
611 if (devc->ad_mixer_dev != NO_WSS_MIXER) in pss_mixer_ioctl()
612 return call_ad_mixer(devc, cmd, arg); in pss_mixer_ioctl()
616 or_mask = ret_vol_stereo(devc->mixer.volume_l, devc->mixer.volume_r); in pss_mixer_ioctl()
620 or_mask = ret_vol_mono(devc->mixer.bass); in pss_mixer_ioctl()
624 or_mask = ret_vol_mono(devc->mixer.treble); in pss_mixer_ioctl()
628 or_mask = ret_vol_mono(devc->mixer.synth); in pss_mixer_ioctl()
682 set_io_base(devc, CONF_CDROM, pss_cdrom_port); in configure_nonsound_components()
692 devc->base = hw_config->io_base; in attach_pss()
693 devc->irq = hw_config->irq; in attach_pss()
694 devc->dma = hw_config->dma; in attach_pss()
695 devc->osp = hw_config->osp; in attach_pss()
696 devc->ad_mixer_dev = NO_WSS_MIXER; in attach_pss()
717 if (!set_irq(devc, CONF_PSS, devc->irq)) in attach_pss()
724 if (!set_dma(devc, CONF_PSS, devc->dma)) in attach_pss()
754 set_io_base(devc, CONF_MIDI, hw_config->io_base); in probe_pss_mpu()
755 if (!set_irq(devc, CONF_MIDI, hw_config->irq)) { in probe_pss_mpu()
763 if (!pss_download_boot(devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST)) { in probe_pss_mpu()
804 if (!pss_download_boot(devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST)) in pss_coproc_open()
826 if (!pss_download_boot(devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST)) in pss_coproc_reset()
838 if (!pss_download_boot(devc, buf->data, buf->len, buf->flags)) in download_boot_block()
887 if (!pss_put_dspword(devc, *data++)) { in pss_coproc_ioctl()
908 if (!pss_get_dspword(devc, data++)) { in pss_coproc_ioctl()
924 if (!pss_put_dspword(devc, 0x00d0)) { in pss_coproc_ioctl()
928 if (!pss_put_dspword(devc, (unsigned short)(dbuf.parm1 & 0xffff))) { in pss_coproc_ioctl()
932 if (!pss_get_dspword(devc, &tmp)) { in pss_coproc_ioctl()
946 if (!pss_put_dspword(devc, 0x00d1)) { in pss_coproc_ioctl()
950 if (!pss_put_dspword(devc, (unsigned short) (dbuf.parm1 & 0xffff))) { in pss_coproc_ioctl()
955 if (!pss_put_dspword(devc, tmp)) { in pss_coproc_ioctl()
966 if (!pss_put_dspword(devc, 0x00d3)) { in pss_coproc_ioctl()
970 if (!pss_put_dspword(devc, (unsigned short)(dbuf.parm1 & 0xffff))) { in pss_coproc_ioctl()
975 if (!pss_put_dspword(devc, tmp)) { in pss_coproc_ioctl()
980 if (!pss_put_dspword(devc, tmp)) { in pss_coproc_ioctl()
991 if (!pss_put_dspword(devc, 0x00d2)) { in pss_coproc_ioctl()
995 if (!pss_put_dspword(devc, (unsigned short)(dbuf.parm1 & 0xffff))) { in pss_coproc_ioctl()
999 if (!pss_get_dspword(devc, &tmp)) { /* Read MSB */ in pss_coproc_ioctl()
1004 if (!pss_get_dspword(devc, &tmp)) { /* Read LSB */ in pss_coproc_ioctl()
1050 set_io_base(devc, CONF_WSS, hw_config->io_base); in probe_pss_mss()
1051 if (!set_irq(devc, CONF_WSS, hw_config->irq)) { in probe_pss_mss()
1055 if (!set_dma(devc, CONF_WSS, hw_config->dma)) { in probe_pss_mss()
1078 devc->ad_mixer_dev = NO_WSS_MIXER; in probe_pss_mss()
1085 devc)) < 0) in probe_pss_mss()
1091 pss_mixer_reset(devc); in probe_pss_mss()
1101 devc->ad_mixer_dev = audio_devs[hw_config->slots[0]]->mixer_dev; in probe_pss_mss()