Date: Sat, 24 Jul 2010 12:03:22 +0000 From: xorquewasp@googlemail.com To: Stanislav Sedov <stas@FreeBSD.org> Cc: freebsd-hackers@freebsd.org Subject: Re: envy24 driver broken Message-ID: <20100724120322.GA76854@logik.internal.network> In-Reply-To: <20100723131846.e7116b60.stas@FreeBSD.org> References: <20100707183935.GA24697@logik.internal.network> <AANLkTinr-J4ukUtfNM-bqRhcInrhdcNB9DUwK4zUuL7w@mail.gmail.com> <20100707185848.GA53688@logik.internal.network> <AANLkTikUvc6H6QUYyjVL_VtXuipUAuWI46gQGezH9PsJ@mail.gmail.com> <20100709151544.GA42131@logik.internal.network> <20100722163256.24953414.stas@FreeBSD.org> <20100723185110.GB37045@logik.internal.network> <20100723131846.e7116b60.stas@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Ok, here's where I am with this. I'm currently using the Audiophile for the sake of simplicity (I'm assuming that if the Audiophile works properly, the Delta 66 probably will too). /dev/sndstat, at maximum verbosity, looks like: FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64) Installed devices: pcm0: <Envy24 audio (M Audio Audiophile 2496)> at io 0xac00:32,0xa880:16,0xa800:16,0xa480:64 irq 17 [MPSAFE] (5p:1v/3r:1v channels duplex default) snddev flags=0x2e2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC> [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004 interrupts 0, underruns 0, feed 0, ready 0 [b:16384/2048/8|bs:16384/8192/2] channel flags=0x2100<BUSY,HAS_VCHAN> {userland} -> feeder_mixer(0x00200010) -> {hardware} [pcm0:play:dsp0.p1]: spd 8000, fmt 0x00100008, flags 0x00000000, 0x00000000 interrupts 0, underruns 0, feed 0, ready 0 [b:32768/16384/2|bs:0/0/0] channel flags=0x0 {userland} -> feeder_root(0x00000000) -> {hardware} [pcm0:play:dsp0.p2]: spd 8000, fmt 0x00100008, flags 0x00000000, 0x00000000 interrupts 0, underruns 0, feed 0, ready 0 [b:32768/16384/2|bs:0/0/0] channel flags=0x0 {userland} -> feeder_root(0x00000000) -> {hardware} [pcm0:play:dsp0.p3]: spd 8000, fmt 0x00100008, flags 0x00000000, 0x00000000 interrupts 0, underruns 0, feed 0, ready 0 [b:32768/16384/2|bs:0/0/0] channel flags=0x0 {userland} -> feeder_root(0x00000000) -> {hardware} [pcm0:play:dsp0.p4]: spd 8000, fmt 0x00100008, flags 0x00000000, 0x00000000 interrupts 0, underruns 0, feed 0, ready 0 [b:32768/16384/2|bs:0/0/0] channel flags=0x0 {userland} -> feeder_root(0x00000000) -> {hardware} pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000 interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:0/0/0] channel flags=0x10000000<VIRTUAL> {userland} -> feeder_root(0x00000000) -> {hardware} [pcm0:record:dsp0.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005 interrupts 0, overruns 0, feed 0, hfree 16384, sfree 16384 [b:16384/2048/8|bs:16384/8192/2] channel flags=0x2100<BUSY,HAS_VCHAN> {hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland} [pcm0:record:dsp0.r1]: spd 8000, fmt 0x00100008, flags 0x00000000, 0x00000000 interrupts 0, overruns 0, feed 0, hfree 32768, sfree 0 [b:32768/16384/2|bs:0/0/0] channel flags=0x0 {hardware} -> feeder_root(0x00000000) -> {userland} [pcm0:record:dsp0.r2]: spd 8000, fmt 0x00100008, flags 0x00000000, 0x00000000 interrupts 0, overruns 0, feed 0, hfree 32768, sfree 0 [b:32768/16384/2|bs:0/0/0] channel flags=0x0 {hardware} -> feeder_root(0x00000000) -> {userland} pcm0:record:dsp0.r0[pcm0:virtual:dsp0.vr0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000 interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 [b:0/0/0|bs:0/0/0] channel flags=0x10000000<VIRTUAL> {hardware} -> feeder_root(0x00000000) -> {userland} File Versions: $FreeBSD: src/sys/dev/sound/pci/envy24.c,v 1.17.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/isa/sndbuf_dma.c,v 1.4.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/feeder_format.c,v 1.1.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/vchan.c,v 1.37.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/sound.c,v 1.123.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/feeder_eq.c,v 1.1.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/feeder.c,v 1.45.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/feeder_chain.c,v 1.1.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/sndstat.c,v 1.29.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/feeder_volume.c,v 1.7.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/buffer.c,v 1.38.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/mixer.c,v 1.66.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/ac97_patch.c,v 1.12.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/ac97.c,v 1.75.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/dsp.c,v 1.114.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/feeder_rate.c,v 1.29.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/channel.c,v 1.124.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/feeder_mixer.c,v 1.1.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ $FreeBSD: src/sys/dev/sound/pcm/feeder_matrix.c,v 1.1.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $ The relevant part of dmesg: pcm0: <Envy24 audio (M Audio Audiophile 2496)> port 0xac00-0xac1f,0xa880-0xa88f,0xa800-0xa80f,0xa480-0xa4bf irq 17 at device 6.0 on pci1 pcm0: [ITHREAD] pcm0: system configuration SubVendorID: 0x1412, SubDeviceID: 0xd634 XIN2 Clock Source: 22.5792MHz(44.1kHz*512) MPU-401 UART(s) #: 1 AC'97 codec: not exist ADC #: 1 DAC #: 1 Multi-track converter type: I2S(96KHz support, 24bit resolution, ID#0x2) S/PDIF(IN/OUT): 1/1 ID# 0x00 GPIO(mask/dir/state): 0x04/0xfb/0xfe Trying to use the mixer on anything other than the vol, pcm or line channels results in: $ mixer mic 100 Setting the mixer mic from 0:0 to 100:100. mixer: WRITE_MIXER: Device not configured Which is fair enough - if it doesn't have them, it doesn't have them. The card, however, doesn't seem to work in full duplex mode (pretty essential for "pro" audio work). As a test of full duplex capability, I'm using jackd from ports: $ /usr/local/bin/jackd -d oss jackd 0.116.2 Copyright 2001-2005 Paul Davis and others. jackd comes with ABSOLUTELY NO WARRANTY This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details JACK compiled with System V SHM support. loading driver .. oss_driver: /dev/dsp : 0x10/2/48000 (4096) oss_driver: indevbuf 4096 B, outdevbuf 4096 B oss_driver: not using barrier mode, (single thread) OSS: write() failed: oss_driver.c@1054, count=-1/4096, errno=22 Having spoken to the jackd developers at length whilst picking through the OSS backend source code, we came to the conclusion that this error (EINVAL) occurs because the envy24 driver can't work in full duplex mode (essential for jackd without the workaround below). The same problem occurs with the Delta 66. The EINVAL error occurs as soon as a jack client connects. Starting jackd with some flags to tell it not to open any inputs allows it to work (for a given value of "work"): $ /usr/local/bin/jackd -d oss -i 0 jackd 0.116.2 Copyright 2001-2005 Paul Davis and others. jackd comes with ABSOLUTELY NO WARRANTY This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details JACK compiled with System V SHM support. loading driver .. oss_driver: /dev/dsp : 0x10/2/48000 (4096) oss_driver: indevbuf 0 B, outdevbuf 4096 B oss_driver: not using barrier mode, (single thread) Using the card as a plain recording device (ie, reading from /dev/dsp) fails too. I can get audio output to my speakers writing to /dev/dsp I can only get an endless stream of 0x80 from any audio input: $ cat /dev/dsp0.0 | hd -v 00000000 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 |................| 00000010 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 |................| 00000020 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 |................| 00000030 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 |................| 00000040 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 |................| 00000050 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 |................| 00000060 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 |................| If you need any more information, please let me know. Regards, xw
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100724120322.GA76854>