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

next in thread | previous in thread | raw e-mail | index | archive | help
On 7/24/06, Stefan Ehmann <shoesoft@gmx.net> wrote:
>
> 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?


i will investigate that ...

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)

i'm using 24bit wav files from here:
http://computer.eskildsen.dk/ShowProduct.aspx?productId=17489
to test 24bit playback, maybe your first 24bit file was wrong(broken)

> >
> > 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

that error means that  "bus_dmamem_alloc(sc->dmat, (void **)&sc->pbuf,
BUS_DMA_NOWAIT, &sc->pmap)" failes in the "envy24_dmainit" maybe the driver
doesn't free the allocated dma resources correctly, definitely need
investigation, thanks

> >
> > 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.

sorry, but i can't understand well - you apply the envy24.c.hm_kde.diff and
still has problems when stop one of the channels or you have that problem
before, because now when play more that one 16bit file and stop one or
several of the files the rest should continue to play fine ?

> 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.
>
maybe i was not enough clear - the chip supports hardware mixing no matter
what resolution is user - 16bit, 24bit and 32bit, but the driver works well
only when mixing 16bit samples and it is limitation, because it can't mix
24/32bit+24/32bit samples or 16bit+24/32bit samples and it need very serious
investigation.



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