Commit 74037c9b authored by Jaroslav Kysela's avatar Jaroslav Kysela

Merge suse.cz:/home/perex/bk/linux-sound/linux-sound

into suse.cz:/home/perex/bk/linux-sound/work
parents 57daa604 57cb93ad
......@@ -50,6 +50,7 @@ typedef struct _snd_pcm_oss_runtime {
unsigned int maxfrags;
unsigned int subdivision; /* requested subdivision */
size_t period_bytes; /* requested period size */
size_t period_ptr; /* actual write pointer to period */
unsigned int periods;
size_t buffer_bytes; /* requested buffer size */
size_t bytes; /* total # bytes processed */
......
......@@ -46,6 +46,7 @@ typedef struct sndrv_rawmidi_status snd_rawmidi_status_t;
#define SNDRV_RAWMIDI_LFLG_INPUT (1<<1)
#define SNDRV_RAWMIDI_LFLG_OPEN (3<<0)
#define SNDRV_RAWMIDI_LFLG_APPEND (1<<2)
#define SNDRV_RAWMIDI_LFLG_NOOPENLOCK (1<<3)
typedef struct _snd_rawmidi_runtime snd_rawmidi_runtime_t;
typedef struct _snd_rawmidi_substream snd_rawmidi_substream_t;
......
......@@ -822,10 +822,9 @@ static ssize_t snd_ctl_read(struct file *file, char *buffer, size_t count, loff_
}
init_waitqueue_entry(&wait, current);
add_wait_queue(&ctl->change_sleep, &wait);
spin_unlock_irq(&ctl->read_lock);
set_current_state(TASK_INTERRUPTIBLE);
spin_unlock_irq(&ctl->read_lock);
schedule();
set_current_state(TASK_RUNNING);
remove_wait_queue(&ctl->change_sleep, &wait);
if (signal_pending(current))
return result > 0 ? result : -ERESTARTSYS;
......
......@@ -129,13 +129,14 @@ static int snd_hwdep_open(struct inode *inode, struct file * file)
} else
break;
set_current_state(TASK_INTERRUPTIBLE);
up(&hw->open_mutex);
schedule();
down(&hw->open_mutex);
if (signal_pending(current)) {
err = -ERESTARTSYS;
break;
}
}
set_current_state(TASK_RUNNING);
remove_wait_queue(&hw->open_wait, &wait);
if (err >= 0) {
err = snd_card_file_add(hw->card, file);
......
......@@ -697,8 +697,8 @@ int snd_power_wait(snd_card_t *card, unsigned int power_state, struct file *file
}
if (file && (file->f_flags & O_NONBLOCK))
return -EAGAIN;
snd_power_unlock(card);
set_current_state(TASK_UNINTERRUPTIBLE);
snd_power_unlock(card);
schedule_timeout(30 * HZ);
snd_power_lock(card);
}
......
......@@ -142,7 +142,7 @@ static int snd_pcm_oss_format_from(int format)
case AFMT_U16_LE: return SNDRV_PCM_FORMAT_U16_LE;
case AFMT_U16_BE: return SNDRV_PCM_FORMAT_U16_BE;
case AFMT_MPEG: return SNDRV_PCM_FORMAT_MPEG;
default: return SNDRV_PCM_FORMAT_U8;
default: return SNDRV_PCM_FORMAT_U8;
}
}
......@@ -554,6 +554,7 @@ static int snd_pcm_oss_prepare(snd_pcm_substream_t *substream)
}
runtime->oss.prepare = 0;
runtime->oss.prev_hw_ptr_interrupt = 0;
runtime->oss.period_ptr = 0;
return 0;
}
......@@ -818,6 +819,8 @@ static ssize_t snd_pcm_oss_write1(snd_pcm_substream_t *substream, const char *bu
return xfer > 0 ? (snd_pcm_sframes_t)xfer : tmp;
runtime->oss.bytes += tmp;
runtime->oss.buffer_used = 0;
runtime->oss.period_ptr += tmp;
runtime->oss.period_ptr %= runtime->oss.period_bytes;
}
} else {
tmp = snd_pcm_oss_write2(substream, (char *)buf, runtime->oss.period_bytes, 0);
......@@ -941,6 +944,7 @@ static int snd_pcm_oss_sync1(snd_pcm_substream_t *substream, size_t size)
{
snd_pcm_runtime_t *runtime;
ssize_t result = 0;
long res;
wait_queue_t wait;
runtime = substream->runtime;
......@@ -957,12 +961,23 @@ static int snd_pcm_oss_sync1(snd_pcm_substream_t *substream, size_t size)
break;
result = 0;
set_current_state(TASK_INTERRUPTIBLE);
schedule();
snd_pcm_stream_lock_irq(substream);
res = runtime->status->state;
snd_pcm_stream_unlock_irq(substream);
if (res != SNDRV_PCM_STATE_RUNNING) {
set_current_state(TASK_RUNNING);
break;
}
res = schedule_timeout(10 * HZ);
if (signal_pending(current)) {
result = -ERESTARTSYS;
break;
}
set_current_state(TASK_RUNNING);
if (res == 0) {
snd_printk(KERN_ERR "OSS sync error - DMA timeout\n");
result = -EIO;
break;
}
}
remove_wait_queue(&runtime->sleep, &wait);
return result;
......@@ -974,31 +989,44 @@ static int snd_pcm_oss_sync(snd_pcm_oss_file_t *pcm_oss_file)
unsigned int saved_f_flags;
snd_pcm_substream_t *substream;
snd_pcm_runtime_t *runtime;
size_t size;
snd_pcm_format_t format;
unsigned long width;
size_t size, size1;
substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
if (substream != NULL) {
if ((err = snd_pcm_oss_make_ready(substream)) < 0)
return err;
runtime = substream->runtime;
format = snd_pcm_oss_format_from(runtime->oss.format);
width = snd_pcm_format_physical_width(format);
if (runtime->oss.buffer_used > 0) {
snd_pcm_format_set_silence(runtime->format,
size = (8 * (runtime->oss.period_bytes - runtime->oss.buffer_used) + 7) / width;
snd_pcm_format_set_silence(format,
runtime->oss.buffer + runtime->oss.buffer_used,
bytes_to_samples(runtime, runtime->oss.period_bytes - runtime->oss.buffer_used));
size);
err = snd_pcm_oss_sync1(substream, runtime->oss.period_bytes);
if (err < 0)
return err;
} else if (runtime->oss.period_ptr > 0) {
size = runtime->oss.period_bytes - runtime->oss.period_ptr;
snd_pcm_format_set_silence(format,
runtime->oss.buffer,
size * 8 / width);
err = snd_pcm_oss_sync1(substream, size);
if (err < 0)
return err;
}
size = runtime->control->appl_ptr % runtime->period_size;
if (size > 0) {
size = runtime->period_size - size;
size *= runtime->channels;
snd_pcm_format_set_silence(runtime->format,
size = runtime->oss.period_bytes;
size1 = frames_to_bytes(runtime, runtime->period_size);
while (size < size1) {
snd_pcm_format_set_silence(format,
runtime->oss.buffer,
size);
err = snd_pcm_oss_sync1(substream, samples_to_bytes(runtime, size));
(8 * runtime->oss.period_bytes + 7) / width);
err = snd_pcm_oss_sync1(substream, runtime->oss.period_bytes);
if (err < 0)
return err;
size += runtime->oss.period_bytes;
}
saved_f_flags = substream->ffile->f_flags;
substream->ffile->f_flags &= ~O_NONBLOCK;
......@@ -1786,7 +1814,6 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file)
break;
}
}
set_current_state(TASK_RUNNING);
remove_wait_queue(&pcm->open_wait, &wait);
up(&pcm->open_mutex);
if (err < 0)
......
......@@ -2106,11 +2106,11 @@ static snd_pcm_sframes_t snd_pcm_lib_write1(snd_pcm_substream_t *substream,
init_waitqueue_entry(&wait, current);
add_wait_queue(&runtime->sleep, &wait);
while (1) {
set_current_state(TASK_INTERRUPTIBLE);
if (signal_pending(current)) {
state = SIGNALED;
break;
}
set_current_state(TASK_INTERRUPTIBLE);
snd_pcm_stream_unlock_irq(substream);
tout = schedule_timeout(10 * HZ);
snd_pcm_stream_lock_irq(substream);
......@@ -2139,7 +2139,6 @@ static snd_pcm_sframes_t snd_pcm_lib_write1(snd_pcm_substream_t *substream,
}
}
_end_loop:
set_current_state(TASK_RUNNING);
remove_wait_queue(&runtime->sleep, &wait);
switch (state) {
......@@ -2401,11 +2400,11 @@ static snd_pcm_sframes_t snd_pcm_lib_read1(snd_pcm_substream_t *substream, void
init_waitqueue_entry(&wait, current);
add_wait_queue(&runtime->sleep, &wait);
while (1) {
set_current_state(TASK_INTERRUPTIBLE);
if (signal_pending(current)) {
state = SIGNALED;
break;
}
set_current_state(TASK_INTERRUPTIBLE);
snd_pcm_stream_unlock_irq(substream);
tout = schedule_timeout(10 * HZ);
snd_pcm_stream_lock_irq(substream);
......@@ -2435,7 +2434,6 @@ static snd_pcm_sframes_t snd_pcm_lib_read1(snd_pcm_substream_t *substream, void
}
}
_end_loop:
set_current_state(TASK_RUNNING);
remove_wait_queue(&runtime->sleep, &wait);
switch (state) {
......
......@@ -1237,11 +1237,11 @@ static int snd_pcm_playback_drain(snd_pcm_substream_t * substream)
add_wait_queue(&runtime->sleep, &wait);
while (1) {
long tout;
set_current_state(TASK_INTERRUPTIBLE);
if (signal_pending(current)) {
state = SIGNALED;
break;
}
set_current_state(TASK_INTERRUPTIBLE);
snd_pcm_stream_unlock_irq(substream);
tout = schedule_timeout(10 * HZ);
snd_pcm_stream_lock_irq(substream);
......@@ -1254,7 +1254,6 @@ static int snd_pcm_playback_drain(snd_pcm_substream_t * substream)
break;
}
}
set_current_state(TASK_RUNNING);
remove_wait_queue(&runtime->sleep, &wait);
switch (state) {
......@@ -1961,12 +1960,11 @@ int snd_pcm_open(struct inode *inode, struct file *file)
}
init_waitqueue_entry(&wait, current);
add_wait_queue(&pcm->open_wait, &wait);
down(&pcm->open_mutex);
while (1) {
down(&pcm->open_mutex);
err = snd_pcm_open_file(file, pcm, device >= SNDRV_MINOR_PCM_CAPTURE ? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK, &pcm_file);
if (err >= 0)
break;
up(&pcm->open_mutex);
if (err == -EAGAIN) {
if (file->f_flags & O_NONBLOCK) {
err = -EBUSY;
......@@ -1975,13 +1973,14 @@ int snd_pcm_open(struct inode *inode, struct file *file)
} else
break;
set_current_state(TASK_INTERRUPTIBLE);
up(&pcm->open_mutex);
schedule();
down(&pcm->open_mutex);
if (signal_pending(current)) {
err = -ERESTARTSYS;
break;
}
}
set_current_state(TASK_RUNNING);
remove_wait_queue(&pcm->open_wait, &wait);
if (err < 0)
goto __error;
......
......@@ -191,7 +191,8 @@ int snd_rawmidi_kernel_open(int cardnum, int device, int subdevice,
err = -EFAULT;
goto __error1;
}
down(&rmidi->open_mutex);
if (!(mode & SNDRV_RAWMIDI_LFLG_NOOPENLOCK))
down(&rmidi->open_mutex);
if (mode & SNDRV_RAWMIDI_LFLG_INPUT) {
if (!(rmidi->info_flags & SNDRV_RAWMIDI_INFO_INPUT)) {
err = -ENXIO;
......@@ -320,7 +321,8 @@ int snd_rawmidi_kernel_open(int cardnum, int device, int subdevice,
} else {
soutput = NULL;
}
up(&rmidi->open_mutex);
if (!(mode & SNDRV_RAWMIDI_LFLG_NOOPENLOCK))
up(&rmidi->open_mutex);
if (rfile) {
rfile->rmidi = rmidi;
rfile->input = sinput;
......@@ -338,7 +340,8 @@ int snd_rawmidi_kernel_open(int cardnum, int device, int subdevice,
kfree(output);
}
module_put(rmidi->card->module);
up(&rmidi->open_mutex);
if (!(mode & SNDRV_RAWMIDI_LFLG_NOOPENLOCK))
up(&rmidi->open_mutex);
__error1:
return err;
}
......@@ -392,6 +395,7 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file)
fflags = snd_rawmidi_file_flags(file);
if ((file->f_flags & O_APPEND) || maj != CONFIG_SND_MAJOR) /* OSS emul? */
fflags |= SNDRV_RAWMIDI_LFLG_APPEND;
fflags |= SNDRV_RAWMIDI_LFLG_NOOPENLOCK;
rawmidi_file = snd_magic_kmalloc(snd_rawmidi_file_t, 0, GFP_KERNEL);
if (rawmidi_file == NULL) {
snd_card_file_remove(card, file);
......@@ -399,6 +403,7 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file)
}
init_waitqueue_entry(&wait, current);
add_wait_queue(&rmidi->open_wait, &wait);
down(&rmidi->open_lock);
while (1) {
subdevice = -1;
down_read(&card->controls_rwsem);
......@@ -421,7 +426,9 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file)
} else
break;
set_current_state(TASK_INTERRUPTIBLE);
up(&rmidi->open_lock);
schedule();
down(&rmidi->open_lock);
if (signal_pending(current)) {
err = -ERESTARTSYS;
break;
......@@ -433,7 +440,6 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file)
if (rawmidi_file->output && rawmidi_file->output->runtime)
rawmidi_file->output->runtime->oss = (maj == SOUND_MAJOR);
#endif
set_current_state(TASK_RUNNING);
remove_wait_queue(&rmidi->open_wait, &wait);
if (err >= 0) {
file->private_data = rawmidi_file;
......@@ -441,6 +447,7 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file)
snd_card_file_remove(card, file);
snd_magic_kfree(rawmidi_file);
}
up(&rmidi->open_lock);
return err;
}
......@@ -950,10 +957,9 @@ static ssize_t snd_rawmidi_read(struct file *file, char *buf, size_t count, loff
}
init_waitqueue_entry(&wait, current);
add_wait_queue(&runtime->sleep, &wait);
spin_unlock_irq(&runtime->lock);
set_current_state(TASK_INTERRUPTIBLE);
spin_unlock_irq(&runtime->lock);
schedule();
set_current_state(TASK_RUNNING);
remove_wait_queue(&runtime->sleep, &wait);
if (signal_pending(current))
return result > 0 ? result : -ERESTARTSYS;
......@@ -1179,10 +1185,9 @@ static ssize_t snd_rawmidi_write(struct file *file, const char *buf, size_t coun
}
init_waitqueue_entry(&wait, current);
add_wait_queue(&runtime->sleep, &wait);
spin_unlock_irq(&runtime->lock);
set_current_state(TASK_INTERRUPTIBLE);
spin_unlock_irq(&runtime->lock);
timeout = schedule_timeout(30 * HZ);
set_current_state(TASK_RUNNING);
remove_wait_queue(&runtime->sleep, &wait);
if (signal_pending(current))
return result > 0 ? result : -ERESTARTSYS;
......@@ -1207,10 +1212,9 @@ static ssize_t snd_rawmidi_write(struct file *file, const char *buf, size_t coun
unsigned int last_avail = runtime->avail;
init_waitqueue_entry(&wait, current);
add_wait_queue(&runtime->sleep, &wait);
spin_unlock_irq(&runtime->lock);
set_current_state(TASK_INTERRUPTIBLE);
spin_unlock_irq(&runtime->lock);
timeout = schedule_timeout(30 * HZ);
set_current_state(TASK_RUNNING);
remove_wait_queue(&runtime->sleep, &wait);
if (signal_pending(current))
return result > 0 ? result : -ERESTARTSYS;
......
......@@ -25,44 +25,6 @@
#if defined(CONFIG_SMP) || defined(CONFIG_SND_DEBUG)
#if 0 /* NOT USED */
/* (interruptible) sleep_on during the specified spinlock */
void snd_seq_sleep_in_lock(wait_queue_head_t *p, spinlock_t *lock)
{
wait_queue_t wait;
set_current_state(TASK_INTERRUPTIBLE);
init_waitqueue_entry(&wait, current);
add_wait_queue(p, &wait);
spin_unlock(lock);
schedule();
spin_lock_irq(lock);
remove_wait_queue(p, &wait);
}
/* (interruptible) sleep_on with timeout during the specified spinlock */
long snd_seq_sleep_timeout_in_lock(wait_queue_head_t *p, spinlock_t *lock, long timeout)
{
wait_queue_t wait;
set_current_state(TASK_INTERRUPTIBLE);
init_waitqueue_entry(&wait, current);
add_wait_queue(p, &wait);
spin_unlock(lock);
timeout = schedule_timeout(timeout);
spin_lock_irq(lock);
remove_wait_queue(p, &wait);
return timeout;
}
#endif /* NOT USED */
/* wait until all locks are released */
void snd_use_lock_sync_helper(snd_use_lock_t *lockp, const char *file, int line)
{
......
......@@ -1678,7 +1678,6 @@ static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count
spin_lock_irq(&tu->qlock);
remove_wait_queue(&tu->qchange_sleep, &wait);
set_current_state(TASK_RUNNING);
if (signal_pending(current)) {
err = -ERESTARTSYS;
......
......@@ -41,6 +41,20 @@ MODULE_DEVICES("{{ALSA,Dummy soundcard}}");
#define MAX_PCM_SUBSTREAMS 16
#define MAX_MIDI_DEVICES 2
#if 0 /* emu10k1 emulation */
#define MAX_BUFFER_SIZE (128 * 1024)
static int emu10k1_playback_constraints(snd_pcm_runtime_t *runtime)
{
int err;
if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
return err;
if ((err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 256, UINT_MAX)) < 0)
return err;
return 0;
}
#define add_playback_constraints emu10k1_playback_constraints
#endif
#if 0 /* RME9652 emulation */
#define MAX_BUFFER_SIZE (26 * 64 * 1024)
#define USE_FORMATS SNDRV_PCM_FMTBIT_S32_LE
......@@ -102,6 +116,12 @@ MODULE_DEVICES("{{ALSA,Dummy soundcard}}");
#ifndef USE_PERIODS_MAX
#define USE_PERIODS_MAX 1024
#endif
#ifndef add_playback_constraints
#define add_playback_constraints(x) 0
#endif
#ifndef add_capture_constraints
#define add_capture_constraints(x) 0
#endif
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
......@@ -325,6 +345,7 @@ static int snd_card_dummy_playback_open(snd_pcm_substream_t * substream)
{
snd_pcm_runtime_t *runtime = substream->runtime;
snd_card_dummy_pcm_t *dpcm;
int err;
dpcm = snd_magic_kcalloc(snd_card_dummy_pcm_t, 0, GFP_KERNEL);
if (dpcm == NULL)
......@@ -347,6 +368,11 @@ static int snd_card_dummy_playback_open(snd_pcm_substream_t * substream)
}
if (substream->pcm->device & 2)
runtime->hw.info &= ~(SNDRV_PCM_INFO_MMAP|SNDRV_PCM_INFO_MMAP_VALID);
if ((err = add_playback_constraints(runtime)) < 0) {
snd_magic_kfree(dpcm);
return err;
}
return 0;
}
......@@ -354,6 +380,7 @@ static int snd_card_dummy_capture_open(snd_pcm_substream_t * substream)
{
snd_pcm_runtime_t *runtime = substream->runtime;
snd_card_dummy_pcm_t *dpcm;
int err;
dpcm = snd_magic_kcalloc(snd_card_dummy_pcm_t, 0, GFP_KERNEL);
if (dpcm == NULL)
......@@ -377,6 +404,11 @@ static int snd_card_dummy_capture_open(snd_pcm_substream_t * substream)
}
if (substream->pcm->device & 2)
runtime->hw.info &= ~(SNDRV_PCM_INFO_MMAP|SNDRV_PCM_INFO_MMAP_VALID);
if ((err = add_capture_constraints(runtime)) < 0) {
snd_magic_kfree(dpcm);
return err;
}
return 0;
}
......
......@@ -233,11 +233,7 @@ snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp,
/* we may take too long time in this loop.
* so give controls back to kernel if needed.
*/
if (need_resched()) {
if (current->state != TASK_RUNNING)
set_current_state(TASK_RUNNING);
schedule();
}
cond_resched();
if (i == sp->v.loopend &&
(sp->v.mode_flags & (SNDRV_SFNT_SAMPLE_BIDIR_LOOP|SNDRV_SFNT_SAMPLE_REVERSE_LOOP)))
......
......@@ -424,13 +424,9 @@ static int emu8k_pcm_trigger(snd_pcm_substream_t *subs, int cmd)
*/
#define CHECK_SCHEDULER() \
do { \
if (need_resched()) {\
if (current->state != TASK_RUNNING)\
set_current_state(TASK_RUNNING);\
schedule();\
if (signal_pending(current))\
return -EAGAIN;\
}\
cond_resched();\
if (signal_pending(current))\
return -EAGAIN;\
} while (0)
......
......@@ -30,7 +30,7 @@ config SND_CS46XX_NEW_DSP
config SND_CS4281
tristate "Cirrus Logic (Sound Fusion) CS4281"
depends on SND && GAMEPORT
depends on SND
help
Say 'Y' or 'M' to include support for Cirrus Logic CS4281.
......@@ -83,7 +83,7 @@ config SND_HDSP
config SND_TRIDENT
tristate "Trident 4D-Wave DX/NX; SiS 7018"
depends on SND && GAMEPORT
depends on SND
help
Say 'Y' or 'M' to include support for Trident 4D-Wave DX/NX and
SiS 7018 soundcards.
......@@ -110,20 +110,20 @@ config SND_CMIPCI
config SND_ENS1370
tristate "(Creative) Ensoniq AudioPCI 1370"
depends on SND && GAMEPORT
depends on SND
help
Say 'Y' or 'M' to include support for Ensoniq AudioPCI ES1370.
config SND_ENS1371
tristate "(Creative) Ensoniq AudioPCI 1371/1373"
depends on SND && GAMEPORT
depends on SND
help
Say 'Y' or 'M' to include support for Ensoniq AudioPCI ES1371 and
Sound Blaster PCI 64 or 128 soundcards.
config SND_ES1938
tristate "ESS ES1938/1946/1969 (Solo-1)"
depends on SND && GAMEPORT
depends on SND
help
Say 'Y' or 'M' to include support for ESS Solo-1 (ES1938, ES1946, ES1969)
soundcard.
......@@ -173,7 +173,7 @@ config SND_INTEL8X0
config SND_SONICVIBES
tristate "S3 SonicVibes"
depends on SND && GAMEPORT
depends on SND
help
Say 'Y' or 'M' to include support for S3 SonicVibes based soundcards.
......
......@@ -378,11 +378,7 @@ static int vx2_load_xilinx_binary(vx_core_t *chip, const snd_hwdep_dsp_image_t *
if (put_xilinx_data(chip, port, 8, data) < 0)
return -EINVAL;
/* don't take too much time in this loop... */
if (need_resched()) {
if (current->state != TASK_RUNNING)
set_current_state(TASK_RUNNING);
schedule();
}
cond_resched();
}
put_xilinx_data(chip, port, 4, 0xff); /* end signature */
......
......@@ -732,7 +732,6 @@ static int wait_clear_urbs(snd_usb_substream_t *subs)
break;
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
set_current_state(TASK_RUNNING);
} while (--timeout > 0);
if (alive)
snd_printk(KERN_ERR "timeout: still %d active urbs..\n", alive);
......
......@@ -1358,17 +1358,17 @@ static int parse_audio_selector_unit(mixer_build_t *state, int unitid, unsigned
return -EINVAL;
}
for (i = 0; i < num_ins; i++) {
if ((err = parse_audio_unit(state, desc[5 + i])) < 0)
return err;
}
if (num_ins == 1) /* only one ? nonsense! */
return 0;
if (check_ignored_ctl(state, unitid, 0))
return 0;
for (i = 0; i < num_ins; i++) {
if ((err = parse_audio_unit(state, desc[5 + i])) < 0)
return err;
}
cval = snd_magic_kcalloc(usb_mixer_elem_info_t, 0, GFP_KERNEL);
if (! cval) {
snd_printk(KERN_ERR "cannot malloc kcontrol\n");
......
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