Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Feb 2013 11:01:13 -0600
From:      Karl Denninger <karl@denninger.net>
To:        freebsd-stable@freebsd.org
Subject:   Re: And for our next trick (Audio problems, Envy24HT driver)
Message-ID:  <51210CD9.9000007@denninger.net>
In-Reply-To: <op.wsnq24jk8527sy@ronaldradial>
References:  <511EAF8D.8090703@denninger.net> <op.wsnq24jk8527sy@ronaldradial>

next in thread | previous in thread | raw e-mail | index | archive | help

On 2/17/2013 10:07 AM, Ronald Klop wrote:
> On Fri, 15 Feb 2013 22:58:37 +0100, Karl Denninger
> <karl@denninger.net> wrote:
>
>> FreeBSD 9.1-STABLE #2 r244942M: Tue Feb  5 21:54:29 CST 2013
>> karl@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@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@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.
>
Yeah, all the obvious stuff has been checked, including jacking a set of
headphones directly into the speaker connector on the back of the
card.   Mpg123 works fine, and I've also attempted simply trying to
"cat" a random file to /dev/dsp0, which should produce noise -- I get
nothing.

Since the output device appears to attach and it also appears that the
programs correctly transfer data to the device (e.g. the cat does not
hang and neither does mpg123; it plays the correct time and then exits)
the assumption I have right now is that there's a gate (e.g. a
power-enable register somewhere) that has to be poked on the card that
isn't being set.

I was hoping that someone had an idea in terms of places to start
digging in the code.

-- 
-- Karl Denninger
/The Market Ticker ®/ <http://market-ticker.org>;
Cuda Systems LLC



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51210CD9.9000007>