Lines Matching refs:devc

73 #define REG(x)	(devc->base+x)
144 static pss_confdata *devc = &pss_data; variable
153 static void pss_write(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(pss_confdata * devc, int dev, int irq) in set_irq() argument
235 static void set_io_base(pss_confdata * devc, int dev, int base) in set_io_base() argument
243 static int set_dma(pss_confdata * devc, int dev, int dma) in set_dma() argument
267 static int pss_reset_dsp(pss_confdata * devc) in pss_reset_dsp() argument
278 static int pss_put_dspword(pss_confdata * devc, unsigned short word) in pss_put_dspword() argument
294 static int pss_get_dspword(pss_confdata * devc, unsigned short *word) in pss_get_dspword() argument
310 static int pss_download_boot(pss_confdata * devc, unsigned char *block, int size, int flags) in pss_download_boot() argument
326 pss_reset_dsp(devc); in pss_download_boot()
400 static void set_master_volume(pss_confdata *devc, int left, int right) in set_master_volume() argument
413 pss_write(devc, 0x0010); in set_master_volume()
414 pss_write(devc, log_scale[left] | 0x0000); in set_master_volume()
415 pss_write(devc, 0x0010); in set_master_volume()
416 pss_write(devc, log_scale[right] | 0x0100); in set_master_volume()
419 static void set_synth_volume(pss_confdata *devc, int volume) in set_synth_volume() argument
422 pss_write(devc, 0x0080); in set_synth_volume()
423 pss_write(devc, vol); in set_synth_volume()
424 pss_write(devc, 0x0081); in set_synth_volume()
425 pss_write(devc, vol); in set_synth_volume()
428 static void set_bass(pss_confdata *devc, int level) in set_bass() argument
431 pss_write(devc, 0x0010); in set_bass()
432 pss_write(devc, vol | 0x0200); in set_bass()
435 static void set_treble(pss_confdata *devc, int level) in set_treble() argument
438 pss_write(devc, 0x0010); in set_treble()
439 pss_write(devc, vol | 0x0300); in set_treble()
442 static void pss_mixer_reset(pss_confdata *devc) in pss_mixer_reset() argument
444 set_master_volume(devc, 33, 33); in pss_mixer_reset()
445 set_bass(devc, 50); in pss_mixer_reset()
446 set_treble(devc, 50); in pss_mixer_reset()
447 set_synth_volume(devc, 30); in pss_mixer_reset()
448 pss_write (devc, 0x0010); in pss_mixer_reset()
449 pss_write (devc, 0x0800 | 0xce); /* Stereo */ in pss_mixer_reset()
453 devc->mixer.volume_l = devc->mixer.volume_r = 33; in pss_mixer_reset()
454 devc->mixer.bass = 50; in pss_mixer_reset()
455 devc->mixer.treble = 50; in pss_mixer_reset()
456 devc->mixer.synth = 30; in pss_mixer_reset()
502 static int call_ad_mixer(pss_confdata *devc,unsigned int cmd, void __user *arg) in call_ad_mixer() argument
504 if (devc->ad_mixer_dev != NO_WSS_MIXER) in call_ad_mixer()
505 return mixer_devs[devc->ad_mixer_dev]->ioctl(devc->ad_mixer_dev, cmd, arg); in call_ad_mixer()
512 pss_confdata *devc = mixer_devs[dev]->devc; in pss_mixer_ioctl() local
521 return call_ad_mixer(devc, cmd, arg); in pss_mixer_ioctl()
532 if (devc->ad_mixer_dev != NO_WSS_MIXER) in pss_mixer_ioctl()
533 return call_ad_mixer(devc, cmd, arg); in pss_mixer_ioctl()
545 &devc->mixer.volume_l, in pss_mixer_ioctl()
546 &devc->mixer.volume_r)) in pss_mixer_ioctl()
548 set_master_volume(devc, devc->mixer.volume_l, in pss_mixer_ioctl()
549 devc->mixer.volume_r); in pss_mixer_ioctl()
550 return ret_vol_stereo(devc->mixer.volume_l, in pss_mixer_ioctl()
551 devc->mixer.volume_r); in pss_mixer_ioctl()
554 if (set_volume_mono(arg, &devc->mixer.bass)) in pss_mixer_ioctl()
556 set_bass(devc, devc->mixer.bass); in pss_mixer_ioctl()
557 return ret_vol_mono(devc->mixer.bass); in pss_mixer_ioctl()
560 if (set_volume_mono(arg, &devc->mixer.treble)) in pss_mixer_ioctl()
562 set_treble(devc, devc->mixer.treble); in pss_mixer_ioctl()
563 return ret_vol_mono(devc->mixer.treble); in pss_mixer_ioctl()
566 if (set_volume_mono(arg, &devc->mixer.synth)) in pss_mixer_ioctl()
568 set_synth_volume(devc, devc->mixer.synth); in pss_mixer_ioctl()
569 return ret_vol_mono(devc->mixer.synth); in pss_mixer_ioctl()
584 if (call_ad_mixer(devc, cmd, arg) == -EINVAL) in pss_mixer_ioctl()
591 if (call_ad_mixer(devc, cmd, arg) == -EINVAL) in pss_mixer_ioctl()
598 if (devc->ad_mixer_dev != NO_WSS_MIXER) in pss_mixer_ioctl()
599 return call_ad_mixer(devc, cmd, arg); in pss_mixer_ioctl()
603 if (devc->ad_mixer_dev != NO_WSS_MIXER) in pss_mixer_ioctl()
604 return call_ad_mixer(devc, cmd, arg); in pss_mixer_ioctl()
609 if (devc->ad_mixer_dev != NO_WSS_MIXER) in pss_mixer_ioctl()
610 return call_ad_mixer(devc, cmd, arg); in pss_mixer_ioctl()
614 or_mask = ret_vol_stereo(devc->mixer.volume_l, devc->mixer.volume_r); in pss_mixer_ioctl()
618 or_mask = ret_vol_mono(devc->mixer.bass); in pss_mixer_ioctl()
622 or_mask = ret_vol_mono(devc->mixer.treble); in pss_mixer_ioctl()
626 or_mask = ret_vol_mono(devc->mixer.synth); in pss_mixer_ioctl()
679 set_io_base(devc, CONF_CDROM, pss_cdrom_port); in configure_nonsound_components()
689 devc->base = hw_config->io_base; in attach_pss()
690 devc->irq = hw_config->irq; in attach_pss()
691 devc->dma = hw_config->dma; in attach_pss()
692 devc->osp = hw_config->osp; in attach_pss()
693 devc->ad_mixer_dev = NO_WSS_MIXER; in attach_pss()
714 if (!set_irq(devc, CONF_PSS, devc->irq)) in attach_pss()
721 if (!set_dma(devc, CONF_PSS, devc->dma)) in attach_pss()
751 set_io_base(devc, CONF_MIDI, hw_config->io_base); in probe_pss_mpu()
752 if (!set_irq(devc, CONF_MIDI, hw_config->irq)) { in probe_pss_mpu()
760 if (!pss_download_boot(devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST)) { in probe_pss_mpu()
801 if (!pss_download_boot(devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST)) in pss_coproc_open()
823 if (!pss_download_boot(devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST)) in pss_coproc_reset()
835 if (!pss_download_boot(devc, buf->data, buf->len, buf->flags)) in download_boot_block()
884 if (!pss_put_dspword(devc, *data++)) { in pss_coproc_ioctl()
905 if (!pss_get_dspword(devc, data++)) { in pss_coproc_ioctl()
921 if (!pss_put_dspword(devc, 0x00d0)) { in pss_coproc_ioctl()
925 if (!pss_put_dspword(devc, (unsigned short)(dbuf.parm1 & 0xffff))) { in pss_coproc_ioctl()
929 if (!pss_get_dspword(devc, &tmp)) { in pss_coproc_ioctl()
943 if (!pss_put_dspword(devc, 0x00d1)) { in pss_coproc_ioctl()
947 if (!pss_put_dspword(devc, (unsigned short) (dbuf.parm1 & 0xffff))) { in pss_coproc_ioctl()
952 if (!pss_put_dspword(devc, tmp)) { in pss_coproc_ioctl()
963 if (!pss_put_dspword(devc, 0x00d3)) { in pss_coproc_ioctl()
967 if (!pss_put_dspword(devc, (unsigned short)(dbuf.parm1 & 0xffff))) { in pss_coproc_ioctl()
972 if (!pss_put_dspword(devc, tmp)) { in pss_coproc_ioctl()
977 if (!pss_put_dspword(devc, tmp)) { in pss_coproc_ioctl()
988 if (!pss_put_dspword(devc, 0x00d2)) { in pss_coproc_ioctl()
992 if (!pss_put_dspword(devc, (unsigned short)(dbuf.parm1 & 0xffff))) { in pss_coproc_ioctl()
996 if (!pss_get_dspword(devc, &tmp)) { /* Read MSB */ in pss_coproc_ioctl()
1001 if (!pss_get_dspword(devc, &tmp)) { /* Read LSB */ in pss_coproc_ioctl()
1047 set_io_base(devc, CONF_WSS, hw_config->io_base); in probe_pss_mss()
1048 if (!set_irq(devc, CONF_WSS, hw_config->irq)) { in probe_pss_mss()
1052 if (!set_dma(devc, CONF_WSS, hw_config->dma)) { in probe_pss_mss()
1075 devc->ad_mixer_dev = NO_WSS_MIXER; in probe_pss_mss()
1082 devc)) < 0) in probe_pss_mss()
1088 pss_mixer_reset(devc); in probe_pss_mss()
1098 devc->ad_mixer_dev = audio_devs[hw_config->slots[0]]->mixer_dev; in probe_pss_mss()