]> git.neil.brown.name Git - history.git/commitdiff
ALSA CVS update - Takashi Iwai <tiwai@suse.de>
authorJaroslav Kysela <perex@suse.cz>
Mon, 29 Mar 2004 14:22:19 +0000 (16:22 +0200)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 29 Mar 2004 14:22:19 +0000 (16:22 +0200)
Documentation,I2C cs8427,ICE1712 driver
fixed cs8427_timeout option to use the correct value in msec.

Documentation/sound/alsa/ALSA-Configuration.txt
sound/i2c/cs8427.c
sound/pci/ice1712/ice1712.c

index 4b8bb27fddce13072ca18c2ee7bc5abab6e170d3..0badcacd9dc073e0c53629dfe214cb25058564ba 100644 (file)
@@ -612,7 +612,7 @@ Module parameters
 
     omni       - Omni I/O support for MidiMan M-Audio Delta44/66
     cs8427_timeout - reset timeout for the CS8427 chip (S/PDIF transciever)
-                     in msec resolution, default value is 50 (0.5 sec)
+                     in msec resolution, default value is 500 (0.5 sec)
 
     Module supports up to 8 cards and autoprobe. Note: The consumer part
     is not used with all Envy24 based cards (for example in the MidiMan Delta
index 8186159a7365706025772e887c2dfb0cd7260482..c8f148ea2ee93fa3df464ea164c1ead7ae165888 100644 (file)
@@ -258,6 +258,8 @@ int snd_cs8427_create(snd_i2c_bus_t *bus,
        snd_i2c_unlock(bus);
 
        /* turn on run bit and rock'n'roll */
+       if (reset_timeout < 1)
+               reset_timeout = 1;
        chip->reset_timeout = reset_timeout;
        snd_cs8427_reset(device);
 
@@ -312,7 +314,7 @@ void snd_cs8427_reset(snd_i2c_device_t *cs8427)
                if (!(data & CS8427_UNLOCK))
                        break;
                set_current_state(TASK_UNINTERRUPTIBLE);
-               schedule_timeout(HZ/100);
+               schedule_timeout(1);
        }
        snd_i2c_lock(cs8427->bus);
        chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~CS8427_RXDMASK;
index 546088e508846f9322cdeb455b032b11ccac7d3a..f8efa93439d3035ec34a92cebd3588f5b835f21b 100644 (file)
@@ -82,7 +82,7 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;    /* Index 0-MAX */
 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;      /* ID for this card */
 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;             /* Enable this card */
 static int omni[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0};  /* Delta44 & 66 Omni I/O support */
-static int cs8427_timeout[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 50}; /* CS8427 S/PDIF transciever reset timeout value in HZ/100 */
+static int cs8427_timeout[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 500}; /* CS8427 S/PDIF transciever reset timeout value in msec */
 
 MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
 MODULE_PARM_DESC(index, "Index value for ICE1712 soundcard.");
@@ -97,8 +97,8 @@ MODULE_PARM(omni, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
 MODULE_PARM_DESC(omni, "Enable Midiman M-Audio Delta Omni I/O support.");
 MODULE_PARM_SYNTAX(omni, SNDRV_ENABLED "," SNDRV_ENABLE_DESC);
 MODULE_PARM(cs8427_timeout, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(cs8427_timeout, "Define reset timeout for cs8427 chip in HZ/100 resolution.");
-MODULE_PARM_SYNTAX(cs8427_timeout, SNDRV_ENABLED ", allows:{{1,100}},default=50,skill:advanced");
+MODULE_PARM_DESC(cs8427_timeout, "Define reset timeout for cs8427 chip in msec resolution.");
+MODULE_PARM_SYNTAX(cs8427_timeout, SNDRV_ENABLED ", allows:{{1,1000}},default=500,skill:advanced");
 
 #ifndef PCI_VENDOR_ID_ICE
 #define PCI_VENDOR_ID_ICE              0x1412
@@ -391,7 +391,7 @@ int __devinit snd_ice1712_init_cs8427(ice1712_t *ice, int addr)
        int err;
 
        if ((err = snd_cs8427_create(ice->i2c, addr,
-                                    (ice->cs8427_timeout * HZ) / 100,
+                                    (ice->cs8427_timeout * HZ) / 1000,
                                     &ice->cs8427)) < 0) {
                snd_printk("CS8427 initialization failed\n");
                return err;
@@ -2437,8 +2437,8 @@ static int __devinit snd_ice1712_create(snd_card_t * card,
        ice->omni = omni ? 1 : 0;
        if (cs8427_timeout < 1)
                cs8427_timeout = 1;
-       else if (cs8427_timeout > 100)
-               cs8427_timeout = 100;
+       else if (cs8427_timeout > 1000)
+               cs8427_timeout = 1000;
        ice->cs8427_timeout = cs8427_timeout;
        spin_lock_init(&ice->reg_lock);
        init_MUTEX(&ice->gpio_mutex);