Thomas Sailer wrote:
>
> Brad Campbell wrote:
>
> > It appears to have a problem with the /dev/mixer interface
> > as it crashes any mixer app I try to run.
>
> The attached patch hopefully fixes this...
>
> > Where to next.. I'm not proficient in C, but I'll take the
> > time to do whatever it requires to solve the problem..
> > Problem being, I don't know where to start...
>
> First use dmesg. Then you'll see a kernel oops. Then use
> ksymoops to decode the oops, then use find and grep to find
> the source files which contain the functions listed in
> the backtrace...
Using Kernel 2.3.47-pre3
I have it working but I don't know why....
Relevant bits of code...
/* initialize codec registers */
>>> s->ctrl = CTRL_GPIO_OUT0;
This is needed to turn on the external Audio Amp..
if ((joystick[devindex] & ~0x18) == 0x200) {
if (check_region(joystick[devindex], JOY_EXTENT))
printk(KERN_ERR "es1371: joystick address 0x%x already in use\n", joystick[devindex]);
else {
s->ctrl |= CTRL_JYSTK_EN | (((joystick[devindex] >> 3) & CTRL_JOY_MASK) << CTRL_JOY_SHIFT);
}
}
s->sctrl = 0;
cssr = 0;
/* check to see if s/pdif mode is being requested */
if (spdif[devindex]) {
if (s->rev >= 4) {
printk(KERN_INFO "es1371: enabling S/PDIF output\n");
cssr |= STAT_EN_SPDIF;
s->ctrl |= CTRL_SPDIFEN_B;
} else {
printk(KERN_ERR "es1371: revision %d does not support S/PDIF\n", s->rev);
}
}
/* initialize the chips */
>> for (t = 0; t < POLL_COUNT; t++);
outl(s->ctrl, s->io+ES1371_REG_CONTROL);
>> for (t = 0; t < POLL_COUNT; t++);
outl(s->sctrl, s->io+ES1371_REG_SERIAL_CONTROL);
>> for (t = 0; t < POLL_COUNT; t++);
outl(0, s->io+ES1371_REG_LEGACY);
>> for (t = 0; t < POLL_COUNT; t++);
These Delays seem to need to be here to talk to the card correctly..
pci_set_master(pcidev); /* enable bus mastering */
/* if we are a 5880 turn on the AC97 */
if (s->vendor == PCI_VENDOR_ID_ENSONIQ &&
((s->device == PCI_DEVICE_ID_ENSONIQ_CT5880 && s->rev == CT5880REV_CT5880_C) ||
(s->device == PCI_DEVICE_ID_ENSONIQ_ES1371 && s->rev == ES1371REV_CT5880_A))) {
cssr |= CSTAT_5880_AC97_RST;
outl(cssr, s->io+ES1371_REG_STATUS);
/* need to delay around 20ms(bleech) to give
some CODECs enough time to wakeup */
tmo = jiffies + (HZ / 50) + 1;
for (;;) {
It's still not perfect, it the Bass/Treble Controls don't work, but it's
reliable..
I have only been working on the kernel for 2 days and don't really understand
what is going on here, but my uneducated guess is that the chip can;t handle
the writes being thrown at it so quickly..
So there appears to be 2 faults, one GPIO-0 needs to be turned on
to activate the audio amp.. That was found by fluke, and there appears to
be a problem with the speed of shoving the data at the audio chip..
That was found because I inserted some printk's and it suddenly worked, so
I removed them and replaced them with delays..
-- Brad..- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:26 EST