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

Diff of /alsa/alsa-kernel/pci/cs46xx/cs46xx_lib.c

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

revision 1.2 by vizard, Sat May 31 02:35:11 2003 UTC revision 1.3 by vizard, Mon Aug 11 00:06:40 2003 UTC
# Line 2743  int __devinit snd_cs46xx_midi(cs46xx_t * Line 2743  int __devinit snd_cs46xx_midi(cs46xx_t *
2743   * gameport interface   * gameport interface
2744   */   */
2745    
2746  #if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)  #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
2747    
2748  typedef struct snd_cs46xx_gameport {  typedef struct snd_cs46xx_gameport {
2749          struct gameport info;          struct gameport info;
# Line 2960  static int snd_cs46xx_free(cs46xx_t *chi Line 2960  static int snd_cs46xx_free(cs46xx_t *chi
2960          if (chip->active_ctrl)          if (chip->active_ctrl)
2961                  chip->active_ctrl(chip, 1);                  chip->active_ctrl(chip, 1);
2962    
2963  #if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)  #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
2964          if (chip->gameport) {          if (chip->gameport) {
2965                  gameport_unregister_port(&chip->gameport->info);                  gameport_unregister_port(&chip->gameport->info);
2966                  kfree(chip->gameport);                  kfree(chip->gameport);
# Line 3010  static int snd_cs46xx_dev_free(snd_devic Line 3010  static int snd_cs46xx_dev_free(snd_devic
3010  /*  /*
3011   *  initialize chip   *  initialize chip
3012   */   */
3013  static int snd_cs46xx_chip_init(cs46xx_t *chip, int busywait)  static int snd_cs46xx_chip_init(cs46xx_t *chip)
3014  {  {
3015          int timeout;          int timeout;
3016    
# Line 3090  static int snd_cs46xx_chip_init(cs46xx_t Line 3090  static int snd_cs46xx_chip_init(cs46xx_t
3090          /*          /*
3091           *  Wait until the PLL has stabilized.           *  Wait until the PLL has stabilized.
3092           */           */
3093          mdelay(100); /* FIXME: schedule? */          set_current_state(TASK_UNINTERRUPTIBLE);
3094            schedule_timeout(HZ/10); /* 100ms */
3095    
3096          /*          /*
3097           *  Turn on clocking of the core so that we can setup the serial ports.           *  Turn on clocking of the core so that we can setup the serial ports.
# Line 3143  static int snd_cs46xx_chip_init(cs46xx_t Line 3144  static int snd_cs46xx_chip_init(cs46xx_t
3144                   */                   */
3145                  if (snd_cs46xx_peekBA0(chip, BA0_ACSTS) & ACSTS_CRDY)                  if (snd_cs46xx_peekBA0(chip, BA0_ACSTS) & ACSTS_CRDY)
3146                          goto ok1;                          goto ok1;
3147                  if (busywait)                  set_current_state(TASK_UNINTERRUPTIBLE);
3148                          mdelay(10);                  schedule_timeout((HZ+99)/100);
                 else {  
                         set_current_state(TASK_UNINTERRUPTIBLE);  
                         schedule_timeout((HZ+99)/100);  
                 }  
3149          }          }
3150    
3151    
# Line 3197  static int snd_cs46xx_chip_init(cs46xx_t Line 3194  static int snd_cs46xx_chip_init(cs46xx_t
3194                   */                   */
3195                  if ((snd_cs46xx_peekBA0(chip, BA0_ACISV) & (ACISV_ISV3 | ACISV_ISV4)) == (ACISV_ISV3 | ACISV_ISV4))                  if ((snd_cs46xx_peekBA0(chip, BA0_ACISV) & (ACISV_ISV3 | ACISV_ISV4)) == (ACISV_ISV3 | ACISV_ISV4))
3196                          goto ok2;                          goto ok2;
3197                  if (busywait)                  set_current_state(TASK_UNINTERRUPTIBLE);
3198                          mdelay(10);                  schedule_timeout((HZ+99)/100);
                 else {  
                         set_current_state(TASK_UNINTERRUPTIBLE);  
                         schedule_timeout((HZ+99)/100);  
                 }  
3199          }          }
3200    
3201  #ifndef CONFIG_SND_CS46XX_NEW_DSP  #ifndef CONFIG_SND_CS46XX_NEW_DSP
# Line 3811  void snd_cs46xx_resume(cs46xx_t *chip) Line 3804  void snd_cs46xx_resume(cs46xx_t *chip)
3804          chip->amplifier = 0;          chip->amplifier = 0;
3805          chip->active_ctrl(chip, 1); /* force to on */          chip->active_ctrl(chip, 1); /* force to on */
3806    
3807          snd_cs46xx_chip_init(chip, 1);          snd_cs46xx_chip_init(chip);
3808    
3809  #if 0  #if 0
3810          snd_cs46xx_codec_write(chip, BA0_AC97_GENERAL_PURPOSE,          snd_cs46xx_codec_write(chip, BA0_AC97_GENERAL_PURPOSE,
# Line 3992  int __devinit snd_cs46xx_create(snd_card Line 3985  int __devinit snd_cs46xx_create(snd_card
3985          }          }
3986  #endif  #endif
3987    
3988          err = snd_cs46xx_chip_init(chip, 0);          err = snd_cs46xx_chip_init(chip);
3989          if (err < 0) {          if (err < 0) {
3990                  snd_cs46xx_free(chip);                  snd_cs46xx_free(chip);
3991                  return err;                  return err;

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

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