[pulseaudio-discuss] {PATCH][RFC] AC3 passthrough support

Michael Rans mcarans at yahoo.co.uk
Sun Jul 11 03:56:41 PDT 2010


Regarding your patch, I tried it but I got a seg fault. I also tried:
size_t max_rewind = PA_MIN(u->hwbuf_size,  snd_pcm_rewindable(u->pcm_handle)); 
pa_sink_set_max_rewind(u->sink, max_rewind); 
But u->pcm_handle is not populated at that stage as far as I can  tell. 




________________________________
From: Tanu Kaskinen <tanuk at iki.fi>
To: pulseaudio-discuss at mail.0pointer.de
Sent: Sun, 11 July, 2010 7:48:15
Subject: Re: [pulseaudio-discuss] {PATCH][RFC] AC3 passthrough support

On Sun, 2010-07-11 at 09:10 +0300, Tanu Kaskinen wrote:
> On Sat, 2010-07-10 at 13:24 +0000, Michael Rans wrote:
> > I can't find any definition of snd_pcm_rewind() in the alsa-plugins
> > source code. Does this function call through to a function in the
> > plugins?
> 
> snd_pcm_rewind() is in alsa-lib, not alsa-plugins. I don't know how the
> plugins do rewinding - I didn't find any rewind callbacks in the rate
> converter nor in the pulse plugin code. (I'm not familiar with alsa
> code, so I might have looked at the wrong places.)

Update: when reading the rest of the thread that mentioned
snd_pcm_hw_params_can_rewind, I saw this from Jaroslav Kysela:

"The rewind/forward implementation in ioplug is actually broken, because
it moves only internal pointer without notification to real external
plugin."

So apparently the alsa plugins are completely unable to do proper
rewinding, unless things have got better during the last two years.

> > I understand that there a function snd_pcm_hw_params_can_rewind which
> > I would guess should return false for AC3 encoding - is this called by
> > Pulseaudio?
> 
> Where did you find that function? The only mention that I found was in
> an alsa-devel discussion in 2008. I didn't find it in the alsa api
> documentation.

Again, when reading the thread further, I found the reason why
snd_pcm_hw_params_can_rewind doesn't exist - it was replaced by
snd_pcm_rewindable. Pulseaudio doesn't call that. I added a "patch" (not
formatted as a proper patch) to ticket 839 that adds the
snd_pcm_rewindable check to the alsa sink. If you could test that and
see if it helps with the rate converter plugin, I'll prepare a proper
patch.

-- 
Tanu Kaskinen

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss at mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20100711/98578f48/attachment.htm>


More information about the pulseaudio-discuss mailing list