Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jul 2006 14:23:28 +0200
From:      Stefan Ehmann <shoesoft@gmx.net>
To:        "Konstantin Dimitrov" <kosio.dimitrov@gmail.com>
Cc:        freebsd-multimedia@freebsd.org, Alexander@leidinger.net
Subject:   Re: Status of VIA Envy24 audio controller
Message-ID:  <200607241423.30007.shoesoft@gmx.net>
In-Reply-To: <8103ad500607240437p256e65c2y79cd8fdc34a53cf0@mail.gmail.com>
References:  <200606072039.13422.shoesoft@gmx.net> <8103ad500607180035t50633780wbf585805464b8696@mail.gmail.com> <8103ad500607240437p256e65c2y79cd8fdc34a53cf0@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 24 July 2006 13:37, Konstantin Dimitrov wrote:
> during the last weekend i have some free time and decided to look through
> the list of reported problems:
>
> 1) memory leak after "kldunload snd_ak452x.ko" : "Warning: memory type
> ak452x leaked memory on destroy (1 allocations, 64 bytes leaked)."
>
> fixed, so should be removed from the list with bugs, here is the patch:
> http://xkodi.svobodno.com/envy24/new/envy24.c.memleak.diff
>
> 2) 24 bit playback not supported (only 16/32 bit)
>
> it is not true and should be removed from the list with bugs. according to
> OSS specification 24bit playback is done using 32bit playback: 24bit sample
> is padded with zeroes to 32bit sample and after that 24bit sample becomes
> 32bit sample with LSB==0. it is not responsibility of a driver to do that
> conversion, the conversion itself takes place into the player or into the
> kernel (newpcm subsystem). the driver supports 32bit playback, so that is
> why it also supports 24bit playback. i have tested 24bit playback with
> mplayer and it works fine as expected:
>
> Opening audio decoder: [pcm] Uncompressed PCM audio decoder
> AUDIO: 44100 Hz, 2 ch, s24le, 2116.8 kbit/100.00% (ratio: 264600->264600)
> Selected audio codec: [pcm] afm:pcm (Uncompressed PCM)
> ==========================================================================
> Checking audio filter chain for 44100Hz/2ch/s24le -> 44100Hz/2ch/s24le...
> AF_pre: 44100Hz/2ch/s24le
> AO: [oss] 44100Hz 2ch s24le (3 bps)
> Building audio filter chain for 44100Hz/2ch/s24le -> 44100Hz/2ch/s24le...
There's a similar problem with 8Bit files. Is this neither within the 
responsibility of the driver?

With the 24bit file I tried I just get white noise in mplayer. I made another 
one for testing purposes and this one did work. (So it doesn't seem to be a 
problem with the driver)
>
> 3) after kld(un)loading some times, the card fails to be probed until
> reboot
>
> i can't reproduce that problem, more details are needed ... are there any
> error messages when probing fails?

Here's the output in /var/log/messages:

Jul  7 18:19:14 taxman kernel: pcm0: detached
Jul  7 18:19:23 taxman kernel: pcm0: <Envy24 audio(M-Audio Audiophile 2496)> 
port 0xd400-0xd41f,0xd000-0xd00f,0xb800-0xb80f,0xb400-0xb43f irq 16 at device 
13.0 on pci0
Jul  7 18:19:23 taxman kernel: pcm0: system configuration
Jul  7 18:19:23 taxman kernel: SubVendorID: 0x1412, SubDeviceID: 0xd634
Jul  7 18:19:23 taxman kernel: XIN2 Clock Source: 22.5792MHz(44.1kHz*512)
Jul  7 18:19:23 taxman kernel: MPU-401 UART(s) #: 1
Jul  7 18:19:23 taxman kernel: AC'97 codec: not exist
Jul  7 18:19:23 taxman kernel: ADC #: 1
Jul  7 18:19:23 taxman kernel: DAC #: 1
Jul  7 18:19:23 taxman kernel: Multi-track converter type: I2S(96KHz support, 
24bit resolution, ID#0x2)
Jul  7 18:19:23 taxman kernel: S/PDIF(IN/OUT): 1/1 ID# 0x00
Jul  7 18:19:23 taxman kernel: GPIO(mask/dir/state): 0x04/0xfe/0xfb
Jul  7 18:19:24 taxman kernel: pcm0: unable to initialize the card
Jul  7 18:19:24 taxman kernel: device_attach: pcm0 attach returned 28

>
> 4) No sound in KDE: Everything works fine at the console but when I load
> KDE the sound stutters and plays at less then 1/2 speed.
>
> fixed, so should be removed from the list with bugs, here is the patch:
> http://xkodi.svobodno.com/envy24/new/envy24.c.hm_kde.diff
>
> the problem is related to the implementation of Envy24(1712) hardware mixer
> support in the driver, see 5) for more details
>
> 5) vchans don't work
>
> it is a feature, not a bug and it is really great feature, so should be
> removed from the list with bugs. Envy24(1712) has very precise 36bit wide
> hardware mixer, which is superior that vchans (software sound mixer in the
> kernel). the driver supports Envy24(1712) hardware mixer, so up to 10
> channels (5 stereo pairs) can be playback simultaneously and that is why no
> software sound mixer (vchans) is needed.
>
> however, there are problems with the implementation of Envy24(1712)
> hardware mixer support in the driver, one of them is the problem decribed
> in 4), more detailed and correct description of 4) is:
> when playback several channels simultaneously and stop one of the channels,
> then sound starts to stutter and plays at very low speed.
> i'm expecting more problems related to the implementation of Envy24(1712)
> hardware mixer support to be found.
> personally i have already found two new: there is no problem to playback
> simultaneously 5 stereo 16bit sound files, but there is problem to playback
> simultaneously more than one 24bit/32bit sound file or 16bit sound file and
> 24bit/32bit sound file and currently i have no solution for these two new
> found problems.

I've mistaken the problem when one of the channels stop with the vchans. I 
just got the stuttering sound. But now that I tried it works indeed as long 
as non of the channels stop.

If there's no support in the chip, we probable have to stick to 24 or 32Bit 
(otherwise return busy or do the resampling in software) which isn't too much 
of a limitation IMHO.



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