Commit 8c83de26 authored by Jaroslav Kysela's avatar Jaroslav Kysela Committed by Linus Torvalds

ALSA CVS update - Takashi Iwai <tiwai@suse.de>

Documentation,I2C cs8427,ICE1712 driver
fixed cs8427_timeout option to use the correct value in msec.
parent cbdbd417
...@@ -612,7 +612,7 @@ Module parameters ...@@ -612,7 +612,7 @@ Module parameters
omni - Omni I/O support for MidiMan M-Audio Delta44/66 omni - Omni I/O support for MidiMan M-Audio Delta44/66
cs8427_timeout - reset timeout for the CS8427 chip (S/PDIF transciever) 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 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 is not used with all Envy24 based cards (for example in the MidiMan Delta
......
...@@ -258,6 +258,8 @@ int snd_cs8427_create(snd_i2c_bus_t *bus, ...@@ -258,6 +258,8 @@ int snd_cs8427_create(snd_i2c_bus_t *bus,
snd_i2c_unlock(bus); snd_i2c_unlock(bus);
/* turn on run bit and rock'n'roll */ /* turn on run bit and rock'n'roll */
if (reset_timeout < 1)
reset_timeout = 1;
chip->reset_timeout = reset_timeout; chip->reset_timeout = reset_timeout;
snd_cs8427_reset(device); snd_cs8427_reset(device);
...@@ -312,7 +314,7 @@ void snd_cs8427_reset(snd_i2c_device_t *cs8427) ...@@ -312,7 +314,7 @@ void snd_cs8427_reset(snd_i2c_device_t *cs8427)
if (!(data & CS8427_UNLOCK)) if (!(data & CS8427_UNLOCK))
break; break;
set_current_state(TASK_UNINTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/100); schedule_timeout(1);
} }
snd_i2c_lock(cs8427->bus); snd_i2c_lock(cs8427->bus);
chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~CS8427_RXDMASK; chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~CS8427_RXDMASK;
......
...@@ -82,7 +82,7 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ ...@@ -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 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 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 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(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
MODULE_PARM_DESC(index, "Index value for ICE1712 soundcard."); MODULE_PARM_DESC(index, "Index value for ICE1712 soundcard.");
...@@ -97,8 +97,8 @@ MODULE_PARM(omni, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); ...@@ -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_DESC(omni, "Enable Midiman M-Audio Delta Omni I/O support.");
MODULE_PARM_SYNTAX(omni, SNDRV_ENABLED "," SNDRV_ENABLE_DESC); MODULE_PARM_SYNTAX(omni, SNDRV_ENABLED "," SNDRV_ENABLE_DESC);
MODULE_PARM(cs8427_timeout, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); 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_DESC(cs8427_timeout, "Define reset timeout for cs8427 chip in msec resolution.");
MODULE_PARM_SYNTAX(cs8427_timeout, SNDRV_ENABLED ", allows:{{1,100}},default=50,skill:advanced"); MODULE_PARM_SYNTAX(cs8427_timeout, SNDRV_ENABLED ", allows:{{1,1000}},default=500,skill:advanced");
#ifndef PCI_VENDOR_ID_ICE #ifndef PCI_VENDOR_ID_ICE
#define PCI_VENDOR_ID_ICE 0x1412 #define PCI_VENDOR_ID_ICE 0x1412
...@@ -391,7 +391,7 @@ int __devinit snd_ice1712_init_cs8427(ice1712_t *ice, int addr) ...@@ -391,7 +391,7 @@ int __devinit snd_ice1712_init_cs8427(ice1712_t *ice, int addr)
int err; int err;
if ((err = snd_cs8427_create(ice->i2c, addr, if ((err = snd_cs8427_create(ice->i2c, addr,
(ice->cs8427_timeout * HZ) / 100, (ice->cs8427_timeout * HZ) / 1000,
&ice->cs8427)) < 0) { &ice->cs8427)) < 0) {
snd_printk("CS8427 initialization failed\n"); snd_printk("CS8427 initialization failed\n");
return err; return err;
...@@ -2437,8 +2437,8 @@ static int __devinit snd_ice1712_create(snd_card_t * card, ...@@ -2437,8 +2437,8 @@ static int __devinit snd_ice1712_create(snd_card_t * card,
ice->omni = omni ? 1 : 0; ice->omni = omni ? 1 : 0;
if (cs8427_timeout < 1) if (cs8427_timeout < 1)
cs8427_timeout = 1; cs8427_timeout = 1;
else if (cs8427_timeout > 100) else if (cs8427_timeout > 1000)
cs8427_timeout = 100; cs8427_timeout = 1000;
ice->cs8427_timeout = cs8427_timeout; ice->cs8427_timeout = cs8427_timeout;
spin_lock_init(&ice->reg_lock); spin_lock_init(&ice->reg_lock);
init_MUTEX(&ice->gpio_mutex); init_MUTEX(&ice->gpio_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment