/[openvortex]/alsa/alsa-kernel/pci/ens1370.c
ViewVC logotype

Diff of /alsa/alsa-kernel/pci/ens1370.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by vizard, Sun Jun 15 21:01:31 2003 UTC revision 1.4 by vizard, Mon Aug 11 00:06:39 2003 UTC
# Line 409  struct _snd_ensoniq { Line 409  struct _snd_ensoniq {
409          dma_addr_t bugbuf_addr;          dma_addr_t bugbuf_addr;
410  #endif  #endif
411    
412  #if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)  #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
413          struct gameport gameport;          struct gameport gameport;
414          struct semaphore joy_sem;       // gameport configuration semaphore          struct semaphore joy_sem;       // gameport configuration semaphore
415  #endif  #endif
# Line 1559  static int snd_ensoniq_1371_mixer(ensoni Line 1559  static int snd_ensoniq_1371_mixer(ensoni
1559  #endif /* CHIP1371 */  #endif /* CHIP1371 */
1560    
1561  /* generic control callbacks for ens1370 and for joystick */  /* generic control callbacks for ens1370 and for joystick */
1562  #if defined(CHIP1370) || defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)  #if defined(CHIP1370) || defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
1563  #define ENSONIQ_CONTROL(xname, mask) \  #define ENSONIQ_CONTROL(xname, mask) \
1564  { .iface = SNDRV_CTL_ELEM_IFACE_CARD, .name = xname, .info = snd_ensoniq_control_info, \  { .iface = SNDRV_CTL_ELEM_IFACE_CARD, .name = xname, .info = snd_ensoniq_control_info, \
1565    .get = snd_ensoniq_control_get, .put = snd_ensoniq_control_put, \    .get = snd_ensoniq_control_get, .put = snd_ensoniq_control_put, \
# Line 1634  static int __devinit snd_ensoniq_1370_mi Line 1634  static int __devinit snd_ensoniq_1370_mi
1634    
1635          /* try reset AK4531 */          /* try reset AK4531 */
1636          outw(ES_1370_CODEC_WRITE(AK4531_RESET, 0x02), ES_REG(ensoniq, 1370_CODEC));          outw(ES_1370_CODEC_WRITE(AK4531_RESET, 0x02), ES_REG(ensoniq, 1370_CODEC));
1637            inw(ES_REG(ensoniq, 1370_CODEC));
1638          udelay(100);          udelay(100);
1639          outw(ES_1370_CODEC_WRITE(AK4531_RESET, 0x03), ES_REG(ensoniq, 1370_CODEC));          outw(ES_1370_CODEC_WRITE(AK4531_RESET, 0x03), ES_REG(ensoniq, 1370_CODEC));
1640            inw(ES_REG(ensoniq, 1370_CODEC));
1641          udelay(100);          udelay(100);
1642    
1643          memset(&ak4531, 0, sizeof(ak4531));          memset(&ak4531, 0, sizeof(ak4531));
# Line 1655  static int __devinit snd_ensoniq_1370_mi Line 1657  static int __devinit snd_ensoniq_1370_mi
1657   *  General Switches...   *  General Switches...
1658   */   */
1659    
1660  #if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)  #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
1661  /* MQ: gameport driver connectivity */  /* MQ: gameport driver connectivity */
1662  #define ENSONIQ_JOY_CONTROL(xname, mask) \  #define ENSONIQ_JOY_CONTROL(xname, mask) \
1663  { .iface = SNDRV_CTL_ELEM_IFACE_CARD, .name = xname, .info = snd_ensoniq_control_info, \  { .iface = SNDRV_CTL_ELEM_IFACE_CARD, .name = xname, .info = snd_ensoniq_control_info, \
# Line 1812  static void __devinit snd_ensoniq_proc_i Line 1814  static void __devinit snd_ensoniq_proc_i
1814    
1815  static int snd_ensoniq_free(ensoniq_t *ensoniq)  static int snd_ensoniq_free(ensoniq_t *ensoniq)
1816  {  {
1817  #if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)  #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
1818          if (ensoniq->ctrl & ES_JYSTK_EN)          if (ensoniq->ctrl & ES_JYSTK_EN)
1819                  snd_ensoniq_joy_disable(ensoniq);                  snd_ensoniq_joy_disable(ensoniq);
1820  #endif  #endif
# Line 1975  static int __devinit snd_ensoniq_create( Line 1977  static int __devinit snd_ensoniq_create(
1977                  }                  }
1978          /* AC'97 warm reset to start the bitclk */          /* AC'97 warm reset to start the bitclk */
1979          outl(ensoniq->ctrl | ES_1371_SYNC_RES, ES_REG(ensoniq, CONTROL));          outl(ensoniq->ctrl | ES_1371_SYNC_RES, ES_REG(ensoniq, CONTROL));
1980            inl(ES_REG(ensoniq, CONTROL));
1981          udelay(20);          udelay(20);
1982          outl(ensoniq->ctrl, ES_REG(ensoniq, CONTROL));          outl(ensoniq->ctrl, ES_REG(ensoniq, CONTROL));
1983          /* Init the sample rate converter */          /* Init the sample rate converter */
# Line 2009  static int __devinit snd_ensoniq_create( Line 2012  static int __devinit snd_ensoniq_create(
2012          outb(ensoniq->uartc = 0x00, ES_REG(ensoniq, UART_CONTROL));          outb(ensoniq->uartc = 0x00, ES_REG(ensoniq, UART_CONTROL));
2013          outb(0x00, ES_REG(ensoniq, UART_RES));          outb(0x00, ES_REG(ensoniq, UART_RES));
2014          outl(ensoniq->cssr, ES_REG(ensoniq, STATUS));          outl(ensoniq->cssr, ES_REG(ensoniq, STATUS));
2015  #if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)  #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
2016          init_MUTEX(&ensoniq->joy_sem);          init_MUTEX(&ensoniq->joy_sem);
2017  #ifdef CHIP1371  #ifdef CHIP1371
2018          snd_ctl_add(card, snd_ctl_new1(&snd_es1371_joystick_addr, ensoniq));          snd_ctl_add(card, snd_ctl_new1(&snd_es1371_joystick_addr, ensoniq));

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26