[pulseaudio-discuss] Problems with pulseaudio / asla on PS3

Lennart Poettering lennart at poettering.net
Fri Aug 29 18:38:36 PDT 2008


On Sat, 30.08.08 09:38, Kevin Gilbert (kevin952 at tpg.com.au) wrote:
> > Umpf. there seems to be something very broken here in the audio driver
> > or alsa-libs. We only support interleaved channels. This assert above
> > is always true for interleaved channels. We ask the ALSA driver for
> > interleaved channels. But apparently it gave us some more complex
> > channel arrangement.
> >
> > Please report to the ALSA people. But first try to update your kernel
> > driver and alsa-libs to newest from upstream.
> 
> Before reporting to the ALSA folk I thought I should check with the PS3 kernel 
> people as I am running one of their kernels (no use reporting a problem to 
> ALSA if there is PS3 kernel specific code that could be the problem).
> 
> See http://ozlabs.org/pipermail/cbe-oss-dev/2008-August/005423.html for that 
> thread.
> 
> In short:
> 
> "PS3 sound driver supports only SNDRV_PCM_INFO_NONINTERLEAVED format as well 
> as many ALSA driver like AC97 support only SNDRV_PCM_INFO_INTERLEAVED. Non-
> interleaved format is just not usual, but it is not broken. It's defined in 
> ALSA. With a brief looking, other mainlined drivers -- gus, emu10k, es1968, 
> rme9652 and aica -- seem to support only non-interleaved samples. [...] PS3 
> sound chip's hardware is not suitable for the interleaved samples due to its 
> FIFO and DMAC design. I have no plan to support interleave permutation in the 
> kernel driver level. I think the best way is that the user space renderer 
> takes care of the various interleave formats as well as sample endianness and 
> bit width."

The thing is that we try to enable SND_PCM_ACCESS_MMAP_INTERLEAVED and
when that fails SND_PCM_ACCESS_RW_INTERLEAVED. Which apparently
suceeded on your setup, since you got past that initialization. You
subsequently hit an assert when we checked whether the sample layout
actually matches what SND_PCM_ACCESS_xxx_INTERLEAVED promises.

It's totally fine to support only NONINTERLEAVED channel setups, but
then the alsa driver needs to refuse enabling INTERLEAVED mode,
i.e. snd_pcm_hw_params_set_access() must fail -- which it doesn't.

The relevant code in PA you find here:

http://pulseaudio.org/browser/src/modules/alsa-util.c#L324

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4



More information about the pulseaudio-discuss mailing list