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

Kevin Gilbert kevin952 at tpg.com.au
Sat Aug 30 16:10:28 PDT 2008


On Sat, 30 Aug 2008, Lennart Poettering opined:
> 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

OK, I've downloaded the latest PulseAudio source code, upgraded ALSA to the 
latest (Rawhide) bleeding-edge Fedora version. There are some differences in 
the trace but it still fails.

1) I suspect there may be a problem with the code:

=== begin ===
    if (_use_mmap) {
        if ((ret = snd_pcm_hw_params_set_access(pcm_handle, hwparams, 
SND_PCM_ACCESS_MMAP_INTERLEAVED)) < 0) {

            /* mmap() didn't work, fall back to interleaved */

            if ((ret = snd_pcm_hw_params_set_access(pcm_handle, hwparams, 
SND_PCM_ACCESS_RW_INTERLEAVED)) < 0)
                goto finish;

            _use_mmap = FALSE;
        }

    } else if ((ret = snd_pcm_hw_params_set_access(pcm_handle, hwparams, 
SND_PCM_ACCESS_RW_INTERLEAVED)) < 0)
        goto finish;
=== end ===

Are the two "< 0" comparisons correct? BTW: I put some debug displays in the 
code and the value of "ret" after both the SND_PCM_ACCESS_MMAP_INTERLEAVED and 
SND_PCM_ACCESS_RW_INTERLEAVED calls is -22.

2) There is no file in the PulseAudio source package that has the string 
SNDRV_PCM_INFO_NONINTERLEAVED or even just the word NONINTERLEAVED! Therefore, 
does PulseAudio support devices that use the NONINTERLEAVED mode?

Kevin




More information about the pulseaudio-discuss mailing list