Commit eae572ef authored by Takashi Iwai's avatar Takashi Iwai
Browse files

pcm: dmix: Workaround for binary incompatibility



The commit 1a9bd0f0 ("pcm: direct: Fix for sync issue on xrun
recover") introduced a new field "recoveries" in
snd_pcm_direct_share_t.  Unfortunately this caused two issues:

- It changed the size of the struct which is used as the magic key
- The struct size differs between 32bit and 64bit due to alignment

The former brought the incompatibility with the older alsa-lib,
e.g. when you run an app with an older alsa-lib via LD_PRELOAD, it
doesn't work any longer.

The latter is more serious, it disallows running 32bit apps dmix with
64bit together.

As a workaround, put recoveries field to the unused field
"s.xfer_align", so that the struct is in an old form.  This makes the
dmix again binary-compatible with 1.1.3 and older versions, and also
fix the incompatibility between 32/64 bits.

This is a one-time workaround, and we may need to reconsider more
about a breakage in future...

Fixes: 1a9bd0f0 ("pcm: direct: Fix for sync issue on xrun recover")
Reported-and-tested-by: default avatarCheng Sun <chengsun9@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 79f735fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment