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

Tanu Kaskinen tanuk at iki.fi
Sat Jul 10 23:48:15 PDT 2010

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

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

Tanu Kaskinen

More information about the pulseaudio-discuss mailing list