Karl Denninger
2013-Feb-15 21:58 UTC
And for our next trick (Audio problems, Envy24HT driver)
FreeBSD 9.1-STABLE #2 r244942M: Tue Feb 5 21:54:29 CST 2013 karl at dbms.denninger.net:/usr/obj/usr/src/sys/KSD-SMP (custom kernel is there to support PPS for my GPS clock) Attempting to add a generic card that claims to have a Envy24DT chipset in it; it identifies and loads under the snd_envy24ht driver as: pci6: <multimedia, audio> at device 0.0 (no driver attached) pcm0: <Envy24HT audio (Generic)> port 0xcc00-0xcc1f,0xc880-0xc8ff irq 16 at device 0.0 on pci6 pcm0: [GIANT-LOCKED] pcm0: system configuration SubVendorID: 0x1412, SubDeviceID: 0x2403 XIN2 Clock Source: 24.576MHz(96kHz*256) MPU-401 UART(s) #: not implemented ADC #: 1 and SPDIF receiver connected DAC #: 4 Multi-track converter type: AC'97(SDATA_OUT:packed) S/PDIF(IN/OUT): 1/1 ID# 0x00 GPIO(mask/dir/state): 0xff/0xff/0xff cat /dev/sndstat returns: [root at NewFS /boot/kernel]# cat /dev/sndstat FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64) Installed devices: pcm0: <Envy24HT audio (Generic)> at io 0xcc00:32,0xc880:128 irq 16 (1p:1v/5r:1v) default So it appears it did attach properly. But.... an attempt to output something to /dev/dsp0 looks like it is, but nothing happens (no sound) ie: # sysctl -w hw.snd.verbose=2 # mpg123 some-mp3-file & # sndstat | more FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64) Installed devices: pcm0: <Envy24HT audio (Generic)> at io 0xcc00:32,0xc880:128 irq 16 (1p:1v/5r:1v) default snddev flags=0x2a6<AUTOVCHAN,SOFTPCMVOL,BUSY,REGISTERED,VPC> [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags 0x00002108, 0x00000004 interrupts 1343, underruns 0, feed 1343, ready 0 [b:16384/2048/8|bs:16384/2048/8] channel flags=0x2108<TRIGGERED,BUSY,HAS_VCHAN> {userland} -> feeder_mixer(0x00200010) -> {hardware} pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x1000012c, 0x00000029, pid 18573 (mpg123) interrupts 0, underruns 0, feed 1497, ready 65536 [b:0/0/0|bs:65536/2048/32] channel flags=0x1000012c<RUNNING,TRIGGERED,SLEEPING,BUSY,VIRTUAL> {userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware} ...... Says its running, and mpg123 has attached to it -- but no output. Mixer says the volume is on: [root at NewFS /boot/kernel]# mixer Mixer vol is currently set to 75:75 Mixer treble is currently set to 0:0 Mixer synth is currently set to 0:0 Mixer pcm is currently set to 75:75 Mixer speaker is currently set to 0:0 Mixer line is currently set to 75:75 Mixer mic is currently set to 0:0 Mixer cd is currently set to 0:0 Mixer mix is currently set to 0:0 Recording source: mic Ideas for further troubleshooting? -- -- Karl Denninger /The Market Ticker ?/ <http://market-ticker.org> Cuda Systems LLC
Ronald Klop
2013-Feb-17 16:07 UTC
And for our next trick (Audio problems, Envy24HT driver)
On Fri, 15 Feb 2013 22:58:37 +0100, Karl Denninger <karl at denninger.net> wrote:> FreeBSD 9.1-STABLE #2 r244942M: Tue Feb 5 21:54:29 CST 2013 > karl at dbms.denninger.net:/usr/obj/usr/src/sys/KSD-SMP > > (custom kernel is there to support PPS for my GPS clock) > > Attempting to add a generic card that claims to have a Envy24DT chipset > in it; it identifies and loads under the snd_envy24ht driver as: > > pci6: <multimedia, audio> at device 0.0 (no driver attached) > pcm0: <Envy24HT audio (Generic)> port 0xcc00-0xcc1f,0xc880-0xc8ff irq 16 > at device 0.0 on pci6 > pcm0: [GIANT-LOCKED] > pcm0: system configuration > SubVendorID: 0x1412, SubDeviceID: 0x2403 > XIN2 Clock Source: 24.576MHz(96kHz*256) > MPU-401 UART(s) #: not implemented > ADC #: 1 and SPDIF receiver connected > DAC #: 4 > Multi-track converter type: AC'97(SDATA_OUT:packed) > S/PDIF(IN/OUT): 1/1 ID# 0x00 > GPIO(mask/dir/state): 0xff/0xff/0xff > > cat /dev/sndstat returns: > > [root at NewFS /boot/kernel]# cat /dev/sndstat > FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64) > Installed devices: > pcm0: <Envy24HT audio (Generic)> at io 0xcc00:32,0xc880:128 irq 16 > (1p:1v/5r:1v) default > > So it appears it did attach properly. > > But.... an attempt to output something to /dev/dsp0 looks like it is, > but nothing happens (no sound) > > ie: > > # sysctl -w hw.snd.verbose=2 > # mpg123 some-mp3-file & > # sndstat | more > > FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64) > Installed devices: > pcm0: <Envy24HT audio (Generic)> at io 0xcc00:32,0xc880:128 irq 16 > (1p:1v/5r:1v) default > snddev flags=0x2a6<AUTOVCHAN,SOFTPCMVOL,BUSY,REGISTERED,VPC> > [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags > 0x00002108, 0x00000004 > interrupts 1343, underruns 0, feed 1343, ready 0 > [b:16384/2048/8|bs:16384/2048/8] > channel flags=0x2108<TRIGGERED,BUSY,HAS_VCHAN> > {userland} -> feeder_mixer(0x00200010) -> {hardware} > pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 44100/48000, fmt > 0x00200010, flags 0x1000012c, 0x00000029, pid 18573 (mpg123) > interrupts 0, underruns 0, feed 1497, ready 65536 > [b:0/0/0|bs:65536/2048/32] > channel flags=0x1000012c<RUNNING,TRIGGERED,SLEEPING,BUSY,VIRTUAL> > {userland} -> feeder_root(0x00200010) -> > feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) > -> {hardware} > > ...... > > Says its running, and mpg123 has attached to it -- but no output. > > Mixer says the volume is on: > > [root at NewFS /boot/kernel]# mixer > Mixer vol is currently set to 75:75 > Mixer treble is currently set to 0:0 > Mixer synth is currently set to 0:0 > Mixer pcm is currently set to 75:75 > Mixer speaker is currently set to 0:0 > Mixer line is currently set to 75:75 > Mixer mic is currently set to 0:0 > Mixer cd is currently set to 0:0 > Mixer mix is currently set to 0:0 > Recording source: mic > > Ideas for further troubleshooting? >I don't know the internals of the sound code, but as there are no other replies yet. Did you test the obvious things? Speakers connected correctly? Does mpg123 work well? Try another player also. Ronald.
Scott Lambert
2013-Feb-17 17:41 UTC
And for our next trick (Audio problems, Envy24HT driver)
On Fri, Feb 15, 2013 at 03:58:37PM -0600, Karl Denninger wrote:> Says its running, and mpg123 has attached to it -- but no output. > > Mixer says the volume is on: > > [root at NewFS /boot/kernel]# mixer > Mixer vol is currently set to 75:75 > Mixer treble is currently set to 0:0 > Mixer synth is currently set to 0:0 > Mixer pcm is currently set to 75:75 > Mixer speaker is currently set to 0:0 > Mixer line is currently set to 75:75 > Mixer mic is currently set to 0:0 > Mixer cd is currently set to 0:0 > Mixer mix is currently set to 0:0 > Recording source: mic > > Ideas for further troubleshooting?Try increasing the volume for "mix" and/or "speaker". If that does not work, increase volume for everything and just see if you get any output. Maybe the driver got its lines mixed up? mixer speaker 75:75 mixer mix 75:75 ... I am not a sound guy. The last time I messed with sound, there were some mixer line labels that didn't make sense to me on the card I was using at the time. It was a long time ago. -- Scott Lambert KC5MLE Unix SysAdmin lambert at lambertfam.org
Yamagi Burmeister
2013-Feb-18 09:02 UTC
And for our next trick (Audio problems, Envy24HT driver)
On Fri, 15 Feb 2013 15:58:37 -0600 Karl Denninger <karl at denninger.net> wrote:> FreeBSD 9.1-STABLE #2 r244942M: Tue Feb 5 21:54:29 CST 2013 > karl at dbms.denninger.net:/usr/obj/usr/src/sys/KSD-SMP > > (custom kernel is there to support PPS for my GPS clock) > > Attempting to add a generic card that claims to have a Envy24DT chipset > in it; it identifies and loads under the snd_envy24ht driver as: > > pci6: <multimedia, audio> at device 0.0 (no driver attached) > pcm0: <Envy24HT audio (Generic)> port 0xcc00-0xcc1f,0xc880-0xc8ff irq 16 > at device 0.0 on pci6 > pcm0: [GIANT-LOCKED] > pcm0: system configuration > SubVendorID: 0x1412, SubDeviceID: 0x2403 > XIN2 Clock Source: 24.576MHz(96kHz*256) > MPU-401 UART(s) #: not implemented > ADC #: 1 and SPDIF receiver connected > DAC #: 4 > Multi-track converter type: AC'97(SDATA_OUT:packed) > S/PDIF(IN/OUT): 1/1 ID# 0x00 > GPIO(mask/dir/state): 0xff/0xff/0xff > > cat /dev/sndstat returns: > > [root at NewFS /boot/kernel]# cat /dev/sndstat > FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64) > Installed devices: > pcm0: <Envy24HT audio (Generic)> at io 0xcc00:32,0xc880:128 irq 16 > (1p:1v/5r:1v) default > > So it appears it did attach properly.No it did not. :) It's a longer story. While the Envy family had of course a generic chip design, there wasn't a generic card design. So every Envy card is different and needs a different driver. The snd_envy24ht driver solves this problem with distinct device sections for each supported devices. See envy24ht.c line 279. If no device section could be found the card is detected as "generic" and a default device section is used. That may or may not work... So the solution would be to add a device section for your card but that's everything but easy. In an ideal world there would be a datasheet for that card, in reality it may be necessary to reverse engineer it. And there are other problems with the driver: - It's not MPSAFE (at least it's not marked MPSAFE) - Recording doesn't work - The debug mode is prone to panics - All channels supported by the Envy chip are exposed to the mixer regardless if they're connect in hardware or not. This leads to invalid channels. I've once had the idea to clean it up but never found the time. Nevertheless it still would be really nice if someone could give this driver some love. :) Ciao, Yamagi -- Homepage: www.yamagi.org XMPP: yamagi at yamagi.org GnuPG/GPG: 0xEFBCCBCB