Commit b4295fe1 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 cd5102cd 16854cdb
VIA82xx mixer
=============
On many VIA82xx boards, the 'Input Source Select' mixer control does not work.
Setting it to 'Input2' on such boards will cause recording to hang, or fail
with EIO (input/output error) via OSS emulation. This control should be left
at 'Input1' for such cards.
......@@ -29,6 +29,7 @@
#include <linux/time.h>
#include <linux/wait.h>
#include <linux/moduleparam.h>
#include <linux/delay.h>
#include <sound/rawmidi.h>
#include <sound/info.h>
#include <sound/control.h>
......@@ -149,10 +150,8 @@ int snd_rawmidi_drain_output(snd_rawmidi_substream_t * substream)
/* we need wait a while to make sure that Tx FIFOs are empty */
if (substream->ops->drain)
substream->ops->drain(substream);
else {
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ / 20);
}
else
msleep(50);
snd_rawmidi_drop_output(substream);
}
return err;
......
......@@ -46,12 +46,10 @@ MODULE_LICENSE("GPL");
*/
void snd_vx_delay(vx_core_t *chip, int xmsec)
{
if (! in_interrupt() && xmsec >= 1000 / HZ) {
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout((xmsec * HZ + 999) / 1000);
} else {
if (! in_interrupt() && xmsec >= 1000 / HZ)
msleep(xmsec);
else
mdelay(xmsec);
}
}
/*
......
......@@ -333,6 +333,7 @@ static int snd_gf1_pcm_poke_block(snd_gus_card_t *gus, unsigned char *buf,
}
}
if (count > 0 && !in_interrupt()) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
if (signal_pending(current))
return -EAGAIN;
......
......@@ -207,7 +207,6 @@ void snd_gf1_stop_voices(snd_gus_card_t * gus, unsigned short v_min, unsigned sh
unsigned long flags;
short i, ramp_ok;
unsigned short ramp_end;
long time;
if (!in_interrupt()) { /* this can't be done in interrupt */
for (i = v_min, ramp_ok = 0; i <= v_max; i++) {
......@@ -227,11 +226,7 @@ void snd_gf1_stop_voices(snd_gus_card_t * gus, unsigned short v_min, unsigned sh
}
spin_unlock_irqrestore(&gus->reg_lock, flags);
}
time = HZ / 20;
while (time > 0 && !signal_pending(current)) {
set_current_state(TASK_INTERRUPTIBLE);
time = schedule_timeout(time);
}
msleep_interruptible(50);
}
snd_gf1_clear_voices(gus, v_min, v_max);
}
......
......@@ -25,6 +25,7 @@
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/delay.h>
#include <sound/core.h>
#include <sound/emu8000.h>
#include <sound/emu8000_reg.h>
......@@ -355,8 +356,7 @@ init_arrays(emu8000_t *emu)
{
send_array(emu, init1, ARRAY_SIZE(init1)/4);
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout((HZ * (44099 + 1024)) / 44100); /* wait for 1024 clocks */
msleep((1024 * 1000) / 44100); /* wait for 1024 clocks */
send_array(emu, init2, ARRAY_SIZE(init2)/4);
send_array(emu, init3, ARRAY_SIZE(init3)/4);
......
......@@ -1751,6 +1751,7 @@ wavefront_should_cause_interrupt (snd_wavefront_t *dev,
outb (val,port);
spin_unlock_irq(&dev->irq_lock);
while (1) {
set_current_state(TASK_INTERRUPTIBLE);
if ((timeout = schedule_timeout(timeout)) == 0)
return;
if (dev->irq_ok)
......
......@@ -1916,6 +1916,15 @@ int patch_cm9739(ac97_t * ac97)
/* FIXME: set up GPIO */
snd_ac97_write_cache(ac97, 0x70, 0x0100);
snd_ac97_write_cache(ac97, 0x72, 0x0020);
/* Special exception for ASUS W1000/CMI9739. It does not have an SPDIF in. */
if (ac97->pci &&
ac97->subsystem_vendor == 0x1043 &&
ac97->subsystem_device == 0x1843) {
snd_ac97_write_cache(ac97, AC97_CM9739_SPDIF_CTRL,
snd_ac97_read(ac97, AC97_CM9739_SPDIF_CTRL) & ~0x01);
snd_ac97_write_cache(ac97, AC97_CM9739_MULTI_CHAN,
snd_ac97_read(ac97, AC97_CM9739_MULTI_CHAN) | (1 << 14));
}
return 0;
}
......
......@@ -358,11 +358,11 @@ static void azx_init_cmd_io(azx_t *chip)
/* set N=1, get RIRB response interrupt for new entry */
azx_writew(chip, RINTCNT, 1);
/* enable rirb dma and response irq */
azx_writeb(chip, RIRBCTL, ICH6_RBCTL_DMA_EN
#ifdef USE_CORB_RIRB
| ICH6_RBCTL_IRQ_EN
azx_writeb(chip, RIRBCTL, ICH6_RBCTL_DMA_EN | ICH6_RBCTL_IRQ_EN);
#else
azx_writeb(chip, RIRBCTL, ICH6_RBCTL_DMA_EN);
#endif
);
chip->rirb.rp = chip->rirb.cmds = 0;
}
......
......@@ -72,6 +72,8 @@ YAMAHA_DEVICE(0x1007, "MOTIF8"),
YAMAHA_DEVICE(0x1008, "UX96"),
YAMAHA_DEVICE(0x1009, "UX16"),
YAMAHA_INTERFACE(0x100a, 3, "EOS BX"),
YAMAHA_DEVICE(0x100c, "UC-MX"),
YAMAHA_DEVICE(0x100d, "UC-KX"),
YAMAHA_DEVICE(0x100e, "S08"),
YAMAHA_DEVICE(0x100f, "CLP-150"),
YAMAHA_DEVICE(0x1010, "CLP-170"),
......@@ -86,6 +88,7 @@ YAMAHA_DEVICE(0x1019, "CVP-208"),
YAMAHA_DEVICE(0x101a, "CVP-210"),
YAMAHA_DEVICE(0x101b, "PSR-1100"),
YAMAHA_DEVICE(0x101c, "PSR-2100"),
YAMAHA_DEVICE(0x101d, "CLP-175"),
YAMAHA_DEVICE(0x101e, "PSR-K1"),
YAMAHA_DEVICE(0x1020, "EZ-250i"),
YAMAHA_DEVICE(0x1021, "MOTIF ES 6"),
......@@ -125,9 +128,12 @@ YAMAHA_DEVICE(0x5005, "ACU16-C"),
YAMAHA_DEVICE(0x5006, "NHB32-C"),
YAMAHA_DEVICE(0x5007, "DM1000"),
YAMAHA_DEVICE(0x5008, "01V96"),
YAMAHA_DEVICE(0x5009, "SPX2000"),
YAMAHA_DEVICE(0x500a, "PM5D"),
YAMAHA_DEVICE(0x500b, "DME64N"),
YAMAHA_DEVICE(0x500c, "DME24N"),
YAMAHA_DEVICE(0x500d, NULL),
YAMAHA_DEVICE(0x500e, NULL),
YAMAHA_DEVICE(0x7000, "DTX"),
YAMAHA_DEVICE(0x7010, "UB99"),
#undef YAMAHA_DEVICE
......
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